Hi again Michael,

Firstly, many many thanks once again for this. I am really appreciative of the in-depth explanations. Secondly, I am trying to use the TaggingPluggableProcessor you sent earlier, as follows:

        t = TaggingPluggableProcessor()
        t.add_processor(["Test",None,MyComponent()])

and I got this error:

[glori...@localhost Kamaelia]$ !py
python tagging_pluggable_orig.py
Traceback (most recent call last):
  File "tagging_pluggable_orig.py", line 190, in <module>
    t.add_processor(["Test",None,Seq( Pauser(),DataSource([1,2,3,4,5,6]))])
  File "tagging_pluggable_orig.py", line 100, in add_processor
    self.lookup[filter_component] = bundle
AttributeError: 'TaggingPluggableProcessor' object has no attribute 'lookup'

I didn't want to define the lookup dictionary before the constructor, because I don't think it should be shared among instances. Am I using the TaggingPluggableProcessor correctly? Can you please give an example where you add processors to it after it is instantiated?

Also, stepping back a bit and looking at my options, I think I know what will work quite well for what I need. Let's use the weather example I sent before. I will need the ability to start certain sets of components:

Pipeline(
        SubscribeTo("RAINDATA"),
        Seq("Sequence1",
                NotHome("NotHomeRightNow","Rain Sequence 1"),
                WindowsOpen("WindowsOpen","Rain Sequence 1"),
                Raining("Raining","Rain Sequence 1"),
                ReliableNeighbor("GoodNeighbor","Rain Sequence 1"),
                RNReached("GoodNeighborIsHome","Rain Sequence 1"),
                WindowsClosed("WindowsClosed","Rain Sequence 1"),
                SequenceComplete("SequenceComplete","End Sequence 1",True)
                )
        ).activate()
Pipeline(
        SubscribeTo("RAINDATA"),
        Seq("SequenceN",
                StormData("BadStorm","Bad Storm Sequence N"),
                SequenceComplete("SequenceComplete","End Sequence N",True)
                )
        ).activate()

ServerCore(port=1500, protocol = MyRainDataProtocol,
        socketOptions=(socket.SOL_SOCKET, socket.SO_REUSEADDR,
        1)).activate().run()

Then, after it is running, based on some outside event, bring down some of the existing pipeline(s) and add a new one with new weather conditions:

Pipeline(
        SubscribeTo("RAINDATA"),
        Seq("Sequence2",
                NotHome("NotHomeRightNow","Sun Sequence 2"),
                WindowsOpen("WindowsOpen","Sun Sequence 2"),
                Sunny("Sunny","Sun Sequence 2"),
                SequenceComplete("SequenceComplete","End Sequence 2",True)
                )
        ).activate()
But keep the server running and passing data to other subscribers. It seems that, to make it easier for myself, I should be able to bring up and down entire pre-configured pipelines, while the server component runs without interruption.

I think this implies that I need (1) an inter-process Backplane, so I can run separate processes which are able to subscribe to the same channel, and (2) a broadcast type Backplane, so all messages get sent to each group of Pipelines. Can I accomplish (2) with a UDP socket instead? Will ServerCore currently work via UDP? Does (1) require writing all of the socket I/O from scratch? Any suggestions you have which will help me keep this code very simple and easy to maintain over time is greatly appreciated. I've written big, complex socket I/O modules with my own custom protocols, and I don't want this to turn into such a project if it's not necessary.

Many thank yous in advance,
Gloria







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

Reply via email to