In the new environment, the boss gave me time to study next-generation server technology as a long-term task.
The new server wants to achieve the goal:
1, distributed system, the relationship between objects (Entity) is similar to the Actor model.
2, the logic service, is single process, multi-threaded, the object sends the message to communicate, but the simple reading attribute is as direct as possible.
3. You must use the Python language. The development method is similar to the BigWorld engine.
This goal is still very grand, can only be conquered from the bottom step. Here is a record of the process of solving the problem, not only sharing, but also urging themselves not to give up halfway.
I personally love the Skynet framework, and for many reasons the Skynet framework is almost impossible to modify as a Python script.
The reason, in addition to the well-known Gil (Python global Lock) problem, is that Python's interpreter is extremely heavyweight, and if used like Skynet's standalone lua_state, even if you do nothing, you can run out of memory. Therefore, it is still possible to represent each entity with an ordinary object, to save all objects within the process, within the logical process, and there is no concept of "independent service".
However, after studying the Skynet, I think the future will be a lot of reference skynet mature practices, and even copy a lot of C language layer code. After all, and the master of the understanding of the architecture, and C language experience, is really bad too much.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Meme Game server Development Diary (i) target