You are on page 1of 37

National Online Examination System: An Architectural Perspective

C-56/1 & B-30 Sector 62 -Noida

Pradeep Kumar , Pankaj Nirwan , P Govind Raj


ASCNT 2010 CDAC NOIDA

Background
NASSCOM Recommendation to the Government of India DIT realizing the initiative through C-DAC Objective: Design and Develop a robust, fault tolerant, secure, and scalable and an adaptive system through which examinations can be delivered on an on demand basis in selected examination centers spread across the country. Implementation Phases
Phase 1: Software for conducting exams at National Levels to be rolled out. Phase 2: Collaborative environment for collecting Questions into the question bank.
ASCNT 2010 CDAC NOIDA

Why not use Standard LMS ?


Designed to deliver content and manage the teaching learning process. Not designed to handle large system loads Computer Adaptive Testing is not incorporated.

ASCNT 2010

CDAC NOIDA

Functional Requirements
Registration
Demographic Details Photographs Booking of Exam Slot
Payment through Gateway/DD

Admit Card Generation Manage Questions


Matrix/Vector Creation Question Pool Management Module

Exam Conduction Result Generation


ASCNT 2010 CDAC NOIDA

Non Functional Requirements


No Vendor Lock in. Scale Out Vs Scale Up. Ease of Extendibility High System Throughput High Availability Security/Privacy Key Escrow Mechanisms
CDAC NOIDA

ASCNT 2010

High Level Architecture


Logging

UI on Flex

Security

ORM
ORM Hibernate

Transaction

Blaze DS Flash Player Browser/AIR


JDBC AOP Spring Core Tomcat on Tuned JVM Presentation Tier Context

DB

Persist ence ORM Tier

Remoting Tier Business Tier

Data Tier

ASCNT 2010

CDAC NOIDA

High Level Architecture

Logging

UI on Flex Blaze DS Flash Player Browser/AIR

Security Transaction JDBC AOP Spring Core

ORM
ORM Hibernate

DB

Context

Tomcat on Tuned JVM Presentation Tier

ORM Tier Data Tier

Persi stenc e

Remoting Tier Business Tier

AS3 VO

Java

ASCNT 2010

CDAC NOIDA

High Level Architecture

Logging

UI on Flex Blaze DS Flash Player Browser/AIR

Security Transaction JDBC AOP Spring Core

ORM
ORM Hibernate

DB

Context

Tomcat on Tuned JVM Presentation Tier

ORM Tier Data Tier

Persi stenc e

Remoting Tier Business Tier

AS3 VO

ASCNT 2010

CDAC NOIDA

High Level Architecture

Logging

UI on Flex Blaze DS Flash Player Browser/AIR

Security Transaction JDBC AOP Spring Core

ORM
ORM Hibernate

DB

Context

Tomcat on Tuned JVM Presentation Tier

ORM Tier Data Tier

Persi stenc e

Remoting Tier Business Tier

AS3 VO

Java VO

ASCNT 2010

CDAC NOIDA

High Level Architecture

Logging

UI on Flex Blaze DS Flash Player Browser/AIR

Security Transaction JDBC

ORM
ORM Hibernate

DB

Context

AMF

AOP Spring Core Tomcat on Tuned JVM

ORM Tier Data Tier

Persi stenc e

Presentation Tier

Remoting Tier Business Tier

ASCNT 2010

CDAC NOIDA

Business Tier: Spring


Aspect Orientation Design
Declarative Transaction Management Security

Lightweight
Use POJOs to manage transactions , persistence , communication , job scheduling , batch processing etc.

Productive
Easy to learn. Jolts productivity Award 2006
ASCNT 2010 CDAC NOIDA

Security Subsystem

Application Logic Security Subsystem


LDAP Biometric Authentication Database Storing Credentials
CDAC NOIDA

ASCNT 2010

Security Subsystem Architecture


Request

Login Credentials

BlazeDS Channel Authentication

FilterInvocationInter ceptor

MethodSecurityInter ceptor

Login Credentials are put in Flex User Interface.

The BlazeDS Channel Authentication would be done using Spring Security by contacting a User Repository.

URIInterceptor

TransactionProxy

Spring Security Interceptors

ASCNT 2010

