-
Notifications
You must be signed in to change notification settings - Fork 5
Architectural Design
Gumtree is written in Java. Java is an object oriented language that runs on the [Java Virtual Machine] (http://en.wikipedia.org/wiki/Java_virtual_machine) (JVM). This enables the execution of Gumtree on major operating systems without code modification.
Gumtree adopts a Java dynamic module system, called OSGi, to be the runtime system on top of JVM. The OSGi system supports plug-in architecture, which allows Java applications to be assembled by different modules. The dynamic behaviour of this module system enables modules to be turned on or off while the application is running. Gumtree uses the Equinox implementation of OSGi system.
OSGi is a service oriented platform that provides an environment for plug-in to register and to use services from other plug-ins. Service in OSGi is simple a plain Java object (POJO )with well defined interface (contract).
The desktop version of Gumtree is built on the Eclipse Rich Client Platform (RCP). Eclipse RCP is a set of graphica user interface plug-ins that runs on top of the OSGi system. It provides a native look-and-feel workbench container, with lots of additional features like window docking, file editing and help system support.
Eclipse Rich Client Platform |
Equinox OSGi Module System |
Java Virtual Machine |
On the server side, Gumtree uses Jetty web server to serve HTTP requests. It combines with Restlet for REST style web service support and Vaadin for creating Rich Internet Applications (RIA).
Restlet Service | Vaadin RIA |
Equinox OSGi Module System | |
Java Virtual Machine |
A Gumtree application is logically divided into three layers: generic application layer, domain specific layer and instrument specific layer. The application and domain specific layer are part of the Gumtree Framework project, which can be used for general application development. The instrument layer is used by building Gumtree applications for Bragg Institute's neutron beam instruments, and is included in the Bragg Extensions project.
- Generic Application Layer - The application layer provides all necessary building blocks for creating a generic application. This can be used to build any kind of desktop or web applications.
- Domain Specific Layer - The domain specific layer contains frameworks and tools for scientific purposes. This can combine with the generic application layer to build professional scientific applications.
- Instrument Specific Layer - The instrument specific layer customise the Gumtree scientific application for using it on a particular instrument.
Each block from above diagram is a high level application component that contains a set of plug-ins which run on the OSGi module system. Each plug-ins provides software components such as system services, entity models, user interface elements and configurations to build a complete application.
Here is a summary of high level components in the Gumtree Framework and Bragg Extensions:
Gumtree Framework Components
Component | Notes |
---|---|
Common | Provides common services and widgets for Gumtree workbench and server |
Extensions | Additional services and tools for Gumtree |
SICS | SICS Server support for Gumtree |
DAE | ANSTO data acquisition electronics support for Gumtree |
Processor | Data processing framework for data reduction based workflow |
GumPy | Script library for using Gumtree API with Python |
Application | Application containers for running Gumtree in workbench or server mode |
Bragg Extensions Components
Component | Notes |
---|---|
NBI | Common Gumtree application library for all Bragg Institute instruments |
Echidna | Support for Gumtree on high-resolution powder diffractometer |
Wombat | Support for Gumtree on high-intensity powder diffractometer |
Kowari | Support for Gumtree on strain scanner |
Quokka | Support for Gumtree on small-angle neutron scattering |
Platypus | Support for Gumtree on neutron reflectometer |
Pelican | Support for Gumtree on time-of-flight sepectormeter |
Taipan | Support for Gumtree on thermal 3-axis spectrometer |
Kookaburra | Support for Gumtree on ultra small-angle neutron scattering |
Bilby | Support for Gumtree on 2nd small-angle neutron scattering |
Dingo | Support for Gumtree on neutron radiography/imaging/tomography |
Emu | Support for Gumtree on high-resolution backscattering spectrometer |
Spatz | Support for Gumtree on 2nd neutron reflectometer |
Koala | Support for Gumtree on Laue diffractometer |
The component based approach encourage programmers to design their software by the separation of concerns, which makes code more coherence and easier for testing and reuse.
In modern Java software design, it is more favourable to code component in POJO style, and connects component with dependency injection containers. Gumtree uses the Eclipse context from e4 as the dependency injection container.
See also: http://en.wikipedia.org/wiki/Component-based_software_engineering
The service oriented architecture allows components to be visible as services across the system. This helps to improve the high level application architectural design. In this architecture style, the consumers of the components (services) only recongise the contracts (interface) provided by the components, without knowing the actual implementation or instance of the components. This approach can allow components to be swapped in and out to suit different purposes, such as change of requirement or testing.
Gumtree uses the OSGi service registery to manage the visibility of services. Services can be registered into the runtime via the following methods:
- OSGi Declarative Services (recommended)
- Spring Dynamic Modules
- Manual registration using OSGi API
See also: http://en.wikipedia.org/wiki/Service-oriented_architecture
Any information that can be named is abstracted to resource, for examples: document, image, database record, device, application state and functionality (service). Each resource has unique identifier in form of URI. This architectural style provides a simple and uniform way of resource discovery and manipulation. The Gumtree server uses this extensively for providing instrument remote access. A noticable example of this architecture is REST (REpresentational State Transfer), which is commonly used on World Wide Web.
See also: http://en.wikipedia.org/wiki/Resource-oriented_architecture
Listener design pattern is probably one of the most important mechanism for modern applications. However, this subscribe and publish pattern can leads to a highly coupled design. Instead, Gumtree uses the event bus design such that the subscriber and publisher do not need to make any dependency on each other.
Event driven approach (or message passaging) can also improve application performance when it comes to the multi threaded execution environment.
See: http://en.wikipedia.org/wiki/Event-driven_programming
This project creates the following products:
- Gumtree Workbench - A rich client desktop application that runs on multiple operating systems
- Gumtree Web Server - A server to that provides RESTful web service and rich web frontends
- Gumtree Data Browser - A standard Java application for browsing various type of data files
- Gumtree Script Runner - A command line tools to execute Python scripts
- Gumtree Framework Repository - A P2 repository that contains all of the Gumtree binaries and source codes
Home | Developer Guide | Copyright © 2013 ANSTO