A decent way to manage users? (turn based game)

0 votes
edit:

Basically, I just want to know how an experienced person would check if the a user is already looged in, before logging them in on another device..

 

Im making an app version of a physical board game. Im trying to choose the best way to manage who is online etc. I am not using the app42 User Service. I was, but have decided to just use the Storage Service for the users, with a "status" property in each users json doc, which is set to either "online" or "offline". When logging in, the app needs to check if that user is already online (we cant have two devices logged in to the same user). So Im considering adding a "lastActionTime" property to each users json doc, which is the time when they last accessed the DB. And while the user is active in the app, even if they are not using the database, they will still update their "lastActionTime" property at regluar intervals. And When checking if a user is already online, It will also check if the "lastActionTime" was soon enough, and if not it will consider that user logged out.

Am I on the right track here?
asked Oct 11, 2015 in App42 Cloud API-BaaS by i_is_corbin (10 points)
edited Oct 11, 2015 by i_is_corbin

1 Answer

0 votes
Hello Corbin,

It looks good as per the requirement you have explained.

Let me know if you face any problem.

Thanks.
answered Oct 12, 2015 by rajeev.etc (1,660 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...