I'm so excited to announce that the Skull-Engine is released today! Follow me to see the details.
Skull is a serving framework, it can start fast, has high development productivity and is easy to maintain.
Why was Skull born?
To start a new project, we usually need to read tons of documentations of the chosen framework/tech stack, then decide whether to use it and how to use it. It may take a week or more for a newbie, even for an expert, it sometimes still needs a batch of trivial efforts to build it from a scratch. It's really a terrible experience for us. Life is short, let's save the time on the most important things instead.
After we have a project, we will need to modify the code/configuration again and again, and do the test, sometimes we really want to switch to another language to solve a specific problem, but it's extremely hard to do that since we've already chosen a programing language for the project at the beginning. Have you ever regretted for the decision? For example, C/C++ provides high runtime performance, but the development cycle is very long, people should be really careful to deal with the low-level memory issues; On another hand, Python has rich packages to solve the problems, but the performance is much worse than C/C++, could we use them all in one program, to choose the right language in the right place, and the different language can communicate with each other very easily and smoothly?
Besides, it's hard for people to understand the complex program, especially when the code become more complex and huge, it's just like a big black box, and no one knows how it works, it would become un-maintainable since no one can see it clearly, even a basic workflow. Imagine that, how could a programmer figure out the basic workflow of a complex program without documentation in 5 minutes?
Under this situation, Skull was born to solve those kinds of problems.
Key Components and Features
And, it provides the following key features for users who want to build a project easily:
- Modular Development Environment
- Project Management
- Lockfree Environment
- Native Monitoring
- Native Async Network IO
- Native Background IO Job
- Native Timer
- Multi-Language Support (C/C++, Python)
- Integrated with Nginx
- Service Shareable
- Basic Functional Test Environment provided
There are also 3 major concepts in Skull: Workflow, Module and Service. Before using Skull, let's understand the core concepts first.
Module is a independent logic set, it defines what kind of data/things we should use/do in this step.
Workflow is more like a transaction rules, oriented automator or pipeline, it controls how the transaction works, execute the modules one by one until be finished. Multiple modules can be chosen to join in a workflow, and there also can be multiple workflows in Skull.
Each Workflow has its own SharedData, every Module belongs to this Workflow can read/write it.
Service is designed for managing the data, and provide a group of APIs to access the data. Module can use these APIs to access/consume the data, then decide what you want to do. Also the Service is shareable, it's highly recommended that users to share their Service to other Skull projects, to make the world better.
Example of a Skull Application
No one would care/adopt a program, if it has a bad system performance result, so let's see how the Skull performs.
- Testing Environment
Role CPU Mem NIC perf client 4 vcpus 2.3GHz 8GB 100 Mbps skull-engine 8 vcpus 2.3GHz 16GB 1Gbps
- The response Latency must be lower than 50 milliseconds in 95%.
Generally, the results are excellent in different scenarios, and as we expected, the Cpp module's results are much better than Python's, that is because Python has GIL to make sure its global state is correct, that hurts the performance in multi-threads cases. The detailed charts are listed below.
Single Cpp Module
A Cpp Module Calling a Service
A Cpp Module Calling a Service(With EndPoint)
Service Timer Job (Read)
Service Timer Job (Write)
Single Python Module
A Python Module Calling a Service
A Python Module Parsing Http Request
Before finishing this article, let's see how to create a Skull project within minutes:
This is definitely a new experience of doing a project! Write the code happier and make the life easier! Share the Skull Service with others, help them to build their stuff much easier. Join me, let's make the world better 🙂 View the project at the Home Page, feel free to try it, and press the Star button if you like it 😀
Next, I'll write some articles, to deep dive in the details of Skull. Stay tuned...