Case 1: A user open PayPal from some websites (e.g. shopping)
Case 2: A user login PayPal
Case 3: A user pay money using PayPal
Case 4: A user search payment history
Case 5: A seller login PayPal
Case 6: A seller configure payment when user access PayPal
Case 7: A seller search payment history
2. Constraints
Users: 100 Million users
Daily Active user: (assuming 1%) 1 million users
Average Transaction Per Second: 1 million users * 1.5 / (3600 * 24) = 17.36
Peak Transaction Per Second: 17.36 * 10 = 173.10 Tran/Sec
Assuming one machine's capacity is 10 trans/sec, requiring 18 machines.
Daily new user (assuming 0.1%): 100,000 users
Average new user Per Second: 100,000 / (3600 * 24) = 1.57
Peak new user Per Second: 1.57 * 10 = 15.7 User/Sec
Assuming one machine's capacity is 10 users/sec, requiring 2 machines.
3. Service:
User Service
(Register, Update, Remove, Login, Logout)
Transaction Service
(TranferFromOtherSystemInPaypal, TransferFromPaypalOut, TransferBetweenPaypals)
Record Service
(Insert, Delete, Search)
4. Data
User Account Data
(Database: MySQL)
Transaction Records
(Database: MySQL (double check functions))
Transaction Log
(Files)
5. Core Algorithms
1. Information Hashing
2. Transaction ACID
Atomicity: Log first (Commit or Rollback)
Consistency: Consistency checker
Isolation: Independent Transactions
Durability: Redundancy
6. All in One
Privacy Manager's Input: user name and password
Privacy Manager's Output: Hashed strings
No comments:
Post a Comment