Introduction

In this chapter, we will explain how does NwaySP Engine works inside and what are the piece of Framework that are used.

Service Exection

Engine Executor

Here is the process of execution of a Service (Example):

Service Execution

An inbound is launched by an external or internal system. Then the inbound retrieved the execution contexts that should be run. For each one, It runs the Service implementation with the right inbound retrieved from the execution context. Then, the right OutBounds are launched with the date filled in during Service.

Logs

Each Service can output logs that will be either saved in the database or saved in file or saved as an output or any combination of them. Logs are separated into 6 types :

  • TRACE : Lower level of log related to code.
  • DEBUG : Used to Debug a Service.
  • INFO : Used to inform the user of a functional matter.
  • WARN : Used to inform the user that an error has occurred but the system has handled it.
  • ERROR : Used to inform that an error occurred locally that does not affect the use of the rest of the platform.
  • FATAL : Used to inform that there were an unhandled error that can have side effects of the rest of the platform.

The Log behavior is configurable using Log Component (namespace : log).

Errors

Each service can save an error that occurred. An administrator can review it later. The errors are stored in the database (and logs) with there complete hierarchy.

The Error behavior is configurable using Error Component (namespace : error).

Statistics

Each service can handle statistics. A statistic is a float (double) value defined by a name that can me modified. A comment can be made during each modification. The database holds all the history of the statistic. Each one of the statistics can be viewed into the Web Console.

DataStore - Database vs NoSQL

Data MCD

All the applicative data are stored into a Database Structure composed composed of a DataNamespace and DataStore.Basically, all the data is stored in datastore that are gathered in DataNamespace. A data can have all the existing types and can reference each other.

Some Service can choose to store its data into a NoSQL database (embedded) or in the common Database. We are using neo4j.

Technical Consideration

Database

The database is the main part of the Platform. It is composed of more or less 60 Table optimized with indexed. Some Indexes are Full Text Search indexes. Please consider that the database as the bottle neck of the platform. When doing a CPU eager operation on it, it will slow down ALL engines.

NwaySP is fully functional on H2 and Postgres. However, we recommend you running on Postgres for Production. We have added some Views and Triggers that can facilitate you the administration of the platform.

Transaction Matters

Any request to the database is hold into a transaction. This been said, transition size can be an issue. Thus, each service is defined so that it generated a limited number of requests.

Code Detail

Code Layer

Layers

The main concept is that all the layers are independent. They act has a whole and they call only top layer. They can be called by bottom layers

Let's start bottom up, the way of calling

  • Operating System : He will be in charge of launching the Spring configuration of the Engine or the Web Console.
  • Spring : It will be in charge to launch the quartz Scheduler and prepare the program by calling Handlers.
  • Handler : Handlers are classes that are used to launch a program. It prepare the environment.
  • Quartz : Quartz Scheduler will be in charge to call an Entry
  • User Action : A user action is just a request of a Web Page or Request of a Webservice
  • Entry or Facade Classes or Annotation : They are classes that are responsible to open an transaction for a specific business request.
  • Business Classes : They are classes that are doing a business action.
  • DAO Classes : They are classes that define how to manipulate data.
  • Hibernate : It is our Data Mapping Helper
  • Neo4J : NoSQL provider
  • ActiveMQ : JMS provider

Public Frameworks

We are using a lot of framework proven to really stable :

  • Spring
  • Hibernate
  • Quartz
  • Struts 2
  • Tiles
  • CXF
  • JQuery
  • JqGrid
  • ... etc ...

Private Framework are more related to our clients. They are completely separated from the core modules of NwaySP. There are and they will remain, of course, confidential.