I’ve decided to build the playermanager app with a classic 3-tier architecture;
- HTML5 presentation tier
- Java RESTful web services middle tier
- MySQL database data tier
HTML5 presentation tier
This tier will be served alongside other static web content from the playermanager.net website on an Apache HTTP Server, passing any Java RESTful API calls to the Java tier below via mod_jk.
Java RESTful web services middle tier
A RESTful web services tier seems like a good a choice from a Service Oriented Architecture view, developing services so that different clients, e.g. mobile apps, browsers, FIFA, can make use of playermanager services via a RESTful API.
Choosing Java for the implementation of the RESTful API was a fairly easy decision. In my experience RESTful Java web services written in Jersey producing and consuming JSON are a very lightweight and productive option. Using Spring in the Java tier seemed like a good choice based on industry best practice and extensive Jobserve research; Spring Security to secure the RESTful API, Spring’s data access framework with Hibernate to simplify the reading and writing of data in addition to Spring’s dependency injection are all tried and trusted methods.
The Apache HTTP Server of the tier above passes on any Java RESTful web services API calls to an Apache Tomcat Java Server that services any URL beginning /api.
MySQL database data tier
MySQL was an obvious as its simple and open source with good developer and admin tools.
Currently all of the tiers above run on one CentOS machine, hosted by enciva for £10 per month, but there is scope for scaling this architecture when playermanager goes global. And will scale further with the addition of caching where appropriate, e.g. mod_cache and Ehcache.
So that’s the architecture in a nutshell. Next up is the development environment.
[…] of the challenges was to replicate the technical architecture of the production environment in the development environment. Installing Apache HTTP Server, Apache Tomcat and MySQL was a skoosh […]