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

Lightweight

3.6MB fat jar, including external libraries
10k LOC
Java 10 ready

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 architecture with the smallest necessary dose of dependency injection.

Embeded HTTP server

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

Embeded databases

Two, ready to use, in-memory databases: key-value (no sql) and H2 Database (sql).

JSON handling

Automatic JSON serialization/deserialization.

Scheduler

One-time or repetitive tasks can be configured or created programatically.

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 the latest Cricket MSF library
  3. Create required subfolders and the web page file (index.html)
  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

Example code:
mkdir myservice
cd myservice
wget https://www.cricketmsf.org/cricket-latest.jar
mkdir work
mkdir work/log
mkdir work/data
mkdir work/www
echo "Hello World!">work/www/index.html
java -jar cricket-latest.jar -r

Resources

Sponsor Cricket development

Cricket is available under the Apache 2.0 license, and you can use it for any application for free. I continue to provide new features and care about its quality, but it is not easy without financial backing. You can support Cricket's development using the following methods:

Sponsors