Android -> Ruby Server Interface -> Mongodb

Posted by MRabRabbit on Programmers See other posts from Programmers or by MRabRabbit
Published on 2014-05-29T06:06:10Z Indexed on 2014/05/29 9:40 UTC
Read the original article Hit count: 532

Filed under:
|
|
|

I've been wrecking my brain about this for a few days. I'll run my scenario by you and hopefully you can help me. In my head this is how it goes:

I have an Android App.

I want my Android App to make (function) calls to a MongoDB database via a Ruby Interface on the Server.

e.g. Android app sends a HTTP GET ? with the function name, let's say getFriends for this user

Ruby Interface receives this request from the app, grabs a thread from a thread pool and calls the appropriate function call implemented in Ruby, to the Mongodb.

Ruby Interface gets results from Mongodb and sends a HTML POST to the Android app. So that's how I think it works.

I know about the ruby driver for mongo db, and interacting with the mongodb from ruby but, how do I make a ruby back end listen for incoming messages and should these messages be done through sockets or a http interface ala Net::http in ruby?

© Programmers or respective owner

Related posts about android

Related posts about ruby