PDA

View Full Version : Hookup to current running sage, and perform actions?


alon24
06-26-2006, 11:50 PM
Is there a way to interact with sage from the outside, other than sending events (which are imited in number).

I want to have an external control program (don't know exactly what it will do, its just an Idea), that will interact with a "live" sage process and instruct it to do things.

Like the webserver, but not a web interface.

something like:
1.see if sage is running
2. hookup to sage (my external application)
3. perform actions (could be just data mining, doesn't have to be UI)
4. do some changes in db
5. logout of external program.

Otherwise, I will have to trigger this behaviour from sage itself and I would like to avoid that.

My current STVI handles ForceEpgUpdate by sending a "custom2event" to sage, and I had to insert a listener in sage to intercept that event and act on it.

As there are only a few numbered custom events, I am looking for a better way.

Can this be done?

GKusnick
06-28-2006, 01:04 AM
Sure, anything can be done if you're willing to write the code to make it happen. From Sage you can call arbitrary Java code that can (for instance) read commands from files, accept TCP connections, use JNI to create Windows pipes or event queues, or do pretty much any kind of IPC you like.

nielm
06-28-2006, 06:21 AM
Bear in mind that the webserver does everything you listed, so it is definately possible, you 'just' need to create the server, the client and the protocol :)