To Dean Michael Berris:
You'd be better of doing data parallelism with Boost.MPI
No. Because I'm speaking about thread-based parallelism (with shared memory access). Processed-based parallelism and IPC supplement but don't replace thread-based parallelism in general.
and/or Boost.Asio's io_service run on multiple threads, and having independent tasks multiplexed across a number of processors (either through processes or threads)
Tie this tasks with the data they share and You will have an active object. If the tasks don't have shared data - they don't need an active object. I think - active object is built on task-based parallelism but it does not mean that "active object" should replace "task-based parallelism" everywhere.
But what you're describing is not the active object pattern. ;)
http://en.wikipedia.org/wiki/Active_object http://en.wikipedia.org/wiki/Active_object_(Symbian_OS) What about ma::echo::server::session class - is it an active object? http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio/example/chat/chat_c lient.cpp Is chat_client an active object? If "yes" then why? chat_client::write have no completion callback - and this is not enough sometimes (I can say "always", if You don't implementing "fire-and-forget" logic which is rather seldom). http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio/example/serializati on/connection.hpp s11n_example::connection is an active object and have completion callback... but it's much simpler then ma::echo::server::session_manager - I try to suggest "samples" that can help to build such a kind of complex active objects. http://www.drdobbs.com/go-parallel/blog/archives/2009/09/parallelism_sho.htm l
We are surrounded by parallelism even more so that serial activities. Social and biological systems are immersed in parallelism and these systems have worked out the kinks over millions of years. In biological systems, independent units perform simple computations or activities independently and in parallel. and IMPLICATIONS FOR COMPLEX REALTIME SYSTEMS: Complex real-time systems would be a sea of state machine objects interacting with each other. There will be low level state machines which would work together to implement high level state machine behavior.
Here's the place for active object pattern. Thanks for that attention that you have given to my question. Marat Abrarov.
-----Original Message----- Date: Sun, 7 Nov 2010 12:58:06 +0800 From: Dean Michael Berris
To: boost-users@lists.boost.org Subject: Re: [Boost-users] Does anybody interested in active object pattern? Message-ID: Content-Type: text/plain; charset=UTF-8 On Sat, Nov 6, 2010 at 10:56 PM, Marat Abrarov
wrote: Does anybody interested in active object pattern for massive parallelism
by means of C++? (Intel TBB doesn't offer a
similar approach)
I'm not sure how you think active objects help for massive parallelism because the active object pattern implies that you're serializing operations on a single object.
I've used Boost.Asio to implement Active Objects but only in cases where it makes sense -- like for example a concurrent accumulator or a concurrent resource handle (log sink for example). You'd be better of doing data parallelism with Boost.MPI and/or Boost.Asio's io_service run on multiple threads, and having independent tasks multiplexed across a number of processors (either through processes or threads).
I remember reading about Microsoft's efforts (through Herb Sutter) to introduce an "active" extension to Microsoft Visual C++, where you can easily make classes that instantiate to active objects. I'm not sure where that effort is now though.
HTH
-- Dean Michael Berris deanberris.com