CDAC NOIDA

Role Based Access Control


Access Decision through AcessDecisionManagers
Affirmative Based Access decision Manager Role Voter
Grant access of the resource to the user that has the same role as required by the resource

ASCNT 2010

CDAC NOIDA

DEPLOYMENT ARCHITECTURE
ASCNT 2010 CDAC NOIDA

Horizontal Clustered Environment

L B

L B Active Passive Clustered Load Balancer based on Apache mod_proxy , mod_proxy _balancer

ASCNT 2010

CDAC NOIDA

Horizontal Clustered Environment

L B

Tomcat 1

L B

Tomcat 1

Tomcat Application Server Load Balancing: ByByte / ByRequest

ASCNT 2010

CDAC NOIDA

Horizontal Clustered Environment

L B

Tomcat 1

MYSQL L B Tomcat 1 Design Deviates from conventional HA Solution

ASCNT 2010

CDAC NOIDA

Horizontal Clustered Environment in NOES


T E R R A
MYSQL L B

L B

Tomcat 1

Tomcat 1 C O T A

MYSQL

ASCNT 2010

CDAC NOIDA

Transparent Clustering

ASCNT 2010

CDAC NOIDA

Transparent Clustering
HA is available as a service of JVM

ASCNT 2010

CDAC NOIDA

KEY DESIGN PRINCIPLES

ASCNT 2010

CDAC NOIDA

Typical Exam Session Performance

ASCNT 2010

CDAC NOIDA

Typical Exam Session Performance

No DB I/O during Exam

ASCNT 2010

CDAC NOIDA

Typical Exam Session Performance

Hibernate 2nd Level Cache

ASCNT 2010

CDAC NOIDA

Typical Exam Session Performance

Async. Commit

ASCNT 2010

CDAC NOIDA

ISSUES FACED DURING IMPLEMENTATION


ASCNT 2010 CDAC NOIDA

Integrating Flex and Spring


Integration Flex and Spring
Not intuitive BlazeDS Extensions were designed Later , later 2009 community support

Transaction
MySQL Storage Engines Transaction Management for Non DB operations Use of Self Reference instead of this pointer
ASCNT 2010 CDAC NOIDA

Conclusion and Future Work


Exams Conducted
C-DAC PG Examinations C-DAC Recruitment Exams
Across the country in 10 C-DAC Centers for 10 days

300 successful runs of Exam Conduction DOEACC CCC Examination at 4 Regional DOEACC Centers.

Initial Stress Testing 5,000 users using 2 Tomcat Servers


Trying to scale further

Efforts in integration with Eucalyptus and federate across different C-DAC/DOEACC Data centres in the country. Using Query Optimization with Hibernate on the Fly.

ASCNT 2010

CDAC NOIDA

THANK YOU

ASCNT 2010

CDAC NOIDA

Aspect Orientated Design


Module 1 Module 1 Module n

ASCNT 2010

CDAC NOIDA

Aspect Orientated Design


Module 1 Module 2 Module n

Security

Logging

ASCNT 2010

CDAC NOIDA

Aspect Orientated Design


Module 1 (core Concerns) Module 2 (Core concerns) Module n (Core Concerns)

Security (Cross Cutting Concerns)

Logging(Cross Cutting Concerns)

ASCNT 2010

CDAC NOIDA

OOD to Model Cross Cutting Concerns


Module 1: Functional Req. Module 2: Functional Req.

Cross Cutting Concern

Cross Cutting Concern

ASCNT 2010

CDAC NOIDA

OOD to Model Cross Cutting Concerns


Module 1: Functional Req. Module 2: Functional Req.

Cross Cutting Concern

Cross Cutting Concern

Code Scattering Code Tangling

ASCNT 2010

CDAC NOIDA

AOD to Model Cross Cutting Concerns


Module 1: Functional Req. Module 2: Functional Req.

Weaved Cross Cutting Concern Aspect


ASCNT 2010

Weaved

CDAC NOIDA

Aspect Orientation at Business Tier


Logging Transaction Management
Declarative Transactions Annotations (@Transactional PROPOGATION_LEVEL)

Access Control Mechanism


Annotations based RBAC at method invocation level.

ASCNT 2010

CDAC NOIDA

You might also like