Ruby web service with REST support

Hi All,

I want to develop the webservice in Ruby that will support the REST API
calls.
Can anybody please suggest how to write such a service?

Regards,
Shubhada

···

--
Posted via http://www.ruby-forum.com/.

I would suggest you install the Sinatra gem, and read the
documentation attached to it. http://www.sinatrarb.com/

···

On 5 July 2013 19:50, Shubhada S. <lists@ruby-forum.com> wrote:

Hi All,

I want to develop the webservice in Ruby that will support the REST API
calls.
Can anybody please suggest how to write such a service?

Regards,
Shubhada

--
Posted via http://www.ruby-forum.com/\.

--
  Matthew Kerwin, B.Sc (CompSci) (Hons)
  http://matthew.kerwin.net.au/

I'm going to go out on a limb and make a crazy suggestion: Rails

···

On Fri, Jul 5, 2013 at 2:50 AM, Shubhada S. <lists@ruby-forum.com> wrote:

Hi All,

I want to develop the webservice in Ruby that will support the REST API
calls.
Can anybody please suggest how to write such a service?

Regards,
Shubhada

--
Posted via http://www.ruby-forum.com/\.

--
Tony Arcieri

I am still confused when to use phusion passenger and when to use rails?

···

--
Posted via http://www.ruby-forum.com/.

Alternatively Webrick which is part of the standard library can be used to
create HTTP services (including REST) more manually.

Kind regards

robert

···

On Fri, Jul 5, 2013 at 12:03 PM, Matthew Kerwin <matthew@kerwin.net.au>wrote:

I would suggest you install the Sinatra gem, and read the
documentation attached to it. http://www.sinatrarb.com/

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Tony Arcieri wrote in post #1114894:

I'm going to go out on a limb and make a crazy suggestion: Rails

Do u mean tomcat Apache+ rails+ ruby?

Can be rails integrated with tomcat?

Regards
Shubhada

···

--
Posted via http://www.ruby-forum.com/\.

They're orthogonal. Phusion Passenger is an Apache/nginx module which
manages Ruby web applications in a somewhat framework-agnostic manner.

Rails is a framework for building web applications. You can use Phusion
Passenger to serve Rails applications from Apache/nginx.

···

On Tue, Jul 9, 2013 at 9:29 PM, Prasad P. <lists@ruby-forum.com> wrote:

I am still confused when to use phusion passenger and when to use rails?

--
Tony Arcieri

Robert Klemme wrote in post #1114499:

···

On Fri, Jul 5, 2013 at 12:03 PM, Matthew Kerwin > <matthew@kerwin.net.au>wrote:

I would suggest you install the Sinatra gem, and read the
documentation attached to it. http://www.sinatrarb.com/

Alternatively Webrick which is part of the standard library can be used
to
create HTTP services (including REST) more manually.

Kind regards

robert

Are there any limitations with Webrick? or we can use it for any kind of
REST API request?
Is there any good tutorial for Webrick usage?

Regards,
Shubhada

--
Posted via http://www.ruby-forum.com/\.

+1 for Rails.

With jRuby, yes, tomcat (or any container) should work fine. Check out warbler.

···

-----Original Message-----
From: Shubhada S. [mailto:lists@ruby-forum.com]
Sent: Tuesday, July 09, 2013 2:09 PM
To: ruby-talk ML
Subject: Re: Ruby web service with REST support

Tony Arcieri wrote in post #1114894:

I'm going to go out on a limb and make a crazy suggestion: Rails

Do u mean tomcat Apache+ rails+ ruby?

Can be rails integrated with tomcat?

Regards
Shubhada

--
Posted via http://www.ruby-forum.com/\.

···

On Fri, Jul 12, 2013 at 4:51 AM, Tony Arcieri <tony.arcieri@gmail.com>wrote:

On Tue, Jul 9, 2013 at 9:29 PM, Prasad P. <lists@ruby-forum.com> wrote:

I am still confused when to use phusion passenger and when to use rails?

They're orthogonal. Phusion Passenger is an Apache/nginx module which
manages Ruby web applications in a somewhat framework-agnostic manner.

Rails is a framework for building web applications. You can use Phusion
Passenger to serve Rails applications from Apache/nginx.

--
Tony Arcieri

--
Yuan Jiang
http://blog.vetcafe.net
http://twitter.com/sleetdrop

Tony Arcieri wrote in post #1115188:

