Sending messages to external program

Mar 8, 2006 at 8:24pm

Sending messages to external program

Hi, hope this question isn’t covered elsewhere, but I searched and didn’t turn anything up…

I’m using jitter for gesture recognition, and I need to feed the results (a list of ints) to a separate standalone java program.

The only thing which I’ve thought of so far is to use an mxj object in max to send out the info via tcp/ip to the other program. This seems a bit much though, to send via tcp/ip within the same machine, if it’s even possible.

Are there any simpler ways to do this?

Mar 8, 2006 at 10:13pm

it’s certainly possible, and probably the easiest way. using local
sockets doesn’t take much in the way of resources, and provides an
alternate synchronization/serialization paradigm for you so you can
avoid a lot of the messiness with concurrent programming. plus it’s
easily cross-platform compatible, and distributable if you ever want
to run the two modules on separate machines.

my only suggestion would be to consider udp instead of tcp, since you
don’t need a lot of the junk tcp provides when you’re not actually
going out over a potentially lossy network.

best regards,

Mar 9, 2006 at 5:12am

Yeah David, Richie is right – I think using UDP packets to communicate
between processes is pretty standard.


Mar 9, 2006 at 4:03pm

Thanks for the feedback. I had some code from another project using tcp/ip which I thought I would just modify, but I’ll look into UDP also as you advise.


You must be logged in to reply to this topic.