- Support for User-Defined Network Layer
The functions publish and remote_actor were overloaded to allow user-defined network layers such as OpenSSL; see this mailing list discussion and the doxygen documentation of util::input_stream, util::output_stream and util::acceptor for more details.
- Shutdown Function
The new shutdown() function closes all network connections, stops the scheduler and deletes all of
libcppa's singletons. It is strongly recommended to call this function before returning from main(), especially if you are connected to remote actors.
- Syntactic Sugar for Synchronous Messaging
Synchronous message handling using futures is flexible but sometimes too verbose.
auto future = sync_send(...); handle_response(future, ...); // event-based API receive_response(future, ...); // blocking APIVersion 0.4 provides some syntactic sugar to make your code more compact. Whenever you send a message and immediately wait for the response, you can write the following instead.
sync_send(...).then(...); // event-based API sync_send(...).await(...); // blocking APIFurthermore, there is a feature request for a continuation-passing style API to enable developers to easily encode "send X then receive Y then send Z" message flows (see Issue 58 on GitHub).
- Local Groups & Remote Actors
Local groups, as returned by calling group::get("local", ...); or group::anonymous(), are now not-so-local. It is possible to send a local group to a remote actor and let the remote actor join the group. Whenever an actor sends a message to the group, the message is send back to the owning process if needed and forwarded to all subscribers from there, including remote actors. This approach certainly does not scale for largely distributed groups, since it is N-times unicast*. However, it paves to path for more use cases of "local" groups and we are working on scalable group communication as well.
* The N in this case is the number of hosts and not the number of remote actors.
Wednesday, August 22, 2012
Version 0.4 released
The main feature of version 0.4 is a streamlined and bugfixed network layer. Of course, there are some new features as well: