Hi Jean-Marie,

the most used approach is very similar to the static method one in the example, but to store the game data in a database instead. The static method approach really is just for the purpose of the example, and I agree, it's not a good idea for a production application.

Still I'd consider using continuations though, they're supposed to make things easier ;-)

You can also have stateful components that remember their own state:
http://rifers.org/wiki/display/RIFE/Stateful+components

You could combine that with session state storage, instead of using the client side:
http://rifers.org/wiki/display/RIFE/Configurable+state+storage

Hope this helps.

Best regards,

Geert


On 09 Jan 2007, at 17:39, Jean-Marie Galliot wrote:

I am just starting to experiment with RIFE. I feel the power of it despite the lack of documentation. I particularly miss some conceptual background
info.

To be concrete, I have one question:

I want, say, to program a small game as a pilot, very much like the ones in the examples. I need (I think) some kind of state preservation for keeping the current status of the game. I want to keep it simple for know so I don't
want to go into the continuation approach.

If I look at the similar examples, I see to ways this sate management is
resolved :

Either they use a game id passed from element to element. A static method
getGame of some class serves as a repository of games.

The other approach uses the HttpSession but directly, bypassing the normal
shielding of RIFE (setRawAccess sort of...)

Would it be possible to use a session but by the "normal" mecanisms of RIFE
(without using the above trick).

I also don't like using the static method approach with look to me not very
Web oriented (what would happen in a clustering env?)

I am sure that there is a better way but I have not been able to discover it
by myself.

Thanks for any hint.


--
View this message in context: http://www.nabble.com/State- management-tf2947240.html#a8241395
Sent from the RIFE - users mailing list archive at Nabble.com.

_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to