Sending messages to external program

    Mar 08 2006 | 8:24 pm
    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 08 2006 | 10:13 pm
      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 09 2006 | 5:12 am
      Yeah David, Richie is right - I think using UDP packets to communicate
      between processes is pretty standard.
    • Mar 09 2006 | 4:03 pm
      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.