views:

151

answers:

1

I have a simple jruby+swt based client that collects data on an occasionally connected PC. Now I need to push those records to the server (Rails 2.3). Should I use ActiveMessaging, ActiveResources or Ruby XMLRPC.

This is my current understanding:

  • ActiveMessaging - best if server to client communication is needed

  • ActiveResources - hyper opinionated client to server CRUD

  • RubyXMLRPC - discontinued in Rails 2+. Flexible but lends itself to poor design.

I would a appreciate additional perspective, best practices, and the quick and dirty.

Thanks.

A: 

ActiveMessaging is meant for asynch communication, so if you are looking for the server to send back a message to say 'yes, I got this and processed it', then you are out of luck. (I would know, I am the maintainer for the project.) Also, to send a message, you need to connect to a broker, and depending on firewalls, etc. this may not be possible.

Some kind of http communication is more likely to work out, and if you have structured or complex data to send over, xml would make sense as a message format.

While opinionated, REST and ActiveResource are well documented and supported, so why fight it? That's what I would probably use, especially since you are using a Rails server.

As for xmlrpc, I think your own comments give good reasons to disqualify this option.

Andrew Kuklewicz