lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>  I'm planning to modify Lua for use in an MMO server. The architecture
> is similar to the server that runs our current game, "A Tale in the
> Desert," but would use Lua as the scripting language.
>  Each machine in the server cluster would have a number of suspended
> Lua threads. It would pick one to run; the running thread could yield
> for a variety of reasons, including:
>    1. The code the thread is running explicitly yields.
>    2. The code tries to access a table that is not resident on the
> machine that the thread is running on.


Sorry to sound discouraging, but aren't you trying to go the hard way?
What considerations lead you to decision to change Lua itself? I
believe you'll lose much more than you gain (starting from LuaJIT

Why not, say, wrap access to "shared" tables into some API calls (if
needed, it may be made transparent by implementing a clever metatable
over a global environment)? Such API may call yield as needed then (if
you put into a metatable, you'll need to employ one of
cross-metamethod yielding libraries).