On Jan 3, 2:43 pm, "Josiah Carlson" <[EMAIL PROTECTED]> wrote:
> On Jan 3, 2008 8:55 AM, Rob McMullen <[EMAIL PROTECTED]> wrote:
>
> > Maybe a pure message passing scheme would result in less coupling, but
> > I've found message passing systems to be debugging nightmares.
> > Granted, most of my message passing experience is multiprocessing with
> > MPI, but it scars you. :)
>
> You mean like wx.lib.pubsub?  I mention it because I've found it to be
> quite convenient for plugging things together without needing to know
> about widget hierarchy, object relationships, etc.  I haven't altered
> my editor to use it fully (right now, I'm using the standard wxPython
> event system, manually reordered handling, etc.), but newer tools I'm
> writing for other projects use it.
>
>  - Josiah

Yes like pypubsub (note: I moved pubsub module out of wx.lib last year
into its own project: pypubsub, at http://cheeseshop.python.org/pypi/PyPubSub
on cheeseshop. Robin has not yet integrated the new version into wx).

As Rob mentioned, messaging can increase the difficulty of debugging
but I find that the level of effort required depends a lot on the
library. E.g. with proper logging and some automated sanity checks by
library, errors are more easily traced (the new pubsub will be quite
powerful that way).

I'm looking at enabling pubsub to support layered architectures. E.g.
if bottom layer of an application (furthest away from user) emits
messages of type A, then next layer up can (but doesn't have to) make
these subtopics of itself, e.g. B.A. In this case anything listening
for topic B messages will get the B.A messages too (though it would be
up to each layer to "publish" topics). This capability still needs
proper specification.

Oliver

Reply via email to