Hi,
On Apr 20, 2005, at 4:18 PM, Mathieu Longtin wrote:
I like the idea, but I'd like to understand a bit more what/how it does its thing.
Looking at your example, its unclear to me how consumers and producers are distinguished by the bus. If I call
In my current design, there is no diference between consumers and producers. I should have used better variable names.
The single restriction is that the bus does not send a message to the sender. So if you post a message into the bus, all the listeners will get it, except the sender.
I suppose you could change attach into two methods: attach for sessions who want to send messages, and listen for read-only sessions.
$kernel->post($bus1, "some_message", "some", "args");
Does the bus do something like this?
$kernel->post($consumer2, "some_message", "some", "args"); $kernel->post($consumer2, "some_message", "some", "args");
the first is $consumer1 but yes.
Also, why do producer need to attach themselves? If the bus is a session with an alias, anyone can post a message to it, no?
Yes, that's another way we could improve it. If the bus does not require attachment to send messages, we only need a "listen" or "attach" method to connect sessions interested in getting this stuff.
My design was influenced by my current needs. One of the reasons I posted here, is to know if this stuff is useful to anybody. If it is, I can clean it up and put it on CPAN.
I would like to discuss this further to clear the design of a system like this though.
Best regards, -- Pedro Melo Cunha - <[EMAIL PROTECTED]> Novis Telecom, S.A. - Dir. Rede - ISP <http://www.novis.pt/> Edif�cio Novis - Estrada da Outurela, 118 - 2795-606 Carnaxide tel: +351 21 0104340 - fax: +351 21 0104301
smime.p7s
Description: S/MIME cryptographic signature