I am still confused when to use phusion passenger and when to use rails?

They're orthogonal. Phusion Passenger is an Apache/nginx module which
manages Ruby web applications in a somewhat framework-agnostic manner.

Rails is a framework for building web applications. You can use Phusion
Passenger to serve Rails applications from Apache/nginx.

Hi,
Thanks all for your inputs.

I have a different track now. What is difference between CGI based
applications and phusion passenger/ sinatra based web applications?

What could be the best option for REST implementation?

Regards,
Shubhada

···

On Tue, Jul 9, 2013 at 9:29 PM, Prasad P. <lists@ruby-forum.com> wrote:

--
Posted via http://www.ruby-forum.com/\.

robert

···

On Mon, Jul 8, 2013 at 7:42 AM, Shubhada S. <lists@ruby-forum.com> wrote:

Robert Klemme wrote in post #1114499:
> On Fri, Jul 5, 2013 at 12:03 PM, Matthew Kerwin > > <matthew@kerwin.net.au>wrote:
>
>> I would suggest you install the Sinatra gem, and read the
>> documentation attached to it. http://www.sinatrarb.com/
>
>
> Alternatively Webrick which is part of the standard library can be used
> to
> create HTTP services (including REST) more manually.

Are there any limitations with Webrick? or we can use it for any kind of
REST API request?
Is there any good tutorial for Webrick usage?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

I have a different track now. What is difference between CGI based
applications and phusion passenger/ sinatra based web applications?

Please start a new thread for that. See also
http://www.msamir.net/tutorial/smart-questions.htm

Regards

robert

···

On Mon, Jul 15, 2013 at 4:14 PM, Shubhada S. <lists@ruby-forum.com> wrote:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Robert Klemme wrote in post #1114704:

> create HTTP services (including REST) more manually.

Are there any limitations with Webrick? or we can use it for any kind of
REST API request?
Is there any good tutorial for Webrick usage?

webrick tutorial at DuckDuckGo

robert

Webrick is build in easy to use application server.

I read on the web, Webrick is good for development but not for
production. It has some known memory issues and HTTP parsing problems
also. So,

1. Is there any alternate for this?
2. How we can integrate it with Tomcat Apache?

Regards,
Shubhada

···

On Mon, Jul 8, 2013 at 7:42 AM, Shubhada S. <lists@ruby-forum.com> > wrote:

--
Posted via http://www.ruby-forum.com/\.

Hi,
Basically we want to make our application to be supported with REST
APIs.
We will receive the REST requests to Tomcat application server. And from
there we need to forward it to our application in ruby.

So I want to understand that what the exact things I will need to have
to complete this setup for REST communication. Few things I have listed
down.

1. The application
2. Tomcat apache server
3. Webrick (I am not sure about it... but I guess this would be required
to serve the REST requests.)
4. phusion passenger OR JRuby OR Sinatra (This is also I am not sure
about. But, for communication between Tomcat and our framework in ruby.)

Can anybody help me out to figure it out? Is more explanation is
required to understand the problem?

Regards,
Shubhada

···

--
Posted via http://www.ruby-forum.com/.

If you use Sinatra or Webrick there really seems to be no point in having
Tomcat in between. That just gives you one more step with latency. If
your application is running on JRuby the situation is different: you may be
able to have JRuby and Tomcat run in the same JVM and communicate via
function / method calls.

Cheers

robert

···

On Tue, Jul 9, 2013 at 4:57 PM, Shubhada S. <lists@ruby-forum.com> wrote:

Hi,
Basically we want to make our application to be supported with REST
APIs.
We will receive the REST requests to Tomcat application server. And from
there we need to forward it to our application in ruby.

So I want to understand that what the exact things I will need to have
to complete this setup for REST communication. Few things I have listed
down.

1. The application
2. Tomcat apache server
3. Webrick (I am not sure about it... but I guess this would be required
to serve the REST requests.)
4. phusion passenger OR JRuby OR Sinatra (This is also I am not sure
about. But, for communication between Tomcat and our framework in ruby.)

Can anybody help me out to figure it out? Is more explanation is
required to understand the problem?

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Thanks Robert.

It is sure that there is Tomcat server. So I will not use Sinatra or
Webrick. Also my application is pure Ruby based application.

So what is preferable in this case?

Also, when phusion passenger is used?

Regards,
Shubhada

···

--
Posted via http://www.ruby-forum.com/.