All Projects → PikaLabs → Pink

PikaLabs / Pink

Licence: bsd-3-clause
A high performance network library

Projects that are alternatives of or similar to Pink

Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+201.35%)
Mutual labels:  framework, network
Dedsploit
Network protocol auditing framework
Stars: ✭ 133 (-55.22%)
Mutual labels:  framework, network
Aplay
A Better(Maybe) iOS Audio Stream、Cache、Play Framework
Stars: ✭ 44 (-85.19%)
Mutual labels:  framework, network
Polymorph
Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
Stars: ✭ 364 (+22.56%)
Mutual labels:  framework, network
Transmittable Thread Local
📌 TransmittableThreadLocal (TTL), the missing Java™ std lib(simple & 0-dependency) for framework/middleware, provide an enhanced InheritableThreadLocal that transmits values between threads even using thread pooling components.
Stars: ✭ 4,678 (+1475.08%)
Mutual labels:  thread, framework
Jok3r
Jok3r v3 BETA 2 - Network and Web Pentest Automation Framework
Stars: ✭ 645 (+117.17%)
Mutual labels:  framework, network
Libmtev
Mount Everest Application Framework
Stars: ✭ 104 (-64.98%)
Mutual labels:  framework, network
Katanaframework
The New Hacking Framework
Stars: ✭ 502 (+69.02%)
Mutual labels:  framework, network
Hackers Tool Kit
Its a framework filled with alot of options and hacking tools you use directly in the script from brute forcing to payload making im still adding more stuff i now have another tool out called htkl-lite its hackers-tool-kit just not as big and messy to see updates check on my instagram @tuf_unkn0wn or if there are any problems message me on instagram
Stars: ✭ 211 (-28.96%)
Mutual labels:  framework, network
Grab
Web Scraping Framework
Stars: ✭ 2,147 (+622.9%)
Mutual labels:  framework, network
Pnet
High level Java network library
Stars: ✭ 49 (-83.5%)
Mutual labels:  framework, network
Oscpy
An efficient OSC implementation compatible with python2.7 and 3.5+
Stars: ✭ 65 (-78.11%)
Mutual labels:  thread, network
Ecs
ECS for Unity with full game state automatic rollbacks
Stars: ✭ 151 (-49.16%)
Mutual labels:  framework, network
Vsalert
An drop-in replacement for UIAlertController with more power and better looks.
Stars: ✭ 48 (-83.84%)
Mutual labels:  thread, framework
X
新生命X组件,数据中间件XCode、日志、网络、RPC、序列化、缓存、Windows服务
Stars: ✭ 1,322 (+345.12%)
Mutual labels:  thread, network
Ice
🚀 The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
Stars: ✭ 16,961 (+5610.77%)
Mutual labels:  framework
Tcp Shaker
💓 Performing TCP handshake without ACK in Go, useful for health checking, that is SYN, SYN-ACK, RST.
Stars: ✭ 289 (-2.69%)
Mutual labels:  network
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+5475.76%)
Mutual labels:  framework
Awesome Falsehood
😱 Falsehoods Programmers Believe in
Stars: ✭ 16,614 (+5493.94%)
Mutual labels:  network
Cidr.xyz
Web-based CIDR / netmask / IP address visualizer
Stars: ✭ 293 (-1.35%)
Mutual labels:  network

Pink

Build Status

Pink is a wrapper of pthread. Why you need it?

When you use pthread, you always define many type of thread, such as:

In network programming scenario, some thread used for accept the client's connection, some thread used for pass message to other thread, some thread used for communicate with client using protobuf.

So pink wrap a thin capsulation upon pthread to offer more convinent function.

Model

DispatchThread + Multi WorkerThread

Now pink support these type of thread:

DispatchThread:

DispatchThread is used for listen a port, and get an accept connection. And then dispatch this connection to the worker thread, you can use different protocol, now we have support google protobuf protocol. And you just need write the protocol, and then generate the code. The worker threads will deal with the protocol analysis, so it simplify your job.

Basic usage example:

PikaConnFactory conn_factory;
PikaServerHandle server_handle;
ServerThread *t = new NewDispatchThread(9211, /* server port */
                                        4,    /* worker's number */
                                        &conn_factory,
                                        1000,  /* cron interval */
                                        1000,  /* queue limit */
                                        &server_handle);
t->StartThread();

You can see example/mydispatch_srv.cc for more detail

HolyThread:

HolyThread just like the redis's main thread, it is the thread that both listen a port and do the job. When should you use HolyThread and When should you use DispatchThread combine with WorkerThread, if your job is not so busy, so you can use HolyThread do the all job. if your job is deal lots of client's request, we suggest you use DispathThread with worker threads.

Basic usage example:

PikaConnFactory conn_factory;
PikaServerHandle server_handle;
ServerThread *t = new NewHolyThread(9211, /* server port */
                                    &conn_factory,
                                    1000,  /* cron interval */
                                    &server_handle);
t->StartThread();

You can see example/myholy_srv_chandle.cc example/myholy_srv.cc for more detail

Now we will use pink build our project pika, floyd, zeppelin

In the future, I will add some thread manager in pink.

Dependencies

Performance

Test machines:

  --------         --------------
 |        |  <--- | Clients x200 |
 | Server |        --------------
 |        |        --------------
  --------   <--- | Clients x200 |
                   --------------

CPU, Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz, 24 cores

Memory, 142 GB

test program

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].