A technical overview of Paperight site architecture

This is an unusually technical post for us: a description of what the Paperight website is made of. We’re very proud of the fact that Paperight is built from scratch using open-source technology, in part so that we can publish the code openly one day. (When we have the capacity to manage a public open-source project). I asked Shaine Gordon, lead developer at Realm Digital, to describe how the site is built.

From the outset, Paperight.com was designed with the goals of efficiency, scalability, speed and security.

This lead to the decision to use Java/JSP (GPL) as the starting point.

Apache Tomcat 7 (Apache Licence 2.0) was selected as the Java container, being the industry standard when it comes to ease of setup, and performance.

For the architecture, SpringSource’s Spring Framework (Apache Licence 2.0) was selected. This again was chosen due to its industry standard performance, efficiency, and large support community.

The front end runs on Spring MVC 3.1, using Apache Tiles for layout management. This is secured using Spring Security 3.1.

For domain object management and persistence, we chose to use JPA (Java Persistence API), backed by Hibernate, using JTA (Java Transaction API) transaction management to ensure data can be retrieved and persisted reliably.

For indexing and searching content, Apache’s Lucene was the framework of choice. This was then seamlessly integrated with Hibernate, using Hibernate Search (LGPL 2.1).

One of the core requirements was the ability to alter and watermark PDF documents on the fly. For this we chose Apache’s PDFBox (Apache Licence 2.0). Its ability to process documents quickly and it’s free, open licence made it the natural choice.

The backend management system requires large amounts of data to be processed, for example for product imports. This should be relatively transparent to admins, and also provide sufficient feedback on failed jobs and errors. To this end, we again chose SpringSource projects: Spring Batch and Spring Integration. Spring Integration is a Java “Spring-way” implementation of the famous “Enterprise Integration Patterns”.

The result is that Paperight.com runs on a stack of 100% free and open-source software, without in any way compromising reliability or performance. It could be argued that our choices actually increased reliability and performance, relative to proprietary alternatives.