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:
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
CONS
2. Use an In-memory temporary database solution
PROS
CONS
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.
i'd go with option 3 ... using a separate schema or database with the same structure/infrastructure as your live database.
PROS
CONS/things you'll still need to solve:
Normally when you have a guest based system providing sample data, you don't point to the live database for these users - you point them to a special guest version. There are many reasons for this, but the main one is that you can roll the database back to a checkpoint of the sample data without affecting the live users.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.