We are currently working on a new web application using Java and MySql. We would like to implement the guest login function. The idea is simple: anyone can log in as a guest user and gain access to a small predefined dataset with which they can interact, as if they were fully paid by customers.
This function must have the following attributes:
- Allow multiple simultaneous guest inputs without crosstalk
- When the guest session closes, any changes will be lost.
- Login to the guest system should not be too slow.
Here are a few ideas we came up with, although each has its own pros and cons:
1. Treat them like any other client and store them in the MySql database.
PROFI
- Easier to implement
- No significant differences may arise.
REDD
- Displays the current database with sample data.
- The problem of the "initial state" is not solved.
- Cleaning is not automatic
2. Use a temporary solution for the in-memory database
PROFI
- No crosstalk
- Can the original state be loaded as an image?
- Trivial cleaning
REDD
- The In-memory database and MySql may not support the same functions or in a different way.
- Possible scaling issues
My question is: what would be the best way to achieve this? Is there a better way to do this?
Thanks in advance,
Steve.
Steve source
share