Design of Remorseful

565 views
497 views

Published on

Distributed User Management and Authentication Solution. Slide for my "Database Manage Systems Experiment".

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
565
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Design of Remorseful

  1. 1. Motivation Introducing Remorseful Summary... ... ...... Design of Remorseful A Distributed User Management and Authentication Solution Weisi Dai (09055029) Department of Computer Science and Technology Xi’an Jiaotong University Mar 14, 2012
  2. 2. Motivation Introducing Remorseful Summary... ... ...... Outline Motivation The Basic Problem That I Studied Previous Work Introducing Remorseful Technical Details Object Models
  3. 3. Motivation Introducing Remorseful Summary... ... ...... Distributed User Authentication Solution • mongoDB • HTML5 • Javascript • Application Roles • Users • Administrator(s)
  4. 4. Motivation Introducing Remorseful Summary... ... ...... Roles Users • Register • Pay • Choose Plan • Log in via clients Administrator(s) • Add and ban users • Add and edit plans • Add and modify peer servers info
  5. 5. Motivation Introducing Remorseful Summary... ... ...... We need a(n) solution • Simple • Effective • No Single-point Failure!
  6. 6. Motivation Introducing Remorseful Summary... ... ...... RADIUS abbr for Remote Authentication Dial In User System, RFC2865 • Complete Solution, both Commercial and Free • Our NIC uses that! • Designed for Accounting in Telecommunication Industry • Very very heavily used! • Complicated
  7. 7. Motivation Introducing Remorseful Summary... ... ...... MagiAdmin and OVpnUsrMng MagiAdmin, by Aveline Swan • PHP-based • Not Scalable • Not So Fault-Tolerant • Not Open-Source OVpnUsrMng • Python And Django based • SQLite as Database • Not So Scalable
  8. 8. Motivation Introducing Remorseful Summary... ... ...... Perfect Combination, Simple and Scalable Database: mongoDB K-V Store, NOSQL Web: Node.js Javascript on the Server Side OS: Unix like
  9. 9. Motivation Introducing Remorseful Summary... ... ...... User CREATE TABLE IF NOT EXISTS ‘Remorseful‘.‘User‘ ( ‘idUser‘ INT NOT NULL , ‘UserName‘ TINYTEXT NOT NULL , ‘Password‘ TINYTEXT NOT NULL , ‘Email‘ TINYTEXT NOT NULL , ‘Contact‘ TINYTEXT NULL , ‘Credit‘ INT(11) NOT NULL , ‘Banned‘ TINYINT(1) NOT NULL , ‘Plan‘ INT NULL , PRIMARY KEY (‘idUser‘, ‘UserName‘) , UNIQUE INDEX ‘UserName_UNIQUE‘ (‘UserName‘ ASC) , INDEX ‘Plan‘ (‘Plan‘ ASC) , CONSTRAINT ‘Plan‘ FOREIGN KEY (‘Plan‘ ) REFERENCES ‘Remorseful‘.‘Plan‘ (‘idPlan‘ ) ON DELETE NO ACTION
  10. 10. Motivation Introducing Remorseful Summary... ... ...... Plan CREATE TABLE IF NOT EXISTS ‘Remorseful‘.‘Plan‘ ( ‘idPlan‘ INT NOT NULL , ‘PlanTitle‘ TINYTEXT NOT NULL , ‘Bandwidth‘ INT NOT NULL , ‘Connection‘ INT NOT NULL , ‘MonthlyFee‘ INT NOT NULL , ‘Hidden‘ TINYINT(1) NOT NULL , PRIMARY KEY (‘idPlan‘, ‘PlanTitle‘) )
  11. 11. Motivation Introducing Remorseful Summary... ... ...... Record CREATE TABLE IF NOT EXISTS ‘Remorseful‘.‘Record‘ ( ‘idRecord‘ INT NOT NULL , ‘Service‘ TINYTEXT NOT NULL , ‘ConnTime‘ DATETIME NOT NULL , ‘DisconnTime‘ DATETIME NULL , ‘IP‘ TINYTEXT NOT NULL , ‘BandwidthUp‘ MEDIUMTEXT NULL , ‘BandwidthDown‘ MEDIUMTEXT NULL , ‘User‘ INT NOT NULL , PRIMARY KEY (‘idRecord‘) , INDEX ‘User‘ (‘User‘ ASC) , CONSTRAINT ‘User‘ FOREIGN KEY (‘User‘ ) REFERENCES ‘Remorseful‘.‘User‘ (‘idUser‘ ) ON DELETE NO ACTION ON UPDATE NO ACTION)
  12. 12. Motivation Introducing Remorseful Summary... ... ...... Payment CREATE TABLE IF NOT EXISTS ‘Remorseful‘.‘Payment‘ ( ‘idPayment‘ INT NOT NULL , ‘User‘ INT NOT NULL , ‘Via‘ TINYTEXT NOT NULL , ‘Amount‘ INT NOT NULL , ‘TIME‘ DATETIME NOT NULL DEFAULT now() , PRIMARY KEY (‘idPayment‘) , INDEX ‘User‘ (‘User‘ ASC) , CONSTRAINT ‘User‘ FOREIGN KEY (‘User‘ ) REFERENCES ‘Remorseful‘.‘User‘ (‘idUser‘ ) ON DELETE NO ACTION ON UPDATE NO ACTION)
  13. 13. Motivation Introducing Remorseful Summary... ... ...... Peer CREATE TABLE IF NOT EXISTS ‘Remorseful‘.‘Peer‘ ( ‘idPeer‘ INT NOT NULL , ‘IP‘ VARCHAR(45) NOT NULL , ‘PORT‘ INT NOT NULL , PRIMARY KEY (‘idPeer‘) )
  14. 14. Motivation Introducing Remorseful Summary... ... ...... EER Diagram Record Plan idRecord INT idPlan INT Service TINYTEXT User PlanTitle TINYTEXT ConnTime DATETIME idUser INT Bandwidth LONG DisconnTime DATETIME UserName TINYTEXT Connection INT IP TINYTEXT Password TINYTEXT Hidden BOOL BandwidthUp LONG Email TINYTEXT MonthlyFee INT BandwidthDown LONG Contact TINYTEXT Indexes User INT Credit INTEGER PRIMARY Indexes Banned BOOL PRIMARY Plan INT Payment User Indexes idPayment INT PRIMARY User INT Peer UserName_UNIQUE Via TINYTEXT idPeer INT Plan Amount INT IP VARCHAR(45) TIME DATETIME PORT INT Indexes Indexes PRIMARY PRIMARY User Created with MySQL Workbench 5.2.34
  15. 15. Motivation Introducing Remorseful Summary... ... ...... Summary: Remorseful • Consistent Front-End and Back-End • mongoDB for K-V Store, Distributed • 5 Tables, or 5 Models Any Questions?
  16. 16. Appendix. Remorseful online Released under GPL v3, and online at http://github.com/multiple1902/remorseful

×