Re: Question about servlets and concurrency

2010-05-18 Thread Thomas Broyer

On 17 mai, 16:40, pianista  wrote:
> I'm developing a multiplayer game with GWT.
>
> The question is in my servletImpl, what happens when more than one
> user try to use it?
>
> I think, that servletImpl locks until the first user action finish,
> and then execute the second user action.

Only if your method is "synchronized", but I wouldn't do this as it
would hurt performances of your app as soon as there are more than a
few concurrent users.
By default they just execute concurrently, in different threads.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Question about servlets and concurrency

2010-05-18 Thread pianista
I'm developing a multiplayer game with GWT.

The question is in my servletImpl, what happens when more than one
user try to use it?

I think, that servletImpl locks until the first user action finish,
and then execute the second user action.

My idea is to put one servlet for each table of the game, how can I
perform this on gwt?

Excuse for my english.

Estoy desarrollando un juego en GWT.
La cuestión es, la implementación del servlet, se estará ejecutando
una sola vez en el servidor, por lo tanto, se bloqueará cuando alguien
haga una llamada, hasta que esta finalice, debería crear un servlet
por cada mesa de juego por ejemplo?

Y en lo que seria el portal donde estan las diferentes mesas a
escoger, etc, poner un servlet por cada usuario que se me conecte?

Saludos y gracias

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.