Hello,
we are currently working on a new web application using Java and MySql. We would like to implement a "guest" login feature. The idea is simple: anyone can login as a guest user and get access to a small pre-defined dataset which they can then interact with as if they were fully paid up clients.
This feature should have these attributes:
- Allow multiple concurrent guest logins without cross-talk
- When the guest session closes any changes will be lost
- The guest login should not be too slow
Here are a few ideas that we have come up with, although each has it Pros and Cons:
1. Treat them as any other client and store them in the MySql database.
PROS
- Easier to implement
- No sublte differences can occur
CONS
- Polutes the live database with sample data
- Problem of "initial state" not solved
- Clean-up is not automatic
2. Use an In-memory temporary database solution
PROS
- No cross-talk
- Initial state can be loaded as an image?
- Clean up is trivial
CONS
- The In-memory database and MySql might not support the same features or differently
- There may be scaling issues
My question is: what would be the best way to achieve this? Is there a best-practive for this type of thing?
Thanks in advance,
Steve.