Post on 24-May-2015
description
Reactive Data System (EDA)
Project GuideProf. Chandrasekhar Ramanathan
Team Members:Bisen Vikrantsingh Mohansingh(MT2012036)
Kodamasimham Pridhvi(MT2012066)Vaibhav Singh Rajput(MT2012155)
Introduction
Reactive Data System Reactive Data System is a framework and
a software design approach that uses the principles of event-driven architecture for the design and implementation of data-intensive applications.
Event Driven Architecture EDA is a framework that promotes
production, detection, consumption and reaction to the events.
Event based applications will run on RDS framework.
Requirements
Functional Requirements API for registration of events and reactions to
application developer. Listener to check occurrence of Events Mapping of Events to their respective
reactions(SQL Query or Function call) Non Functional Requirements Cross-Platform and Load Balancing(threading) Flexible and Scalable in future Encryption of data to provide security
AnalysisChallenges - How to know event occurred?
Vendor specific functionNotify / alert
Trigger Pitfalls-
No Transaction (rollback or commit) Do not accept arguments / parameters No External Function call Slow
Custom ListenerWhat after event detected?
Thread per request Architecture
Design Approach and Architecture
EventEvent
Config.xmlConfig.xmlEvent TypeRepository
Event TypeRepository
ListenerListener
Caller UnitCaller Unit
ReactionRepositoryReaction
Repository
APIAPI
Invo
ke
Chec
k
(DB/xml)
(Thread per request arch.)
Application
EDA
Register
EventRepository
EventRepository
App. 1App. 1
Publisher APIPublisher API
Register
Chec
k
App. nApp. n...
trig
ger
Fetch
Para
meters
Call External Function
Set of Events & Actions for Admission Process
Mandatory ConventionTable on which DB event will occur should
have1 surrogate key1 column name for event detection status
Each Function registered as Action should have1 int parameter which will be surrogate
key of row got effected
Event & Action Registration – API [I]
/*
* REGISTER LIFECYCLE EVENT – Data State Change
*/
DB_Events dbe = new DB_Events();
//specify name of event, database Id , on which table it will happen and last is the name of surrogate key
dbe.register_Event("loginAction",1,"login","id");
//specify a set of rules for triggering event
String cons = " status = 'new' ";
//set constrainst
dbe.setConstraints(cons);
//Commit all the changes
dbe.save();
/*
* REGISTER ACTION as External Function call (You can register as many actions you want per event)
*/
FunctionReaction fr = new FunctionReaction();
//specify event_id, name and fully qualified function name which will be called whenever event occurrs
fr.registerReaction(dbe.getEvent_id(), "sendmail", "app.admission.SignUp.mailConformation");
fr.save(); This function must have 1 Int parameter, which will be surrogate key of row got effected
Event & Action Registration – API [II]
/*
* REGISTER MANAGEMENT EVENT - Timebased
*/
TimeEventsRegister time = new TimeEventsRegister();
// Specify EventName, DateTimeyyyy/MM/dd HH:mm:ss , int parameter
time.register_Event("RegistrationClosed" ,date Time, group_id);
//Commit all the changes
time.save();
/*
* REGISTER ACTION as External Function call (You can register as many actions you want per event)
*/
FunctionReaction fr = new FunctionReaction();
// Action I : Disable Registration
fr.registerReaction(time.getEvent_id(), “CloseApply" ,"admission.TimeEvent.setDisableGroupApply");
//Commit all the changes
fr.save();
// Action II : Seat Allocation
fr.registerReaction(time.getEvent_id(),”seatAllocate”,admission.Seatallocation.allocateSeat");
//Commit all the changes
fr.save(); This functions must have 1 Int parameter, which will be surrogate key of row got effected
Can be Embedded in Application (i.e., Publisher API), So even end users are also able to register their own events
Event & Action Registration – GUI [I]
Event & Action Registration – GUI [II]
Event & Action Registration – GUI [III]
Monitor Listener Unit
Revisiting Case Study – I (Admission Process)
ScenarioEnable Institute choice/Preferences filling and view status after Paying Fees
Disable Close Preferences filling & perform seat allocation after Round Closes
Some Interesting facts
• Response Time for Registration with Email verification link sending :
Without RDS With RDS
8.25 sec 0.25 sec
Individual Contributions
Bisen Vikrantsingh MohansinghEDA -Event Module (API)DatabaseUser Interface
Kodamasimham PridhviEDA - Dispatcher Module (Listener, Threading)Admission process Automation Architecture design
Vaibhav Singh RajputEDA - Action Module (External Function call)Time Based EventsTesting
Thank You