Call Girls in Dwarka Mor Delhi Contact Us 9654467111
ATM Terminal Services the RESTful Way
1. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
ATM Terminal Services the RESTful Way
JavaOne India 2013
Kausal Malladi
Srivatsan Sridharan
International Institute of Information Technology - Bangalore
May 9, 2013
2. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
About Me
An M.Tech. student from IIIT-B specializing in Computer
Science
Systems Engineer at Infosys Limited for 2 years
A B.Tech. graduate specialized in Information Technology
from JNTU, Hyderabad
Interests
Theoretical Computer Science
Machine Learning
Information Retrieval
Web Services
Hobbies
Occasional Blogging
Music
Cricket
My website - http://www.kausalmalladi.tk
JavaOne India 2013
3. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Agenda
1 Introduction
2 The Idea
3 Implementing the RESTful Way
System Architecture
How is REST effective?
4 Demonstration
5 Conclusion
JavaOne India 2013
4. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
REpresentational State Transfer
Roy Fielding (2000)’s dissertation
An architectural style!
Resource oriented
Resources identified by URIs (Uniform Resource Identifiers)
Stateless messages which are self descriptive
Resources - Conceptual target of a Hyperref
Resources - Retrieved as complete representation of concepts
JavaOne India 2013
5. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
REpresentational State Transfer
Multiple representations of data
XML, Plain Text, HTML, RSS, JSON...
All resources mapped to HTTP methods
GET, POST, PUT, DELETE (Universal Verbs)
URIs - Nouns
Transport level security!
A few DOs and DON’Ts on HTTP leads to REST style easily!
JavaOne India 2013
6. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Motivation
Design a robust e-voting system
Using most of the existing infrastructure (ATMs)
Minimize costs to governments
Highly scalable
Real-time Performance
Security and Voting guidelines to be adhered to!
JavaOne India 2013
7. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Why using ATMs?
Highly scalable infrastructure already setup
Good on-going research, to include Non-Financial Services
Few modifications to business logic and database schema of
Banks can result in incorporating several Non-Financial
Services
Issues to be addressed:
Increased load on Bank Servers
Heavy traffic flow all the way
Adherence to Banking and Voting process related issues
Security!
User Interface
JavaOne India 2013
8. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Architecture
Available Options
Simple extension to existing Architecture
Web Services
Simple extension isn’t effective!
Existing Architecture not easily known
Not an easy task
Huge loads on servers
Architecture is not same across all Banks
Web Services chosen because they can be plugged in
anywhere without much difficulty!
JavaOne India 2013
9. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
High Level Architecture
JavaOne India 2013
10. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Exposed Web Services
JavaOne India 2013
11. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Why REST over SOAP/WSDL?
REST is cleaner than SOAP
Safe encapsulation of Legacy systems
REST isn’t any obscure, its the way Web works aided with
some rules!
Plain Text Data exchange
Not many standards to follow other than basic HTTP
methods!
JavaOne India 2013
12. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Features in our system
Registration of Right to Vote
ATM Card registration for Voting
Robust e-Voting system
JavaOne India 2013
13. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Uncovering the e-Voting System
1 Voter requests for One Time Password (OTP) and List of
Candidates on SMS
2 User authenticates himself with ATM PIN and OTP
3 Interface to capture Votes for all elections is loaded
4 User enters the corresponding Candidate ID in the available
TextBox along with Voting PIN
5 Vote Count for corresponding candidate is updated
6 Instant result availability - key feature!
JavaOne India 2013
14. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
e-Voting : Interaction among Web Services
JavaOne India 2013
15. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Advantages of using REST style
Scalable Components
Simple interfaces
Independently deployable
Secure
Easy real-time deployment
Real-time performance
Multiple data formats
Lesser loads on servers
JavaOne India 2013
16. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Scalability
REST encourages using good practices for Scalability
Each Web Service can be deployed on a separate server
Ensures the services aren’t affected by performance
bottlenecks
Very close to real-time deployment
Easier Functional Scalability
More Non-Functional Services can be added to the ATM
Terminals
JavaOne India 2013
17. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Security
Security a serious issue!
ATMs in private networks of Banks
All messages transferred via SSL (Secure Sockets Layer)
Messages required to be transferred directly between the
Election Authority and the Client are encrypted using a shared
key (2048 bit) between ATM Terminal Client and Election
Authority
Bank merely forwards the messages to Election Authority but
will NOT be able to read it!
JavaOne India 2013
18. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Real-time Deployment
Web Services can be deployed on different servers as
interfaces are well-defined
Supports deployment on distributed servers
Real-time performance because no much interaction latency
Banks already have well set-up infrastructure and setting up a
robust infrastructure for Election Authority can handle huge
requests, which is a typical scenario of an e-Voting system
JavaOne India 2013
19. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Multiple Data Formats
Parsing XML is a costlier process
SOAP/WSDL allows only XML for interactions
XML, JSON, HTML, Plain Text are allowed in REST
Parsing one data format to other not required, as the Web
services can agree on a single data format as simple as Plain
Text for simplicity
JavaOne India 2013
20. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Load on Servers
In an application where large number of requests are to be
served, storing state information can lead to performance
bottlenecks
e-Voting is a system where almost 100000 clients may perform
some operation plus the normal financial transactions on ATM
terminals are also to be satisfied
In REST, the servers are not required to maintain state of
clients
Messages contain necessary information required for a Web
Service, including but not limited to state of the client
JavaOne India 2013
21. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
A Small Demonstration
All Web Services hosted on one machine only, this is just for
understanding of the application
JavaOne India 2013
22. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Winding it up...
REST style can facilitate many Non-Financial Services on
ATM Terminals
Performance guaranteed
Scalable, Real-time Deployment of Web Services to
accomplish several additional tasks on ATMs
Using REST and making excellent use of existing ATM-Bank
infrastructure, a robust e-Voting system can be developed
“Statelessness means that the client’s state is not maintained
by server, which states that the performance bottlenecks don’t
arise!”
JavaOne India 2013
23. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Questions?
JavaOne India 2013
24. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Acknowledgement
Mr. Sastry Malladi - Chief Architect, Stubhub
Inspired me to try on a big stage like this
Always provided several valuable ideas w.r.t. technology
My encounter with “REST” happened because of him!
Dr. L T Jayprakash - Associate Professor, IIIT-B
Gave me freedom to architect the system
JavaOne India 2013
25. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Connect!
JavaOne India 2013
26. Agenda Introduction The Idea Implementing the RESTful Way Demonstration Conclusion
Thank you!
Kausal.Malladi@iiitb.org
kausalmalladi@gmail.com
JavaOne India 2013