Boost logo

Boost :

Subject: [boost] [async] messages threads and networks
From: Scott Woods (scott_at_[hidden])
Date: 2010-04-23 20:26:48


Hi Boost,

Is anyone interested in a framework for asynchronous programming? This is
based on the
thinking contained in;

* SDL (http://www.sdl-forum.org/SDL/index.htm)
* Active Objects (http://www.cs.wustl.edu/~schmidt/PDF/Act-Obj.pdf)

SDL is the ITU standard for specification of signaling systems. AO is a
pattern for concurrent programming. These have been combined to create an
environment where objects exchange
messages, possibly between threads or even over networks. Objects are
created simply;

    id = create<object_type>();

and once created, anything can be sent to it;

    send( anything, id );

The framework takes care of threading, network addresses, queueing, encoding
and optimal I/O, as appropriate. Threads are equally simple to create;

    p = start<message_processor>();

and objects can be assigned to specific threads at creation time;

    id2 = create<object_type>( p );

A network server can be created as simply as;

    listen = create<socket_listen>();
    server = create<socket_server<my_server> >();

    service operational( "loopback:5500", server );
    send( operational, listen );

Connecting is equally simple;

    connect = create<socket_connect>();
    client = create<my_client>();

    service operational( "localhost:5500", client );
    send( operational, connect );

>From that point on, client and server can exchange messages
using the send primitive without any knowledge that messages are
actually travelling across a network. There is in fact no difference
between inter-thread messaging and inter-processes (i.e. for the
application).

Feel free to poke around in the software at;

http://groups.google.co.nz/group/pact-serialization/web

I am interested in a Boost review of this library but suspect it is
too large. It also overlaps with several existing boost components.
But good to get further opinions.

Cheers,
Scott


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