Hi,

I've created a new "PAR" chassis component. To give an idea of it's usage, 
this:

    Pipeline(
        PAR(
            Button(caption="Next",     msg="NEXT", position=(72,8)),
            Button(caption="Previous", msg="PREV", position=(8,8)),
            Button(caption="First",    msg="FIRST" ,position=(256,8)),
            Button(caption="Last",     msg="LAST", position=(320,8)),
        ),
        Chooser(items = files),
        Image(size=(800,600), position=(8,48)),
    ).run()

Is equivalent to this:

    Graphline(
         CHOOSER = Chooser(items = files),
         IMAGE = Image(size=(800,600), position=(8,48)),
         NEXT = Button(caption="Next", msg="NEXT", position=(72,8)),
         PREVIOUS = Button(caption="Previous", msg="PREV",position=(8,8)),
         FIRST = Button(caption="First", msg="FIRST",position=(256,8)),
         LAST = Button(caption="Last", msg="LAST",position=(320,8)),
         linkages = {
            ("NEXT","outbox") : ("CHOOSER","inbox"),
            ("PREVIOUS","outbox") : ("CHOOSER","inbox"),
            ("FIRST","outbox") : ("CHOOSER","inbox"),
            ("LAST","outbox") : ("CHOOSER","inbox"),
            ("CHOOSER","outbox") : ("IMAGE","inbox"),
         }
    ).run()

It's not "done" yet, but thought it worth sharing. 

Regarding TODO's, I'm planning on adding a "policy" argument that allows you 
to control what happens to inbound messages. Options for inbound messages 
include splitting, load balancing and pooling. There's probably other 
policies too.

For the curious, the code currently sits here:

http://code.google.com/p/kamaelia/source/browse/branches/private_MPS_PAR/Kamaelia/Kamaelia/Chassis/PAR.py

Incidentally, the name "PAR" is inspired by Occam's "PAR" control structure, 
indicating that the things inside run in parallel with each other.

Any comments or suggestions welcome.

Regards,


Michael.
-- 
http://yeoldeclue.com/blog
http://twitter.com/kamaelian
http://www.kamaelia.org/Home

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"kamaelia" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/kamaelia?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to