Spread

Tcl interface to spread

http://www.spread.org/

"Spread is a toolkit that provides a high performance messaging service that is resilient to faults across external or internal networks. Spread functions as a unified message bus for distributed applications, and provides highly tuned application-level multicast and group communication support."

In other words, a robust pub-sub messaging system.

   package require spread
   set mbox [spread connect 4803@localhost]

   $mbox send channela "hello, world"
   $mbox send -type RELIABLE_MESS channelb "hello, sailor"

   proc receive_message {mbox} {
       set message [$mbox receive]
       foreach {message_type sender groups message_text} $message {break}
       puts "message received is $message_text"
   }

   $mbox onmsg receive_message
   $mbox join somechannel

   $mbox leave somechannel
   $mbox disconnect

The biggest thing missing right now is the inability to handle membership messages. There's some other stuff I want to add (handle configuration for tuning, multigroup multicast) but haven't gotten to yet.


vkvalli Where can I find Tcl bindings to it. I could not find it in the website or in the download bundle. Was it generated using swig. -?

This looks really cool - I can really use this - are there any pointers to the code to make this happpen? Thanks - r

MG There is a mention of Tcl bindings on the Spread website [L1 ] - unfortunately, they refer to this Wiki page as the place to get them. It might be worth emailing the developers and asking if any of them has a copy of it, if you're interested in the code.

JR - I wrote this code and created this wiki page but never found a place for the code to reside. Until I can find a better home, I've put the code up at http://home.diphi.com/users/jeffr/software/

EKB You could put it on SourceForge [L2 ] or a similar open-source hosting site.


See also: