Boost logo

Boost :

Subject: Re: [boost] Is there any interest in a library for actor programming?
From: Charousset, Dominik (Dominik.Charousset_at_[hidden])
Date: 2013-05-18 10:59:27


> Have you defined a network protocol? If so, can I plug in my own in case I need to integrate with an existing messaging middleware such as ZeroMQ or DDS?

The default protocol is a simple, lightweight binary protocol. However, you can provide your own protocol by implementing cppa::network::protocol (you will most likely have to implement some other classes like cppa::actor_proxy as well).

And this is how you could use a custom protocol:

get_middleman()->add_protocol(new my_fancy_protocol); // registers your new protocol the libcppa's network stack

auto fancy_protocol = get_middleman()->protocol(atom("fancy")); // access custom protocol

fancy_protocol->publish(self, {host,port}); // make actor available to other peers

auto buddy = fancy_protocol->remote_actor({host,port}); // talk to a remote actor using the fancy protocol

Of course you would want to hide this for your users in real code with functions like fancy_publish(...) and fancy_remote_actor(...).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk