c++ - Convert custom API to Ruby on Rails ActiveResource -
i have set of embedded devices run software written in c++. api communicate devices simple: get/set/acquire parameters , signals.
i'd implement common web application access of devices single point.
my idea add xml rpc interface devices , use activeresource access devices web server. combination doesn't seem used @ in practice.
i'm free choose protocol inside devices. recommendations?
if you're considering xml rpc i'm assuming have sort of web server running on device. choose restful web service on xml rpc. if designed have corresponding services on rails app.
for example:
http://somedevice/signals.json - gets signals
http://yourrailsapp/somedevice/signals.json - gets somedevice's signals; use id instead here if makes more sense (http://yourrailsapp/devices/1/signals.json).
Comments
Post a Comment