views:

117

answers:

2

Hi I'm looking to write a multiplatorm tasks application for technical people. I want to handle as many platforms as I can (web, shell, desktop) and therefore I have decided to begin with a server/API.

I want to write it in Ruby, however i think that Rails is a bit too heavy for this, even though it would do the job. Sinatra also doesn't seem quite suited for the task.

All the server/API would do would be to translate simple requests to Database queries, and at a later stage some authentication and authorization.

So basically I want to know:

1) Should I use a REST api or a SOAP api?

2) Is there a framework for this? Or what is the closest framework avalable?

+3  A: 

1) REST, SOAP is a terrible system and its support in Ruby is quite lacking. REST, on the other hand, is basically the ruby default and takes very little effort to use, especially if you are using REST/JSON.

2) Sinatra and Rails are basically your options. It comes down to how complex this application will be. Sinatra can probably handle the task just fine, but Rails does much of the work for you at the expense of bloat. You will already be taking on some of the rails bloat if you use ActiveRecord for the database. When authentication and/or roles come into play, Rails has mature solutions for both. Without any additional information, I'd lean towards Rails as it does much of the work for you and, when written properly, can still be fairly fast.

Ben Hughes
I'll take bloat over pain almost any day.
thomasfedb
+1  A: 

Actually SOAP is very VERY easy to implement with AWS. At the same time, REST API is also very easy to implement. I have written a couple of different and parallel (JSON, XML and custom format) APIs with rails. Im sure the framework stack performance will not be your bottleneck, so don't bother with worrying about performance just yet. Your first bottleneck will anyhow be database and then perhaps requests per second.

All in all i would suggest going with Rails, it has a lot of work cut out for you.

Tanel Suurhans
The last commit to AWS was over a year ago, so I'd be hesitant to trust it out of the box.
Ben Hughes
I haven't looked into it myself that much but there are probably similar things out there, if its not even built into rails now.
Tanel Suurhans
AWS was built into rails, but after the advent of REST, core kind of killed SOAP with fire. I may just be bitter after having lost several weeks of my life dealing with poorly implemented ruby SOAP issues.
Ben Hughes