Home - MauriceManning/SpringProto GitHub Wiki

The intent of this prototype is to demonstrate that a developer, using a framework such as Spring, can quickly wire together infrastructure services such as messaging, repository access, logging and performance metrics which enables the developer to focus on domain logic and deliver capabilities more efficiently.

There are three components in this project which run as individual applications. The traffic monitor component notifies the other component of traffic information via a message at regular intervals. The other two components, decision service and model engine, both receive each status update. The decision service simple logs that it has received the message. The model engine component starts a model run sub-component that connects with a repository and stores one line of traffic data.

While the domain logic is trivial, the architecture is quite powerful. The components represent cleanly separated areas of responsibility operating as independent service. They communicate in a very fast but asynchronous fashion. Each component can receive information of interest and publish data as well as events. Services can be scaled independently to meet the current processing needs of the system. The model run service is able to persist data objects in a repository without ever defining a mapping or creating a table. Both console and file logging is available to all components, the logging level can be tuned in a simple configuration file. Finally, detailed performance monitoring is available across the system and can be targeted at individual methods, classes or packages.

There are about three hundred lines of code to create and connect these components with each other as well as the support services. There are six configuration files. One file for each component which outlines the services as well as java beans that the component will require to deliver its capabilities. There is one configuration file for each of the infrastructure services; the logging configuration, the messaging configuration, the data source, and one for aspects configuration, where the performance monitoring is defined. While there is an initial investment of time to set up each configuration, subsequent development activities proceed at a rapid pace.

To run the prototype you must have ActiveMQ available and running. The prototype also requires access to an Oracle repository where you can create tables and add data. First start the applications for the listening services, decision service and model engine, then start the traffic monitor application.

This prototype uses the following versions of supporting technologies: Spring framework version 3.2 Spring integration version 3.0 ActiveMQ version 5.4 Hibernate version 4.1 See the pom.xml file for further details.