Skip to content

tichon29/mollitia

This branch is 98 commits ahead of, 7 commits behind genesys/mollitia:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7b66d56 · Feb 4, 2021

History

98 Commits
Feb 4, 2021
Jan 21, 2021
Feb 3, 2021
Jan 7, 2021
Jan 7, 2021
Oct 19, 2020
Jan 5, 2021
Oct 19, 2020
Oct 19, 2020
Jan 21, 2021
Jan 21, 2021
Jan 18, 2021
Jan 8, 2021
Feb 3, 2021
Oct 28, 2020
Jan 21, 2021
Jan 21, 2021
Oct 26, 2020
Oct 19, 2020

Repository files navigation

Mollitia

Mollitia is a JavaScript Resilience library that works on Node and on browsers. The purpose of such kind of tool is to help organize asynchronous operations under a highly customizable circuit that helps managing error use cases. When everything is falling apart, it stops the classic flow and uses modules to manage failures.

Documentation

Full documentation website can be find here.

Installation

With Node or any web UI Framework

# Install the dependency
npm install mollitia --save
// Javascript
const { Circuit } = require('mollitia');
// ES6 or TypeScript
import { Circuit } from 'mollitia';

With CDN

<!-- CDN -->
<script type="text/javascript" src="https://unpkg.com/mollitia"></script>
<script>
  const { Circuit } = window.Mollitia;
</script>

Usage

// Imports the library
const { Circuit } = require('mollitia');
// Creates a circuit
const myCircuit = new Circuit();
// fn(yourFunction) - execute(yourParams...)
await circuit.fn(yourFunction).execute('dummy');

Features

The point of Mollitia is to get every Resilience patterns into one library. It is very similar at what does Resilience4j on Java, but on Node.

  • Works on Node and on browser (even Internet Explorer 11, wow).
  • Implements a wide variety of Resilience patterns.
  • Has Method Agnostic circuits, meaning you don't have to create one circuit per function.
  • Supports addons.

Comparison with other libraries

  • cockatiel
    • Misses the Cache and Ratelimit modules.
    • Cannot create module or addons.
  • opossum
    • Only support the Circuit Breaker module
    • Cannot have Method Agnostic circuits.
    • Cannot create module or addons.
  • brakes
    • Only support the Circuit Breaker module
    • Cannot have Method Agnostic circuits.
    • Cannot create module or addons.

License

About

JavaScript Resilience Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.5%
  • JavaScript 4.4%
  • Handlebars 1.1%