Overview


1. Sponge

Sponge is an open-source, Java-based Action and Event Processing System.

This documentation applies to version 1.13.0 (release date: 2019-10-30).

Sponge is a software for implementing synchronous actions and asynchronous event processors. Event processors listen to certain events and perform specified operations when some conditions are met. Events are usually sent by external systems. Sponge allows to introduce temporal and logical conditions to processed events. Event processing may end up with sending of another, high-level event thus creating a hierarchical model of events. The supported event processors include filters, triggers, rules and correlators.

There are several ways to use Sponge:

  • Embed Sponge as a software library in your Java application using Maven dependency.

  • Download the Sponge standalone command-line program and use it in your environment.

  • Run the Sponge standalone command-line program in a Docker container.

  • Connect to an existing Sponge instance via the REST API or the Sponge mobile client application (currently under development).

Actions and event processors are grouped in knowledge bases. A knowledge base is defined in files which may be written in one of several supported scripting languages, i.e. Python, Ruby, Groovy, JavaScript as well as in Java or Kotlin.

In some aspects Sponge may be classified as a Complex Event Processing.

Sponge requires Java 1.8 or above.

The project pages are hosted at https://sponge.openksavi.org. The source code is hosted at Github.

Sponge has been created by Softelnet.

Sponges draw in a current of water to extract nutrients and oxygen.

— Oxford Dictionaries
Sponge

2. Features

The main features of Sponge:

  • Provides a concurrent processing of actions and incoming events.

  • Allows generating and scheduling of events (e.g. supports cron notation).

  • Events may represent such diverse entities as, for example, SNMP traps, RSS feeds or MIDI messages.

  • Allows embedding in a custom Java application (using Maven) or could be used as a standalone command-line application.

  • Supports connecting to many types of external systems by using Apache Camel integration.

  • Provides own Apache Camel component for including Sponge engine in a Camel route.

  • Provides plugins for integration with Spring, Camel, CPython, MIDI and Raspberry Pi.

  • Supports creation of custom plugins.

  • Supports deployment in enterprise environments by integration with Spring framework.

  • The standalone command-line application allows, for example, management of Camel routes without the need of writing Java code (you may use any of the supported scripting languages or XML).

  • Supports reloading of knowledge bases on the fly (i.e. while the system is running).

  • Supports processing of streams of Sponge events by using Reactive Extensions (ReactiveX).

  • Allows publishing a custom REST API of your application as a set of actions (e.g. written in a scripting language) that may be changed and reloaded on the fly.

  • Provides REST API client libraries for Java and Dart to simplify writing a client code.

  • Provides integration with TensorFlow, an open source machine learning framework. You may use the TensorFlow or Keras Python API indirectly from your Java application.

  • Allows rapid development of generic, opinionated mobile applications backed by a server-side business logic. The business logic has to be defined in Sponge actions and the end user runs the Sponge mobile client application (currently under development) that provides a generic GUI to call actions. The mobile application could be useful in cases when a mobile GUI doesn’t have to be customized.

  • Provides a comprehensive documentation and many examples.

3. Applications

Sponge could be used as a component in various types of applications. Here are some examples.

Task automation

Tasks could be programmed in any of the supported scripting languages as Sponge actions, published via the REST API and call remotely in the Sponge mobile client application.

Internet of Things (IoT)

Sponge as a part of an IoT gateway can locally process data provided by the devices in the field, thus only important data is sent to the central node where data is collected, stored and manipulated by enterprise applications.

Edge computing

Sponge may be used on edge devices (also known as smart devices), providing a computation platform that would be largely or completely performed on distributed device nodes. The requirement is that such device must have Java (JRE) installed. The example is Raspberry Pi with connected sensors.

Business Activity Monitoring (BAM)

Sponge embedded in a Spring based application may have an access to a service layer via Spring beans. Sponge could periodically run monitoring tasks and generate notification events if necessary.

Fault management

Sponge may be used to process faults or events sent by the network using a protocol such as SNMP. The processing may include creating issues into the issue tracking system (Trouble Ticket system). Sponge may use all protocols supported by Apache Camel or provided by custom plugins.

Network monitoring

Sponge may be used to monitor a web server by periodically sending an HTTP request to fetch a page. It may also provide more advanced checks by running for example Selenium scripts to verify a web application. When a problem is detected Sponge could send an email to the administrator.

Supervisory control and data acquisition (SCADA)

Sponge may be used as a part of Alarm handling as well as a part of a module that connects to the remote terminal units (RTUs) or the field sensors and actuators.

Distributed control system (DCS)

Sponge may be used as a part of the production control level to provide an event-driven monitoring.

System integration

Sponge may be used to provide a script-based integration using Apache Camel routes. Sponge could be connected to the Enterprise Service Bus (ESB) as well.

4. Users

The potential users of an embedded Sponge are Java developers.

The potential users of a standalone command-line Sponge application are:

  • Java, Python, Ruby, Groovy and JavaScript developers,

  • DevOps engineers and system administrators with programming skills.

Because of Sponge is a Java-based solution, at least basic knowledge of Java is suggested. It becomes important when browsing Javadoc API, using Java libraries, analyzing exception stack traces, etc. Moreover, to effectively use Sponge for problems that require integration, a knowledge of Apache Camel becomes important.

The Sponge mobile client application is intended for end users with no programming knowledge required.

5. License

Sponge is released under the Apache 2.0 license.

6. Considerations

  • Because of Sponge doesn’t introduce its own notation for knowledge bases, it provides a shorter learning curve for users that know one of the supported scripting languages. However it could lack more sophisticated features and could be less optimized for certain uses than other solutions. For example you specify event conditions by writing any code in a scripting language that is to be executed when a matching event happens. On one hand it gives you a flexibility and on the other hand it doesn’t provide optimizations that could be possible if, for example, a strict temporal reasoning notation is used.

  • Sponge doesn’t provide persistence of events out of the box.

7. Author’s note

We have been using Open Source Software in our commercial products for many years. Therefore we appreciate the impact of Open Source on the IT industry and believe that its constant development is important. In order to contribute to the Open Source community we share and maintain projects such as Sponge.

— Marcin Paś
Co-Founder & CTO at Softelnet