1. Sponge

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

This documentation applies to version 1.1.0 (release date: 2018-04-12).

Sponge is a software framework for implementing event processors that listen to certain events and perform specified operations when some conditions are met. Events are usually sent by external systems. The Event Processing System 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. Event processors are defined in knowledge bases. 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.

Sponge may be classified as a Complex Event Processing system.

Sponge requires Java 1.8 or above.

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

Sponge has been created by Softelnet.

A primitive sedentary aquatic invertebrate with a soft porous body that is typically supported by a framework of fibres or calcareous or glassy spicules. Sponges draw in a current of water to extract nutrients and oxygen.

— Oxford Dictionaries

2. Features

The main features of Sponge:

  • provides a concurrent processing of 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,

  • supports writing knowledge bases in several scripting languages,

  • no need to learn yet another notation/DSL, however you have to learn at least the basics of the Sponge API,

  • 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, MPD and Raspberry Pi,

  • supports creation of custom plugins,

  • supports deployment in enterprise environments by integration with Spring framework,

  • provides the standalone command-line application, that, for example, allows 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),

  • may be used to automate repetitive tasks (programmed in any of the supported scripting languages),

  • provides a comprehensive documentation and many examples.

3. License

The Sponge standard libraries are released under the Apache 2.0 license. However some optional Sponge libraries and the Sponge standalone command-line application are licensed under the GNU General Public License, Version 3 because they use optional, third-party libraries that require it.

4. Applications

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

Internet of Things (IoT)

Sponge as a part of an IoT gateway may 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.

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.

5. Users

The potential users of an embedded Sponge are Java developers.

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

  • Python, Ruby, Groovy or JavaScript developers,

  • Java developers (for example for prototyping),

  • 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 routes becomes important.

6. Considerations

  • Sponge provides no graphical user interface (GUI).

  • 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.

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

7. Author’s note

Softelnet has used Open Source Software in its commercial products for may 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ś
CTO at Softelnet