Boom! Skull-Engine Released

Skull
I’m so excited to announce that the Skull-Engine is released today! Follow me to see the details.

What’s Skull

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

Skull is based on Google Protobuf and Flibs, target to Linux platform. It’s consist of 3 components:

  • skull-engine
  • skull-api
  • skull-CLI

And, it provides the following key features for users who want to build a project easily:

  • Modular Development Environment
  • Project Management
  • Processize
  • 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

Key Concepts

There are also 3 major concepts in Skull: Workflow, Module and Service. Before using Skull, let’s understand the core concepts first.

Module

Module is a independent logic set, it defines what kind of data/things we should use/do in this step.

Skull_Module_MM

Workflow

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.

Skull_Workflow_MM

Service

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.

Skull_Service_MM

Example of a Skull Application

Skull_High_Level

Performance

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
  • Hard KPI

  • 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

perf_cpp_module_only

A Cpp Module Calling a Service

perf_cpp_module_calling_service

A Cpp Module Calling a Service(With EndPoint)

perf_cpp_module_calling_service_ep

Service Timer Job (Read)

perf_service_timer_job_read

Service Timer Job (Write)

perf_service_timer_job_write

Single Python Module

perf_python_module_only

A Python Module Calling a Service

perf_python_module_calling_service

A Python Module Parsing Http Request

perf_python_module_http_parsing

Last

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 πŸ˜€

And, to discuss any issue/questions, please Join the mail group and send an email to skull-engine@googlegroups.com, or open an issue directly in Github:Skull πŸ™‚

Next, I’ll write some articles, to deep dive in the details of Skull. Stay tuned…

8 thoughts on “Boom! Skull-Engine Released”

Comments are closed.

%d bloggers like this: