Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Prototype - Command line, controllable, media player

by hossman (Prior)
on Nov 24, 2009 at 06:27 UTC ( [id://809009]=note: print w/replies, xml ) Need Help??


in reply to Prototype - Command line, controllable, media player

I've known various people who have implemented various systems like this. My main suggestion would be that instead of using named pipes, attempt to listen to a port. if you can, start the daemon; if you can't that means the daemon is already running and you should communicate with it (via that port).

This not only provides an easy way to deal with the "it died horribly and left the pipe file around" type problems (because if the process dies it won't be bound to the port anymore) but also allows you to do stuff like ... make HTTP your communication protocol. that way any HTTP client library can be used to talk to your server.

  • Comment on Re: Prototype - Command line, controllable, media player

Replies are listed 'Best First'.
Re^2: Prototype - Command line, controllable, media player
by Kirsle (Pilgrim) on Nov 24, 2009 at 19:31 UTC

    Good suggestion. I considered that initially (it would greatly improve cross-platform support since TCP sockets are pretty much universal, unlike unix-vs-win32 named pipes), but wouldn't there be the overhead (and therefore a delay) of opening a TCP socket each time the media player is commanded to do something else?

      Yep. Negligible.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://809009]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-18 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found