{"id":338,"date":"2016-10-25T15:39:34","date_gmt":"2016-10-25T07:39:34","guid":{"rendered":"http:\/\/finaldie.com\/blog\/?p=338"},"modified":"2017-08-07T18:21:25","modified_gmt":"2017-08-08T01:21:25","slug":"boom-skull-engine-released","status":"publish","type":"post","link":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/","title":{"rendered":"Boom! Skull-Engine Released"},"content":{"rendered":"<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png\" alt=\"Skull\" \/><\/a><br \/>\nI&#8217;m so excited to announce that the <strong><em><a href=\"https:\/\/github.com\/finaldie\/skull\" target=\"_blank\" rel=\"noopener\">Skull-Engine<\/a><\/em><\/strong> is released today! Follow me to see the details.<\/p>\n<h2>What&#8217;s <em>Skull<\/em><\/h2>\n<p><em>Skull<\/em> is a serving framework, it can start fast, has high development productivity and is easy to maintain.<\/p>\n<h2>Why was <em>Skull<\/em> born?<\/h2>\n<p>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&#8217;s really a terrible experience for us. Life is short, let&#8217;s save the time on the most important things instead.<\/p>\n<p>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&#8217;s extremely hard to do that since we&#8217;ve already chosen a programing language for the project at the beginning. Have you ever regretted for the decision? For example, <em>C\/C++<\/em> 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, <em>Python<\/em> has rich packages to solve the problems, but the performance is much worse than <em>C\/C++<\/em>, 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?<\/p>\n<p>Besides, it&#8217;s hard for people to understand the complex program, especially when the code become more complex and huge, it&#8217;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?<\/p>\n<p>Under this situation, <em>Skull<\/em> was born to solve those kinds of problems.<\/p>\n<p><!--more--><\/p>\n<h2>Key Components and Features<\/h2>\n<p><em>Skull<\/em> is based on <a href=\"https:\/\/developers.google.com\/protocol-buffers\/\" target=\"_blank\" rel=\"noopener\">Google Protobuf<\/a> and <a href=\"https:\/\/github.com\/finaldie\/final_libs\" target=\"_blank\" rel=\"noopener\">Flibs<\/a>, target to <em>Linux<\/em> platform. It&#8217;s consist of 3 components:<\/p>\n<ul>\n<li>skull-engine<\/li>\n<li>skull-api<\/li>\n<li>skull-CLI<\/li>\n<\/ul>\n<p>And, it provides the following key features for users who want to build a project easily:<\/p>\n<ul>\n<li>Modular Development Environment<\/li>\n<li>Project Management<\/li>\n<li>Processize<\/li>\n<li>Lockfree Environment<\/li>\n<li>Native Monitoring<\/li>\n<li>Native Async Network IO<\/li>\n<li>Native Background IO Job<\/li>\n<li>Native Timer<\/li>\n<li>Multi-Language Support (<em>C\/C++<\/em>, <em>Python<\/em>)<\/li>\n<li>Integrated with Nginx<\/li>\n<li>Service Shareable<\/li>\n<li>Basic Functional Test Environment provided<\/li>\n<\/ul>\n<h2>Key Concepts<\/h2>\n<p>There are also 3 major concepts in <em>Skull<\/em>: <strong>Workflow<\/strong>, <strong>Module<\/strong> and <strong>Service<\/strong>. Before using <em>Skull<\/em>, let&#8217;s understand the core concepts first.<\/p>\n<h3>Module<\/h3>\n<p><em>Module<\/em> is a independent logic set, it defines what kind of data\/things we should use\/do in this step.<\/p>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_concept_module.png\" alt=\"Skull_Module_MM\" \/><\/a><\/p>\n<h3>Workflow<\/h3>\n<p><em>Workflow<\/em> is more like a <em>transaction rules<\/em>, <em>oriented automator<\/em> or <em>pipeline<\/em>, 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 <em>Skull<\/em>.<br \/>\nEach <em>Workflow<\/em> has its own <em>SharedData<\/em>, every <em>Module<\/em> belongs to this <em>Workflow<\/em> can read\/write it.<\/p>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_concept_workflow.png\" alt=\"Skull_Workflow_MM\" \/><\/a><\/p>\n<h3>Service<\/h3>\n<p><em>Service<\/em> is designed for managing the data, and provide a group of APIs to access the data. <em>Module<\/em> can use these APIs to access\/consume the data, then decide what you want to do. Also the <em>Service<\/em> is shareable, it&#8217;s highly recommended that users to share their <em>Service<\/em> to other <em>Skull projects<\/em>, to make the world better.<\/p>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_concept_service.png\" alt=\"Skull_Service_MM\" \/><\/a><\/p>\n<h3>Example of a Skull Application<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_high_level.png\" alt=\"Skull_High_Level\" \/><\/a><\/p>\n<h2>Performance<\/h2>\n<p>No one would care\/adopt a program, if it has a bad system performance result, so let&#8217;s see how the <em>Skull<\/em> performs.<\/p>\n<ul>\n<li>Testing Environment<br \/>\n<table>\n<thead>\n<tr>\n<th>Role \u00a0<\/th>\n<th>CPU<\/th>\n<th>Mem<\/th>\n<th>NIC<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>perf client<\/td>\n<td>4 vcpus 2.3GHz<\/td>\n<td>8GB<\/td>\n<td>100 Mbps<\/td>\n<\/tr>\n<tr>\n<td><strong>skull-engine<\/strong><\/td>\n<td>8 vcpus 2.3GHz<\/td>\n<td>16GB<\/td>\n<td>1Gbps<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Hard KPI<\/p>\n<\/li>\n<li>The response <em>Latency<\/em> must be lower than <strong>50<\/strong> milliseconds in 95%.<\/li>\n<\/ul>\n<p>Generally, the results are excellent in different scenarios, and as we expected, the <em>Cpp<\/em> module&#8217;s results are much better than <em>Python<\/em>&#8216;s, that is because <em>Python<\/em> has <em>GIL<\/em> to make sure its global state is correct, that hurts the performance in multi-threads cases. The detailed charts are listed below.<\/p>\n<h3>Single Cpp Module<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/perf_cpp_module_only.png\" alt=\"perf_cpp_module_only\" \/><\/a><\/p>\n<h3>A Cpp Module Calling a Service<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/cpp_module_calling_service.png\" alt=\"perf_cpp_module_calling_service\" \/><\/a><\/p>\n<h3>A Cpp Module Calling a Service(With EndPoint)<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/cpp_module_calling_service_ep.png\" alt=\"perf_cpp_module_calling_service_ep\" \/><\/a><\/p>\n<h3>Service Timer Job (Read)<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/service_timer_job_read.png\" alt=\"perf_service_timer_job_read\" \/><\/a><\/p>\n<h3>Service Timer Job (Write)<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/service_timer_job_write.png\" alt=\"perf_service_timer_job_write\" \/><\/a><\/p>\n<h3>Single Python Module<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/python_module_only.png\" alt=\"perf_python_module_only\" \/><\/a><\/p>\n<h3>A Python Module Calling a Service<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/python_module_calling_service.png\" alt=\"perf_python_module_calling_service\" \/><\/a><\/p>\n<h3>A Python Module Parsing Http Request<\/h3>\n<p><a href=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/python_module_http_parsing.png\" alt=\"perf_python_module_http_parsing\" \/><\/a><\/p>\n<h2>Last<\/h2>\n<p>Before finishing this article, let&#8217;s see how to create a <em>Skull<\/em> project within minutes:<\/p>\n<p><iframe class=\"giphy-embed\" src=\"\/\/giphy.com\/embed\/l0Hlxd8wRofoQs3bG\" width=\"480\" height=\"203\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>This is definitely a new experience of doing a project! Write the code happier and make the life easier! Share the <em>Skull Service<\/em> with others, help them to build their stuff much easier. Join me, let&#8217;s make the world better :) View the project at the <a href=\"https:\/\/github.com\/finaldie\/skull\" target=\"_blank\" rel=\"noopener\">Home Page<\/a>, feel free to try it, and press the <span style=\"color: #0000ff;\"><strong>Star<\/strong><\/span> button if you like it :D<\/p>\n<p>And, to discuss any issue\/questions, please Join the <a href=\"https:\/\/groups.google.com\/forum\/?fromgroups#!forum\/skull-engine\" target=\"_blank\" rel=\"noopener\">mail group<\/a> and send an email to <span style=\"color: #3366ff;\"><em>skull-engine@googlegroups.com,<\/em><\/span> or open an issue directly in <a href=\"https:\/\/github.com\/finaldie\/skull\" target=\"_blank\" rel=\"noopener\">Github:Skull<\/a> :)<\/p>\n<p>Next, I&#8217;ll write some articles, to deep dive in the details of <em>Skull<\/em>. Stay tuned&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m so excited to announce that the Skull-Engine is released today! Follow me to see the details. What&#8217;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 &#8230; <a title=\"Boom! Skull-Engine Released\" class=\"read-more\" href=\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/\" aria-label=\"More on Boom! Skull-Engine Released\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,5,23],"tags":[28,26,4,13,33,30,27,29,31,24,32],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Boom! Skull-Engine Released - Final Blog<\/title>\n<meta name=\"description\" content=\"Skull-engine is a serving framework, it can start fast, has high development productivity and is easy to maintain.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Boom! Skull-Engine Released - Final Blog\" \/>\n<meta property=\"og:description\" content=\"Skull-engine is a serving framework, it can start fast, has high development productivity and is easy to maintain.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/\" \/>\n<meta property=\"og:site_name\" content=\"Final Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hu.yuzhang\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-25T07:39:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-08-08T01:21:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png\" \/>\n<meta name=\"author\" content=\"final\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hyzwowtools\" \/>\n<meta name=\"twitter:site\" content=\"@hyzwowtools\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"final\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/\",\"url\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/\",\"name\":\"Boom! Skull-Engine Released - Final Blog\",\"isPartOf\":{\"@id\":\"https:\/\/finaldie.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png\",\"datePublished\":\"2016-10-25T07:39:34+00:00\",\"dateModified\":\"2017-08-08T01:21:25+00:00\",\"author\":{\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3\"},\"description\":\"Skull-engine is a serving framework, it can start fast, has high development productivity and is easy to maintain.\",\"breadcrumb\":{\"@id\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#primaryimage\",\"url\":\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png\",\"contentUrl\":\"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/finaldie.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Boom! Skull-Engine Released\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/finaldie.com\/blog\/#website\",\"url\":\"https:\/\/finaldie.com\/blog\/\",\"name\":\"Final Blog\",\"description\":\"As simple as possible...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/finaldie.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3\",\"name\":\"final\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g\",\"caption\":\"final\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Boom! Skull-Engine Released - Final Blog","description":"Skull-engine is a serving framework, it can start fast, has high development productivity and is easy to maintain.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/","og_locale":"en_US","og_type":"article","og_title":"Boom! Skull-Engine Released - Final Blog","og_description":"Skull-engine is a serving framework, it can start fast, has high development productivity and is easy to maintain.","og_url":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/","og_site_name":"Final Blog","article_publisher":"https:\/\/www.facebook.com\/hu.yuzhang","article_published_time":"2016-10-25T07:39:34+00:00","article_modified_time":"2017-08-08T01:21:25+00:00","og_image":[{"url":"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png"}],"author":"final","twitter_card":"summary_large_image","twitter_creator":"@hyzwowtools","twitter_site":"@hyzwowtools","twitter_misc":{"Written by":"final","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/","url":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/","name":"Boom! Skull-Engine Released - Final Blog","isPartOf":{"@id":"https:\/\/finaldie.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#primaryimage"},"image":{"@id":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#primaryimage"},"thumbnailUrl":"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png","datePublished":"2016-10-25T07:39:34+00:00","dateModified":"2017-08-08T01:21:25+00:00","author":{"@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3"},"description":"Skull-engine is a serving framework, it can start fast, has high development productivity and is easy to maintain.","breadcrumb":{"@id":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#primaryimage","url":"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png","contentUrl":"https:\/\/github.com\/finaldie\/skull\/wiki\/images\/skull_ring.png"},{"@type":"BreadcrumbList","@id":"https:\/\/finaldie.com\/blog\/boom-skull-engine-released\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/finaldie.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Boom! Skull-Engine Released"}]},{"@type":"WebSite","@id":"https:\/\/finaldie.com\/blog\/#website","url":"https:\/\/finaldie.com\/blog\/","name":"Final Blog","description":"As simple as possible...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/finaldie.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3","name":"final","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g","caption":"final"}}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/338"}],"collection":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":63,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/338\/revisions\/537"}],"wp:attachment":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}