On Jul 6, 1:53 pm, JannaB <[email protected]> wrote:
> Then would the following be a problem in a controller  if concurrent
> users use the app at the same time  ?
>
>       socket = TCPSocket::new(@channel.serverip,
> @channel.port)
>       socket.send(s+"\n",0)
>       socket.close

>
> (multiple servers I am not concerned about -- one glassfish gem
> instance roars with all the horsepower this particular app ever needs
> -- but what WOULD happen if I ran this under multiple mongrel
> instances? Can't the same port be shared by multiple instances?)

The various instances would just be completely unaware that another
instance already had a socket.

if you had multiple instances inside a single glassfish process and if
you were storing socket in somewhere that persisted across requests
then it could potentially go wrong. No one's going to be very happy if
two different threads try to write to the same socket at the same
time.

Fred
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to