Research on the opening of Skynet framework learning column

Time:2020-9-26
I have been in contact with the mobile game built by Skynet framework in 17 years, and successfully launched several games. Over the past few years, we have been using the source code of Skynet framework to build servers, and have stepped on a lot of Skynet holes. If you are a programmer, it is difficult for beginners to use Skynet directly. It is more suitable for the developers who understand the server development and master the C language. Skynet framework is a high concurrency game server architecture based on C and Lua, which is written by the former director of Netease's big talk and dream, and the technical big cow Yunfeng. On the market, the game server architecture uses C + +, Java is more, and C is rarely used. At the beginning, I was also aiming at high concurrency processing. In addition, I was born in C language. I thought that the foundation of C language was relatively good, and I was confident to start the underlying architecture written by C, which should not be difficult for me. In fact, there are not many c languages in the open source code of Skynet architecture. It is more than enough to spend a few days reading through it. The message processing inside the network layer is streamlined and interesting, basically concentrating the essence of server code. Children's shoes engaged in server development suggest downloading [Skynet source code]( https://github.com/cloudwu/skynet.git )Let's see. There must be a lot of inspiration.
The underlying network interface provided is only a small part of the Skynet framework. After the network layer receives and receives the message, it forwards it to the upper layer "service" to process. The services here are also written by C. of course, this is not pure C code. Most of them are written by Lua. Each Lua service can be regarded as an independent Lua virtual machine, which ensures the independence of data and the data isolation between services. Lua server uses coroutine to process messages, which ensures high concurrency of messages.
Skynet framework is widely used in the game industry. In Ali games, Skynet is widely used in the mainland of wind. The popular Three Kingdoms annals use Skynet. After all, cloud wind has already run to Ali. There is no reason not to promote its own framework under our own doors
Finally, the purpose of this article is to see if there are children's shoes who want to learn Skynet. If so, I will open a Skynet learning column to teach you how to use Skynet to build servers step by step. Your enthusiasm is my motivation for writing articles ~ ~ ~ ~ if you like, pay attention to me~

Recommended Today

Deep understanding of HTTP protocol

*Foreword: I’d like to share with you an article about my experience since I developed it, Let’s share a personal understanding of HTTP* -Maojiale😊 What are the methods of HTTP? HTTP 1.0 defines three request methods: get, post and head HTTP1.1 adds five request methods: options, put, delete, trace and connect What are the specific […]