A First Release of SPMF-Server and SPMF-Server Clients

Over the years, I have developed the SPMF library with collaborators as a comprehensive toolkit for pattern mining, with the goal of making a large number of algorithms easily accessible for research and teaching. While SPMF has been widely used in its Java form and sometimes in other languages through wrappers or its command line interface, I have often felt the need to provide more ways to interact with SPMF.

Hence, I have started a new project a few months ago, but just released a first version today: SPMF-Server. The idea is to provide a REST server implemented in Java that allows to query the SPMF library remotely or on the same computer from any language by submitting jobs to the server. The idea behind SPMF-Server is simply to decouple the mining engine from the client code. Instead of embedding SPMF directly, a user can run a server and interact with it through HTTP requests. This is an early work and comments are welcomed. In this blog post, I will give an overview

General Idea

SPMF-Server is a small REST API that exposes the algorithms of SPMF. A client sends can query it by sending the name of an algorithm, its parameters, and some input data, and the server executes the task and returns the result. Each job is executed in a separate Java process, and the client can query its status, retrieve the output, and inspect the console logs if needed. The interaction is intentionally simple and based on JSON. The overall architecture can be seen as follows:

SPMF-Server 1.0 and SPMF-Server-Clients 1.0

This is an initial release. The core features are implemented, including: submitting mining tasks, monitoring their execution, retrieving results and execution logs, configuration through a properties file. At this stage, the project should be seen as a working prototype and I will do further testing and improvements to fix bugs and improve performance. SPMF-server can run as a headless server or through a GUI:

SPMF-Server 1.0

Alongside with the server, I have also started a separate project providing two simple Python clients to connect to the SPMF-Server. The first one offers a commandline interface while the second one provides a GUI. Below are a few screenshots of the GUI. This is the algorithm selection tab:

This is the tab for running a job by selecting a file and algorithm parameters:

This is the tab for viewing results from any job that was run on the server:

How to try ?

You can download both the SPMF-Server and SPMF-Server clients from these two Github repositories:

Conclusion

In the future, there will be also clients for other programming languages, and the overall idea will be improved. If you try it and encounter issues or have suggestions, I would be very interested in hearing your feedback.Any comments are welcome!

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *