libssrcspread C++/Lua/Perl/Python/Ruby Bindings for Spread
libssrcspread provides C++, Lua, Perl, Python, and Ruby bindings for the Spread group communication system. Even though you can use the Spread C API directly in C++ code, error handling and data structure manipulation can be cumbersome. libssrcspread takes away some of that pain by providing automatic operation retries, automatic resizing of message and group buffers, exceptions for true errors, and safe connection management via the resource acquisition is initialization idiom.
libssrcspread works with Spread Toolkit versions 3.17.3, 4.x, and 5.0. For more information, read the overview.
Version | Source | License | Changes | Documentation | Reports |
1.0.15 | libssrcspread-1.0.15.tar.xz | LICENSE | CHANGES | 1.0.15 API | Test Code Coverage |
1.0.14 | libssrcspread-1.0.14.tar.xz | LICENSE | |||
1.0.13 | libssrcspread-1.0.13.tar.xz | LICENSE | |||
1.0.12 | libssrcspread-1.0.12.tar.xz | LICENSE | |||
1.0.11 | libssrcspread-1.0.11.tar.xz | LICENSE | |||
1.0.9 | libssrcspread-1.0.9.tar.xz | LICENSE |
A Simple Example
The main entry point to using the API is the Mailbox class, which is used to establish a connection with the Spread daemon, join/leave groups, and send/receive messages. There are a number of different ways to assemble and send messages. The following C++ code demonstrates a simple way of sending a string to a group:
The same example using Python:
Even though libssrcspread simplifies using the Spread group communication system, it is still a rather low-level API. To do anything of consequence, you will want to serialize and deserialize data structures to and from message buffers. Also, you will want to use an event loop to receive messages. Wisp provides that functionality and should be of interest to anyone building services using group communication.
This product uses software developed by Spread Concepts LLC for use in the Spread toolkit. For more information about Spread, see http://www.spread.org/.