Ssrc Wisp Event-based distributed service framework
Ssrc Wisp (pronounced source wisp) allows you to rapidly build event-based distributed services in C++. Events are delivered as native C++ data structures, avoiding the complexity and performance cost of manipulating intermediate serialization formats. Services may send/receive point-to-point messages or send/receive events to/from groups of services using the same communication API. Ssrc Wisp is suitable for constructing custom enterprise services and back-end services for Web applications, such as Web Wispers.
For more information, read the overview.
Version | Source | License | Changes | Documentation | Reports |
1.3.1 | wisp-1.3.1.tar.xz | LICENSE | CHANGES | 1.3.1 API | Test Code Coverage |
1.3.0 | wisp-1.3.0.tar.xz | LICENSE | |||
1.2.5 | wisp-1.2.5.tar.xz | LICENSE |
A Simple Example
Wisp services communicate via events, implemented as messages. A set of related messages forms a protocol, implemented as a C++ struct containing message types and meta-data describing the relationships between messages. For example, messages may be organized to implement remote method invocations (a two-way call) or isolated event deliveries (a one-way call).
The following code listing defines the messages required to communicate with an echo service, which sends back to the client the text received in an echo request.
Wisp services implement event-processing functions named
process_request
and process_response
to
receive asynchronous events. Also, they can use I/O-based
continuations to process replies to asynchronous two-way calls.
The following code listing defines the echo service, which recognizes two EchoProtocol messages: EchoRequest and Stop.
Wisp services run as independent processes, subject to operating system process scheduling and memory protection. This approach results in more robust and easier to manage services than services hosted in application servers executing threads inside a shared memory space.
The following code listing creates an executable program from EchoService.
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/.