Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Architecture Overview

massfords edited this page Mar 12, 2015 · 11 revisions

Overall Vision

Our overall vision is to create a web application that can assist scientists with managing the data associated with their experiments. We have decided to develop our project as a Java web application. A web application will easily allow multiple users to access our program from whatever internet-capable device they have available, such a workstation or a mobile device. Our team has significant experience in the Java development environment, so choosing a Java-based framework was considered the most efficient choice.

Diagram

architecture diagram

The app is divided into three main components.

  1. Web interface that the Admins and Scientists use
  2. REST services that provide access to the plates and experiment data
  3. Storage layer that handles the persistence of the domain objects

Technology choices

Domain Model

The domain model is implemented as simple POJO's with annotations to support serializing them to and from JSON.

Services

The service layer is modeled using Java interfaces that are annotated with JAXRS annotations. Apache CXF provides the framework for deploying the implementations as RESTful services.

One added benefit of using the standard JAXRS annotations is that we can leverage the capabilities provided by one popular implementation (Apache CXF) in order to provide strongly typed client API's in order to assist with future integrations. Obviously future integrators are free to choose any library that suits their needs, but if they happen to choose Apache CXF or a similarly compatible library, then they can use our interfaces directly in order to generate dynamic proxies to invoke our services.

Storage

The application storage is modeled using interfaces that define all of the basic CRUD and listing operations. This approach provides a layer of abstraction between the services and the underlying storage such that the core domain model and its services aren't tightly coupled to a relational database.

The initial implementation of the storage interfaces is provided by a set of JPA entities that mirror the domain classes. These entities are Java classes that are annotated with JPA annotations in order to handle the persistence in a declarative fashion. None of the JPA concepts have leaked into the interface signatures so it's conceivable that we could offer a completely different persistence provider if desired.

JPA Provider

Hibernate provides the implementation of the JPA specification. The storage implementation leverages a few Hibernate specific extensions but for the most part the entities are modeled with the standard JPA annotations. These extended annotations are not critical for the application's function and could be removed or replaced with another vendor (OpenJPA) if there were some need to migrate to another provider.

Database

The default database vendor is the H2 project. This is a SQL 92 compliant database that has wide support across major libraries like Hibernate and JPA.

Being vendor agnostic is a key design principle with WE99. We'll avoid any vendor specific queries or other enhancements. No vendor specific SQL, no stored procedures, and no assumptions about the platform executing our queries. This vendor agnostic layer is provided largely for free via the Java Persistence Architecture API. We can encode our DB access into our entities via annotations and an abstract query language that has late binding to a vendor specific query language at running.

Scaling

The initial deployment of WE99 is designed to scale vertically as opposed to horizontally. This could change by substituting the persistence layer with a NoSQL implementation.

User interface

The interface component of the application is an application based on Angular JS. This framework is an open source HTML 5 framework from Google. The application will have knowledge of the set of permissions in the application and render the UI accordingly. It will exercise the service components and allow the user to interact with the plates and experiment results. All of the interactions from the client to the server will be accomplished through the standard REST service interfaces.

Tech Stack

Management/Collaboration

GitHub - Provide source control and project wiki
JIRA - Provides online management for requirements Link

Presentation Layer

AngularJS, HTML5, Bootstrap - For web page display
D3 - Javascript library for dynamic interactions with experiment data

Other Services:
Bower - For front-end dependency control
Grunt - task automation (minify, etc)
Yeoman - generator for common tasks

Backend Layer

Java 8 language
REST service (JAX-RS) - Provides an interface to the frontend via REST methods
RDBMS (H2) - stores general application information such as plates, users, projects, etc
JPA (For ORM database operations)
Web Server (JBoss or Tomcat or Jetty, ...) - Hosts the web application

Other Services:
Apache Commons Math - For statistical analysis of results

Clone this wiki locally