|
Boost : |
From: Yigong Liu (yigongliu_at_[hidden])
Date: 2007-07-19 02:55:01
Hello,
I have just uploaded a new release of the Join libray into boost vault under
Concurrent Programming.
For people who are not familiar with "Join", a short description is as
following:
Join is an asynchronous, message based C++ concurrency library. It is
applicable both to multi-threaded applications and to the orchestration of
asynchronous, event-based applications. It follows Comega's design and
implementation and builds with Boost facilities. It provides a high level
concurrency API with asynchronous methods, synchronous methods, and chords
which are "join-patterns" defining the synchronization, asynchrony, and
concurrency.
The major changes of this release are for simplification and efficiency
(executables are smaller and faster), summarized as following:
1. drop guard function in chord definitions:
Guards introduce complexity and overhead to the overall design. in its
current form, guards do not add much to the expressiveness of the original
join calulus which is solely based on names / channels; and from my initial
experience its usage is error prone and i didn't see a good solution from
discussions with researchers at Microsoft Research and Moscova INRIA.
2. drop supporting multi synch methods in a chord:
so a chord can have at most one synch method, that is consistent with
Comega and Join Java. From my experience of implementing over a dozen
samples, i found that rarely more than one synch method per chord is needed
(and researchers at Microsoft and Moscova expressed the same feeling).
Allowing single synch method per chord really simplifies the design and
implementation. Synch method calls now behave really like normal function
call: arguments are kept at stack, no need for queues; inside chord body, we
use normal "return" statement to return result to the caller of the only
synch method; also inside chord body exceptions are thrown using normal C++
"throw" and we don't need any tricks to pass results and exceptions among
threads. In case we do need to synchronize two synchronous calls we can
implement rendezvous similar to what Cw paper has described.
3. many changes have been done to reduce copy / buffering.
document is updated with design changes and add more info about
implementation and integration with other libraries.
to do next:
. better, earlier error reporting (compile time).
now many errors related to chord definitions are thrown at runtime as
exceptions. since the type info is already available, we should be able to
report them during compilation using some template programming. In boost,
what should i use similar to Andrei Alexandrescu's STATIC_CHECK()?
. more optimization, profiling and benchmarking
with the same source code and simple Jamfile, the tutorials are much
slower in Windows/VC++ than in Linux/g++ (my box has Centrino Duo). I didnot
find any profiling tools inside the downloaded VC++2005 express. Any
suggestions about profiling tools available in Windows? especially free
tools or open source tools?
. design revisit
considering possible rewriting of async / synch methods using "pimpl"
idiom so that they have better integration with STL and other libraries.
More info can be found:
Source code: http://sourceforge.net/project/showfiles.php?group_id=157583
Documentation:
http://channel.sourceforge.net/boost_join/libs/join/doc/boost_join_design.html
Website: http://channel.sourceforge.net
I'd really like (need) suggestions and corrections from more experts on this
small library to make sure i am on the right track. Could a initial review
be arranged for the Join library?
Regards
Yigong
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk