2016 Nov 01 By final 0 comment

After introducing Skull, this time let’s see how to install and use Skull to create a Skull project. Install Skull As mentioned in Introduction, Skull includes 3 majors parts: skull-core, skull-apis and skull-scripts. To play with it, we need to install Skull first, then use Skull commands to create/manage a Skull project. And as we expected, Skull can not only work in the big data center, but also in the resource very limited environment(embedded device), like Raspberry Pi, follow me to see how to do that 🙂 (more…)

2016 Oct 25 By final 7 comment

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…

2015 Jun 09 By final 3 comment

Everyday, we view a lot of websites, we see many videos without care about how it works. Do you want to know the details? just follow me to take a look, and to see how to control it as well. Basic workflow The workflow of browser — website. User inputs a website url Browser sends a dns query to dns server for this domain Browser receives the domain ip records Browser sends a query to the website server Browser receives the response data of from the website server Browser draws the website by the data User views the website contents…

2015 Feb 09 By final 0 comment

Why mutrace Recently, I want to profile the linux user lock(pthread mutex/rwlock) performance of a project, and there are few options for this purpose: valgrind(drd) systemtap(futexes.stp) lttng mutrace Finally, I selected the mutrace due to: valgrind(drd): It’s really slow, cannot provide credible information. systemtap(futexes.stp): It’s really great in profiling kernel, but the user layer profile need to additional efforts to setup the environment(some debuginfo pkg). lttng: There is only rpm pkg available on RHEL7, have to compile by myself. And there are more than one dependency lib, hard to fix the dependency issue. mutrace: There is no rpm pkg available…

2015 Jan 14 By final 0 comment

The flibs 0.7.4 has been released, which include the following changes: 1. Refactor all the makefiles, now it can be built in parallel 2. Refactor the header files folder structure, to make them more user friendly 3. Refactor some apis, to make them more user friendly 4. Replace malloc with calloc, to avoid potential un-initialization issue 5. Fix some type conversion incorrect issue, to make it more stablization 6. Fix the valgrind errors when building the libs on 32 bit platform For example, if you want to compile the static-link libraries, now just run: make -j4 make install And all…

2014 Dec 31 By final 0 comment

In the past year, for my personal projects, I did some achievements on them, and created some new projects as well, here I just summarize them for the recording purposes. Exist Projects flibs: upgraded to 0.6.6, including: The code base refactor fhash refactor flog optimization other bug fixing fenv: more user friendly, and add more than 30+ commits New Projects ftracer: C/C++ program tracer, which is useful in deep diving into a complex project quickly openwrt-scripts: now, it contain a dnsmasq config generator The Next And, in the next year, the draft plan as following: Separate fmem and fpcap from…

2014 Jun 04 By final 0 comment

Overview Aha, After some days, I have finished the refactor task for fhash, it’s really really big improvement for flibs, since many many components depend on it, such as: thread pool event framework pcap conversion lib log … Why need to do refactor The old fhash have some defects, such as: hard to iterate hard to extend hard to modify fhash when iteration some performance issues during iteration and fhash_set interface so finally, I decided to rewrite it. Before we go through the new design, let’s take a look on the old design at below section. Graph of Old/New design…

2014 May 22 By final 0 comment

Recently, I’m doing the refactoring job of fhash lib, which is a part of flibs, during the refactoring, I realised that to create a new open source project, we should have some basic steps, and follow the steps we will keep moving to right forward without lost. Steps Ok, let’s check the core steps: API Design Lock Down Write the code Write the UT Write the benchmarking tools Create a document of these APIs Announce your library The benefit of Writing Documents Most of developers don’t like to write the document, it’s so boring. But actually the document is not…

2014 Apr 08 By final 0 comment

Sometimes, we need the callgraph to help us reading the source code, especially the big C++ project, it’s really hard to understand the program quickly/easily. So, I wrote a tracer to record the whole code path, and then generate the callgraph by the trace file. It helped me to follow the correct code path, save a lot of time. The full introduce page at: http://finaldie.github.io/ftracer/ Have a fun

2013 Nov 16 By final 0 comment

Ok, let’s talk about one of the tips for writing Makefile, the magic character ‘@’ Before continue, let’s think about one thing: when you want to build a project, write a shell script or use the Make for building your project, which one would you prefer? Ok, I’ll choose Make, the reasons are: The shell script may contain the code which is specific for the target shell, for example: bash. So, if some users DO NOT use bash, the build process may stop unexpected. And the Make is stand alone, which can run on all UNIX like system, not depend…