Cricket Microservices Framework

You do not need to download a half of the Internet to have your job done
Cricket Microservices Framework

Lightweight

256 KB (core classes), 2.8 MB with external libraries (fat jar)
10 k LOC
Java 10 ready
Runs on 1 MB RAM*

Free

Apache 2.0 licensed.
Hosted on GitHub.

Minimalistic

Plain Old Java
Configuration over convention
No hidden magic

Cloud Ready

Services build with Cricket can be deployed in cloud environments that supports Java or Docker containers.

Clear architecture

Implements the "ports and adapters" (hexagonal) architecture pattern. Event driven services with the smallest necessary dose of dependency injection.

HTTP server

HTTP/S requests handled internally to serve both REST and HTML page calls.

Key-Value database

Built-in, in-memory key-value database can be used for fast prototyping.

Data to JSON serializer

Automatic JSON serialization/deserialization thanks to the json-io project.

Scheduler

One-time or repetitive tasks based on configuration or defined in code.

Logging

The StandardLogger (using Java Logger) can be replaced with other adapter of your choice, eg. centralized logging system.

Monitoring

Your service can monitor it's sensitive parameters or external services. Example adapters to monitor memory and disk space are included.

Quick start

Running your static web page in 1 minute
  1. Open terminal window in the newly created directory
  2. Download Cricket MSF library from the GitHub repository
  3. Create web page file
  4. Start the service
  5. Display your page in web browser at http://localhost:8080
  6. Call example echo service API at http://localhost:8080/api/echo?some_param=test
  7. Stop the service by pressing Ctrl-C in the terminal window
wget https://github.com/gskorupa/Cricket/releases/download/1.2.37/cricket-1.2.37.jar
mkdir work
mkdir work/log
mkdir work/data
mkdir work/www
echo "Hello World!">work/www/index.html
java -jar cricket-1.2.37.jar -r

Resources

In recent months, Cricket has undergone a lot of changes and gained some interesting features. For this reason, the documentation that has already been created is outdated in many parts.
I will consistently post new articles on the Signocom's blog or in the GitHub repository.
Stay tuned.

Sponsors