Transcript
Page 1: Reactive Data System

Reactive Data System (EDA)

Project GuideProf. Chandrasekhar Ramanathan

Team Members:Bisen Vikrantsingh Mohansingh(MT2012036)

Kodamasimham Pridhvi(MT2012066)Vaibhav Singh Rajput(MT2012155)

Page 2: Reactive Data System

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.

Page 3: Reactive Data System

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

Page 4: Reactive Data System

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

Page 5: Reactive Data System

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

Page 6: Reactive Data System

Set of Events & Actions for Admission Process

Page 7: Reactive Data System

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

Page 8: Reactive Data System

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

Page 9: Reactive Data System

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

Page 10: Reactive Data System

Event & Action Registration – GUI [I]

Page 11: Reactive Data System

Event & Action Registration – GUI [II]

Page 12: Reactive Data System

Event & Action Registration – GUI [III]

Page 13: Reactive Data System

Monitor Listener Unit

Page 14: Reactive Data System

Revisiting Case Study – I (Admission Process)

Page 15: Reactive Data System

ScenarioEnable Institute choice/Preferences filling and view status after Paying Fees

Disable Close Preferences filling & perform seat allocation after Round Closes

Page 16: Reactive Data System

Some Interesting facts

• Response Time for Registration with Email verification link sending :

Without RDS With RDS

8.25 sec 0.25 sec

Page 17: Reactive Data System

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

Page 18: Reactive Data System

Thank You


Top Related