Tuesday 5 January 2016

Design User System

Scenario:

  • Log in/out
  • Register/Remove
  • Update
  • Forgot Password

Necessity:

  • No of Users
  • No of Peak users
  • Frequency of operators


Database (User Table):

  • long userID; P_KEY & Index
  • string userName; //max length as 50
  • string hiddenPass; //Not revertible and not easy to break using a brute force way (e.g. Hash).
  •                               //On-side encryption is not a good idea.
  •                               //Encryption with private key is still used (e.g. SSH).
  • int status; //activated? ban?


In Memory:

  • class User {
    • long userID; //P_KEY
    • string userName;
    • string hiddenPass;
    • int status;
  • }

  • class Session {
    • long sessionID; //P_KEY
    • long userID;
    • int devideType;
    • long timeOut; //ms
  • }

No comments:

Post a Comment