From: Brian Candler Date: 2009-01-16T22:46:56+09:00 Subject: Re: Desktop <-> Web Thomas Sawyer wrote: > So I'm using Shoes on the front-end. And for the most part that's > working pretty good so far. Makes sense. Some years ago I wrote a system which used DRb over HTTP: I had to modify the DRb code slightly to do this (adding support for fastcgi server processes). That was nice as it let me use native Ruby objects, but if hashes containing just text are OK for you (and make sure they're only ASCII or UTF-8 text), xmlrpc should be fine. I did come across YAML RPC once; there's some code floating around on the net for that, but it's possibly stale now. I don't know if there's any sort of standard for "JSON RPC". I suspect it just means REST with JSON response objects. If you want to try that, and to keep as close to Rack as possible, then I suggest layering something very lightweight like Sinatra on top of it. Of course, Rails has render :json. Remember too that json supports *only* Unicode strings, so anything binary needs base64 encoding. Don't forget that your backend app will probably need some sort of authentication framework, possibly just HTTP Basic Auth for simplicity, to stop random clients making requests. Even if you don't use a browser as a front-end, you might be able to steal some ideas from those who do. e.g. http://beebole.com/blog/pure/generate-html-from-a-json-without-any-template-but-html-and-javascript/ Anyway, that's just a few random thoughts. Regards, Brian. -- Posted via http://www.ruby-forum.com/.