Skip to content

Asynchronous client and server for apache thrift implemented via boost::asio

Notifications You must be signed in to change notification settings

beschulz/thrift_asio

Repository files navigation

Thrift via boost::asio

Build Status

motivation

non-blocking

in time sensitive or "real time" applications, it might be desirable to use the RPC mechanisms of apache thrift in a non-blocking, asynchronous manner.

By using boost::asio for the implementation for the client transport and server no extra threads have to be created. The non-blocking server can serve multiple clients and can be polled/updated from the main thread (or any other thread that is convenient).

another advantage is, that the application developer is in control of when exactly the RPC callbacks are called.

An interesting read on the topic is The C10K problem.

bidirectional

Apache thrift by design employs a client server model. That is, a client initiates a request, the server fulfills it. There is no obvious way to perform bidirectional communication other than via the response to a request.

This implementation enables bidirectional communication without creating another network connection from the server to the client. For this to work, all rpc functions have to be marked as 'oneway' to keep the beck-channel free of packets.

design

This library is header-only. Also C++11 stl data-types are used in precedence over boosts wherever possible.

documentation

Read the API Docs

License

This library is Distributed under the Boost Software License, Version 1.0 .

Bugs

In case you find any bugs, please don't hesitate to contact me. Also pull-requests are highly apprechiated.

About

Asynchronous client and server for apache thrift implemented via boost::asio

Resources

Stars

Watchers

Forks

Packages

No packages published