注册 登录
自由的生活_软路由 返回首页

心想事成的个人空间 https://bbs.routerclub.com/?681 [收藏] [复制] [分享] [RSS]

日志

又一个比libevent更牛的事件驱动库: RiNOO

已有 1686 次阅读2013-8-10 13:21

这个是个好东东,可惜只能x64下用,而且还有其它限制。不过已经很强了!

https://github.com/reginaldl/librinoo

What is RiNOO

RiNOO is a socket management library. RiNOO sockets are asynchronous but "appear" synchronous. This is possible by using fast-contexts (see fcontext project). Code looks simple. The complexity of asynchronous sockets is hidden. RiNOO is a simple way to create high scalability client/server applications.

Tasks

RiNOO can run multiple tasks which can be considered as parallel, I/O wise. Tasks can be compared to threads, they run in dedicated lightweight stacks and can be co-operatively interrupted. They're also known as fibers (see Wikipedia definition). These tasks are managed in user-space and switching from one task to another require only a few instructions. That makes RiNOO's tasks fast and easy to work with, as they actually don't run concurrently, no locking is involved. When calling socket functions within a task, current task will be automatically interrupted and resumed when the socket operation has been performed.

Scheduler

RiNOO scheduler watches for file descriptors to get I/O event and resumes tasks accordingly. A task execution can be also scheduled at a specific time.

Sockets

RiNOO exposes a socket management API which deals automatically with tasks. The API is meant to be simple to ease socket management.

Fun & Profit

RiNOO saves a lot of time when writing client/server programs and its performances can be used for high scalability needs.


路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-4-28 20:55 , Processed in 0.045278 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

返回顶部