Online Contest

Hello everybody!

I want to create a web application with Vaadin, Hibernate and Spring.
This web application allow people to take part in an online contest.
Each contest has about 100 contestants. There will be an MC to run the contest.
The MC will click some button to send questions or suggestions to all contestants.
The contestants must receive those questions/suggestions immediately.
There will be an audience. They can see the result of 5 highest-scored contestants only.

I did implement the application with ICEPush (for the contestants use-cases) and Refresher (for the audience’s use-cases).
And it works.

But I’m worrying about the way I store the data, memory leaks and the scalability of my application.
Can anybody suggest me some solution. Which data to store in database, in session and static.
How to design the services, events. When a contestant subscribe to an event, when to push, when to free memory.

And if I want to scale up my application (to serve 200 300 or more contestant), is it possible and how?

I can’t answer all your questions here, but wanted to offer my opinion about a subset of them. When you say “static,” are you referring to static variables shared across instances of your Vaadin Application objects? If so, I would avoid this idea. Besides the obvious concurrency issues, you would be limiting your application to only run in a single JVM. If your app becomes larger and you want to scale your app to a cluster of servers, you’ll have to rewrite your app.

Except for the web UI info that Vaadin already stores in the session, I wouldn’t store anything else there. Instead, push scores and related info to the database. Then the “audience” code can pull info from there to keep that code separate.