New2RoR
2012-Feb-27 04:28 UTC
I would like to create a Ruby on Rails server that will listen to a port to accept data from internet
Hi, I am building a server web application using Ruby on Rails 3 that will listen to a port to receive data from a remote client. The data is gps location which I will then post it on a map on the server web page. I had read about Ruby language socket programming. But how to implement this in rails? In the controller section? I had search the internet but I can''t find a step by step guide to do this. Hope some one can assist me on this or provide pointers to links where by I can find the answer. Thanks, Kevin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Peter Vandenabeele
2012-Feb-28 11:50 UTC
Re: I would like to create a Ruby on Rails server that will listen to a port to accept data from internet
On Mon, Feb 27, 2012 at 5:28 AM, New2RoR <kevinpp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > I am building a server web application using Ruby on Rails 3 that will > listen to a port to receive data from a remote client. The data is gps > location which I will then post it on a map on the server web page. > > I had read about Ruby language socket programming. But how to > implement this in rails? In the controller section? > > I had search the internet but I can''t find a step by step guide to do > this. Hope some one can assist me on this or provide pointers to links > where by I can find the answer. >If I understand correctly, you will build 2 services: 1) an API that will receive the GPS data (locations) 2) a website (a GUI) that will show a map with the locations Both are perfectly possible with Rails. For (1) which API interface do you want to use. Does the remote client that will talk to your server have a standard API format? For (2) checkout the many existing solution for showing maps (e.g. from Google) with your own data points on it. You will typically not need direct "socket programming". Rails has default mechanisms for building an RESTful API. HTH, Peter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.