Hi,

some already know because I told it on IRC, but here the official
"request for discussion":

I don't like twisted. Why? It's a huge monster, including not only
stuff we need like xmlrpc and a web server but also stuff we don't
need and a main loop that is too complex. I saw in the code that it
waits for dead children not started by any part of twisted .. Hey,
that are my children, don't touch them! The next problem is, that we
have one xmlrpc server in the recordserver. But when the schedule
changes, Freevo has to ask the recordserver for a new schedule, the
recordserver can't send it to Freevo because a) freevo has no xmlrpc
port and b) if you have more than one freevo, how should the server
know that? And we need a way to send stuff to Freevo, like the
webserver may want to say 'start this audio playlist please'. 

A solution to all this (and more): we use pymbus. Mbus is a protcol
for host or link local communication. As the name says, it's a bus. So
every programm on the bus can get the messages (you can also send a
message directly). For detailed information, please look at
http://www.mbus.org. A brief summary:

o mbus is secure, it uses encryption on the bus. 
o mbus is plain ascii (after decrypted), so every app with the key can
  read it very easy and apps like mspy can be used for debugging and
  apps like mbussh can be used to send commands to an app
o you get notice when an app joins / leaves the bus
o you can define names for apps so you understand what they do
o you have events _and_ client server rpc communiaction. 
o Bindings for C/C++/Perl/Python

Example:
Freevo starts, joins the bus and ask: 
Freevo: I need recording informations. Anyone here can provide them?

Case a: recordserver is running:
RS: sure, I'm a recordserver, I can record dvb and analog. Here is my
current schedule.
Case b: no recordserver, Freevo still has no schedule and will never
aks again. When the recordserver starts:
RS: Hi, I'm a recordserver, here is my schedule.

Freevo knows there is a recordserver with the name RS on the bus and
the user wants to schedule something.
Freevo->RS (unicast): RS, please record xy
RS no everyone: my schedule changes: here is a new schedule
RS->Freevo: done!

Next is the webserver knowing that Freevo is running:
WS->Freevo: please play playlist xy

You have an isdn watcher and a new call comes in. It doesn't know
about Freevo at all:
ISDN: in case someone wants to know this: the telephone is rinning.
A special Freevo plugin notice that and mutes the background audio
playback.

And we can also remove the bad hacked network interface, you can send
events directly to Freevo:
app->Freevo: Button 'DISPLAY' is pressed
or
app->Freevo: Event(OSD_MESSAGE, arg='hi')

That's what mbus can do, and much more. Read the rfc on mbus if you
want to know more. The second lib pynotifier is a simple (!) main
loop. The author of pynotifier and the current maintainer of pymbus
(also using Freevo) also has a simple webserver and non blocking http
client. 


So, there is no need for twisted, mbus is the future[1]. And the
author of pynotifier will include pynotifier in Freevo when he has a
free weekend. 

Comments? Someone with a good argument against it?



Dischi


Footnotes: 
[1]  I better say it before you find out yourself: mbus was developed
     at the UCL in London and the University of Bremen. I also work at
     the University in Bremen and mbus was developed in our working
     group. 

-- 
Atheism: A non-prophet organization.


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to