Glad I could help. :-) Good luck and let us know how it works. It sounds like a good idea. The objects encapsulate all their state, components press the button methods and events are pushed down the pipeline.
I still think that you may need some sort of "bus" or "kernel" object for mailbox creation, but that may be a orthogonal issue. Have fun. That's the important thing. jb On Thu, Nov 12, 2009 at 7:47 PM, Rasjid <[email protected]> wrote: > > Hi Jim, > > On Nov 12, 1:17 pm, Jim Burnes <[email protected]> wrote: > > > Aha! Break the mold! :-) > > > > I'm playing with a bit of mold breaking myself. One of the results of > the > > way I wrote my Axon implementation was that you can pipeline full objects > as > > well as basic data types / strings etc. This is possible with Python, > but I > > don't know if Axon/Python leverages it (probably -- it just falls out in > the > > implementation). > > > > In any case, pipelining objects allows the receiving component to call > the > > methods of the object received. For example, if you're pipelining Car > > objects (say econo car, sports car, luxury car) into an emmissions > station > > component, you could call the "tune" method of the car coming through the > > inspection station and it would optimize according to the current > emmissions > > standards. I guess this is a form of polymorphism and I don't know if it > > breaks the Axon encapsulation model or not. Polymorphic pipelining? > Sounds > > like fun, but we'll see. > > Ah! I think you have given me the insight I needed. The problem > wasn't that I was passing objects around in Kamaelia and then acting > on those objects, it was that I was storing state in too many > different places. > > I think what I can do is fully encapsulate the state in my objects > being passed around, so that in some many ways Kamaelia just becomes > the conveyor belt and button presser, but the buttons are on the > objects themselves. It also decouples the objects from Kamaelia. So > in testing for example, I can just hard-code the sequence of steps to > be done and check that the 'process' works, without using Kamaelia at > all. > > I'll have a go and see how it all looks. :-) > > Cheers, Rasjid. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
