Hey everyone. I'm using lacewing to run a server for a SWF/flash game I'm building and I was wondering how I can achieve best performance for it.
I heard the best way to do a bigger server is to split it up into different functions (i.e. a login server, world server, mob server, etc). I have the server set up that way.
One more important note is that (unless I'm doing something wrong) I've discovered that only one server application can use lacewing. For example if I open a login server and host lacewing, it's all good. But if I then try to host a world server on the same computer, the server never opens.
I got around this by creating a main server that has the lacewing extension, and this server is responsible for all sending and receiving. But that's all it does. The rest of the work is routed to the other servers (login, world, mob) via the shared data object.
So for example when the user opens his client app and tries to log in this is what happens...
a. the main server receives the player's request through lacewing
b. the main server routes the request to the login server
c. the login server interprets this request
d. the response is routed back to the main server
e. the main server forwards the response to the client and logs him in to lacewing
I handle all of the routing by using the shared data object.
So my question is....
1. Is there a better way to split my server into smaller parts so that I don't have to have so much inefficiency with the routing?
2. Can I somehow host 3 separate servers instead of only hosting one and routing all traffic through that one server?
3. For the most part this system seems to be okay. However, I'm starting to get worried because I'm going to be working on the mob server soon. The mob server could potentially have hundreds of mobs and these positions would need to be sent to players every few seconds. How can I even route that much data between applications? The shared data object only holds 2048 bytes of data....
Thanks so much, sorry for so much text.