The following diagram illustrates the technical architecture of the Loktantra system.

Architecture Diagram

Architecture Diagram

The table below is the list of the software recommended for the solution.

Loktantra Software Specifications
Software spec Version
Web Server Apache 2.0
Application Server Tomcat 5.5
Development Kit JDK 1.5
Spring 2.5
Hibernate 3.2
Database MySQL 5.0

Application tier

The application tier consists of the application execution environment (container) along with the various tiers required to support the core application functionality. The diagram below represents a horizontal view of the business functions along with the layers of the application.

Application server container

In order to service a performing, secure and robust application environment is required. In most systems this resolves to a suitable execution environment or container to host applications and provide the infrastructure and basic plumbing for deployment and management of the system components. The following basic options exist:

  • J2EE application server based environments
  • Microsoft .NET / Windows server based environments
  • Bespoke environments, based on lower-level execution environments such as custom application environments in UNIX or J2SE standard JVM environments

Given the number of concurrent user and the business functionality required, a bespoke environment is not recommended. Commercial application servers have been developed, stabilised and optimised over a number of years. A bespoke solution would only present unnecessary risk and increased level of effort to develop.

The current market for J2EE application servers has matured significantly over recent years. Both IBM WebSphere and BEA Weblogic are still considered the industry leaders in the commercial space. There has also been a strong push in the open source application server space with products such as JBoss and Tomcat. Tomcat servers along with J2EE environment are likely to be preferable for Loktantra, based on the architectural and platform needs.

Web tier

The Web Tier will be responsible for:

  • Serving HTML pages
  • SSL encryption
  • Load balancing of requests to the Application Tier
  • Asset Caching

SSL encryption will be software based and use industry standard certificates such as those provided by VeriSign. Load balancing will be achieved through a plug-in provided by Jboss . Caching of assets such as images and Cascading Style Sheets (css) will be performed by the web tier. Apache has become a standard for many J2EE based websites (with a 75% market share) and is recommended for this solution.

Presentation layer

The application will be build using industry-standard Spring MVC framework, supplemented by Struts Tiles [Spring is a open source J2EE services framework]. Spring provides additional components that will help in rapid development of J2EE applications. The presentation layer will be responsible for constructing of pages and validation of form data. It will use a flexible Tiles templating framework to enable pages to be presented differently, corresponding to Loktantra’s back office and service provider’s different website needs.

The tiles framework will provide an framework to simply choose different templates where as the underlying business layer would be same. So the same application can server different look and feel based on the user type.

Business logic layer

All front-end business [service layer ] components will be developed using the Spring framework and will follow accepted J2EE patterns. Service objects themselves will be developed in Java e.g. email, database access, messaging, utilities etc. The business logic layer will also provide exception and error handling, error logging and auditing services.

The framework will combine together with Spring’s

  1. Inversion of Control [IoC] and
  2. Aspect oriented programming support.
  3. Pojo based development

Inversion of Control

IoC is a powerful principle applied via a container that injects dependencies into configured components. IoC decouples application code from its configuration. For instance, objects are not concerned with their dependencies, so they may focus on their responsibilities. Additionally, by migrating resource configuration and referencing outside of compiled code, the application is more manageable to shifts from development-specific resources to production resources and environments that are in between.

To properly employ IoC, we found that an application’s code needs to follow stricter Java programming principles—specifically coding to interfaces. Interfaces, among other things, promote better collaboration because dependencies are lightened and implementation changes are isolated. From an IoC perspective, interfaces allow for the pluggable nature of dependency injection.

Aspect oriented components

Aspects enable modularization of concerns such as logging management that cut across multiple types and objects Spring provides ability to associate aspect using configuration files across components.

Loktantra application uses Spring AOP for following purposes:

  1. Declarative caching management
  2. Declarative logging management
  3. Declarative Security management
  4. Declarative performance measurement [ optional – only used in non production environment for performance testing ]

POJO based development

The application, is build using Plain Old Java Objects (POJO). Alternatively we could have used EJB’s. The strength of stateless session EJBs is their remoting capabilities and transaction management. The server side application satisfied the remoting requirement by exposing service beans via Spring’s HTTP Invoker architecture. Transaction management was provided by Spring’s transaction abstraction layer.

Data and integration services layer

Integration with the Loktantra SICAP systems and databases environment will include:

  1. An open and extensible layer for future integration needs e.g. Loktantra has plans to rollout out an EAI solution in the future.
  2. Hibernate ORM mapping will be used to perform Read / Write access to the Loktantra Central Database.

In order to meet these needs, the Data and Integration Services Layer will provide a level of abstraction between the business logic layer and the communication layer.

Webservices

Necessary service will be exposed from Loktantra application using Web services. Spring offers a JAX-RPC factory that produces a proxy for a Web service. Similar to other spring beans, the factory bean is configured outside compiled code, making the application more flexible.

The solution will involve the deployment of a Services tier, to web-service-enable core platform capabilities within the BAN-S system and expose these to support inbound and outbound data delivery. We propose the use of a standard web service framework based on Spring Web Services to enable such a solution.

Caching

The application layer will completely leverage open source caching technology to enable the solution. The following industry strength open source caching frameworks will be evaluated, and correspondingly one of them will be identified to be implemented in order to provide a scalable object and fragment caching solution for the application tier:

  • OSCache,
  • EhCache, and/or
  • Terracota for cluster-wide caching.

The high-level application caching solution will involve the following:

  • Create an entity / content object cache layer by integrating the ORM Framework – i.e., Hibernate, with the selected caching framework
  • Support page level caching by integrating the presentation framework of the application, Spring MVC, with the selected caching layer

EhCache integrates well with Hibernate and Spring which is recommended

Data tier

The data tier will consist of both a database and a file store, with a proprietary store being used by the search tool to store configuration, rules and search indexes. The data tier will be accessible by the data access layer. Based on the current financial status the proposed database is MySQL.

Overall solution architecture

The solution would be based on Java/J2EE platform with MySQL as the backend. The system would comprise of spring framework as the container, using Spring MVC/Tiles at the presentation tier and Hibernate as the back-end tier. Hibernate would render database independence to the system. Quartz would be used to schedule admin jobs. Log4J with JCL bridge would act as the perfect logging system. The UI would make use of JSP technology using JQuery for AJAX requests. For authentication/authorization the system would make use of Spring Security and would make integrate with OpenID. The system would make use of ANT as the build tool.

Installation setup step for developer

Steps for local setup of the development platform

    3. Import the project into the Eclipse Workspace
    4. Copy the file local.properties.sample as local.properties
    5. Modify the local.properties file to suit your system needs
    6. You are ready to go and build
    7. Deploy the system onto your favorite container, such as, Tomcat 5.5

Backup and Recovery strategy

The mysql database is backed up using shell scripts that essentially perform mysqldump. Periodically these are archived to tape by our system administrator.

The source code base is located in the SourceForge repository, and the basic backup and recovery infrastructure is in place. Additonally system administrator performs regular file system backups on tape.

Management of code / development / developers

Any and all developers are welcome to contribute to the system. Please raise all your development modules in the Project Tracker and attach your code base as a patch. Make sure you licence all your code under the Apache Public Licence Version 2.0. Except this licence your code would not be accessible. The main development team would review the source code and merge it into the main branch and run a build. Once, the main development team has the confidence in you, you would be granted commit access to the repository.

All development efforts would be monitored and respected by the Loktantra Development Team. You would be duly acknowledged for all your efforts.