SPHINX

SPHINX is a design pattern, based on distributed processes with real-time communication over UDP multicast networks. In order to support this design pattern, the SPHINX-Tool has been developed. It is a JAVA executable jar for the management of the SPHINX data communication.

Below a screenshot of the tool is depicted.


The tool offers a user-interface, which makes it possible to real-time monitor UDP multicast data communication in a distributed system. Besides that, the tool also let you inject XML datagrams to stimulate the system. The datamodel is based on XML and is therefore easy to setup and to extend.

Of course you can ask yourself: Why would I want to build a distributed system?

A system is often built as a monolith by stacking functionalities, the so called stack. A good example is a traditional Java program:

  • The bottom layer is a JAVA-VM
  • on top of that operates an infrastructure layer (often this layer enables data persistence and data communication),
  • on top of that a domain generic layer is implemented (common functionalities like database processing and network communication)
  • on top of that a task specific layer is implemented (specific control of the generic layer for the desired application)
  • on top of that you will find the presentation layer

You can imagine that continuously stacking functionalities will result in a tower of functions.

You can wait until the moment comes that you are no longer able to add another function, without preventing the tower from collapsing. In practice this means that you need to put more effort in solving instability issues (if that is even possible).

An alternative to prevent this scenario comes from the defence industry. A naval frigate, submarine, tank or fighterjet needs to rely on its system. One system failure can have catstrophic results and can even be fatal. These kind of systems often operate 24/7 and need to be 100% stable. In order to realize this, the system is not built as one large stack of functions, but rather as several smaller (tops 3) stacks.

By letting these stacks cooperate like a strict military organization, a high complexity of functionality can be realized, without compromising the system stability.



When a function fails, at most one subsystem will fail. The total system will still continue to operate (however with degraded functionality). Because of the distributed architecture, developers are able to repair the failing parts, while keeping the system operational. This is also called a fault-tolerant system. With a fault-tolerant system, errors are taken into account from the start. Instead of putting a lot of effort in preventing failures, a lot of time and effort has been put in detecting and handling errors.

The cooperation of these smaller stacks is realised (just like in human societies) by means of communication (chain of command). In order to communicate, you need a vocabulary. In software, this is called the datamodel. To make a domain specific datamodel and be in control of the communication, SPHINX has been developed. SPHINX is an XML based design-pattern, which allows the designer to realise and manage a complex and distributed system. The designer only has to work on the domain, task and presentation layers.

With SPHINX some stacks can operate on a Windows PC and others on a Linux Raspberry Pi (the correct hardware for the correct application). Dependent on the desired functionality some stacks can be written in C and others in PYTHON or JAVA (the correct language for the correct functionality). Critical parts can simply be made redundant and executed geografically distributed to increase the availability and stability even more (the correct execution on the right location).


The sky is the limit!


SPHINX-Tool is written in JAVA and completely open-source. The source code and kickstarter examples can be found at:

https://github.com/Frenk44/sphinx