Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hemerajs/hemera
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
https://github.com/hemerajs/hemera
cloud-native distributed-systems micro microservice nats nodejs pubsub rpc
Last synced: about 23 hours ago
JSON representation
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
- Host: GitHub
- URL: https://github.com/hemerajs/hemera
- Owner: hemerajs
- License: mit
- Created: 2016-11-15T21:13:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T07:42:41.000Z (about 2 years ago)
- Last Synced: 2024-12-30T20:29:19.282Z (12 days ago)
- Topics: cloud-native, distributed-systems, micro, microservice, nats, nodejs, pubsub, rpc
- Language: JavaScript
- Homepage:
- Size: 10.9 MB
- Stars: 805
- Watchers: 38
- Forks: 70
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-nodejs-cn - Hemera - 基于 [NATS](https://nats.io) 编写的可靠且容错的微服务 (包 / Web 框架)
- awesome-distributed-system-projects - hemera - A Node.js microservices toolkit for the NATS messaging system [RPC
- awesome-nodejs - Hemera - Write reliable and fault-tolerant microservices with [NATS](https://nats.io). ![](https://img.shields.io/github/stars/hemerajs/hemera.svg?style=social&label=Star) (Repository / Web Frameworks)
- awesome-github-repos - hemerajs/hemera - 🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/ (JavaScript)
- awesome-nodejs - hemera - Writing reliable & fault-tolerant microservices in Node.js - ★ 591 (Web frameworks)
- awesome-node - Hemera - Write reliable and fault-tolerant microservices with [NATS](https://nats.io). (Packages / Web frameworks)
- awesome-nodejs-cn - Hemera - 使用以下工具编写可靠且容错的微服务 [NATS](https://nats.io). (目录 / Web框架)
- awesome-list-microservice - hemera - tolerant microservices in Node.js https://hemerajs.github.io/hemera/ (rpc)
README
A Node.js microservices toolkit for the NATS messaging system
Run on repl.it* **Node:** v6+
* **Documentation:** https://hemerajs.github.io/hemera/
* **Lead Maintainer:** [Dustin Deus](https://github.com/StarpTech)---
> **Note**: Are you looking for the next generation API Developer Platform? 🔎 Have a look at: [WunderGraph](https://github.com/wundergraph/wundergraph)
Turn your services, databases and 3rd party APIs into a secure unified API in just a few minutes. 🪄---
## 📓 Getting Started
Hemera (/ˈhɛmərə/; Ancient Greek: Ἡμέρα [hɛːméra] "day") is a small wrapper around the official NATS driver. NATS is a simple, fast and reliable solution for the internal communication of a distributed system. It chooses simplicity and reliability over guaranteed delivery. We want to provide a toolkit to develop micro services in an easy and powerful way. We provide a pattern matching RPC style. You don't have to worry about the transport. NATS is powerful.
With Hemera you have the best of both worlds. Efficient pattern matching to have the most flexibility in defining your RPC's. It doesn't matter where your server or client lives. You can start as many services you want on different hosts to ensure maximal availability. The only dependency you have is a single binary of \~10MB. Mind your own business NATS will do the rest for you:
The key features of NATS in combination with Hemera are:
* **Lightweight**: The Hemera core is small as possible and provide an extensive [plugin system](https://hemerajs.github.io/hemera/docs/plugin.html).
* **Location transparency**: A service may be instantiated in different locations at different times. An application interacting with an service and does not know the service physical location.
* **Service Discovery**: You don't need a service discovery all subscriptions are managed by NATS.
* **Load Balancing**: Requests are load balanced (random) by NATS mechanism of "queue groups".
* **Packages**: We provide reliable and modern plugins to the community.
* **High performant**: NATS is able to handle million of requests per second.
* **Scalability**: Filtering on the subject name enables services to divide work (perhaps with locality).
* **Fault tolerance**: Auto-heals when new services are added. Configure cluster mode to be more reliable.
* **Auto-pruning**: NATS automatically handles a slow consumer and cut it off.
* **Pattern driven**: Define RPC's in JSON and use the flexibility of pattern-matching.
* **Request & Reply**: By default point-to-point involves the fastest or first to respond.
* **Publish & Subscribe**: Hemera supports all features of NATS. This includes wildcards in subjects and normal publish and fanout mechanism.
* **Tracing**: Builtin tracing capabilities but we also provide plugin for [Jaeger](https://github.com/jaegertracing/jaeger).
* **Monitoring**: NATS server can be monitored by cli or a dashboard.
* **Payload validation**: Create your own validator or use existing plugins e.g [hemera-joi](https://github.com/hemerajs/hemera/tree/master/packages/hemera-joi) or [hemera-ajv](https://github.com/hemerajs/hemera/tree/master/packages/hemera-ajv).
* **Serialization**: Use custom serializer e.g [hemera-mgspack](https://github.com/hemerajs/hemera/tree/master/packages/hemera-msgpack).
* **Metadata**: Transfer metadata across services or attach contextual data to tracing systems.
* **Dependencies**: NATS is a single binary of \~10MB and can be deployed in seconds.
* **Typescript**: We provide typings.## Built in protection
* **Process policy**: Will exit the process when the policy (memory, event loop) could not be fullfilled (Option: `heavy`).
* **Message loop detection**: Will return an error if you call a route recursively (Option: `maxRecursion`).
* **Safe default JSON serializer**: Provides a deterministic version and will also gracefully handle circular structures.## Who's using Hemera?
| [![appcom-interactive](https://hemerajs.github.io/hemera/img/company/appcom.svg)](http://www.appcom-interactive.de/) | [![amerbank](https://hemerajs.github.io/hemera/img/company/amerbank.png)](https://amerbank.com/) | [![savicontrols](https://hemerajs.github.io/hemera/img/company/savicontrols.png)](https://www.savicontrols.com/) | [![mercado unico](https://hemerajs.github.io/hemera/img/company/mercado-unico.png)](https://www.mercado-unico.com/) |
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| appcom interactive | amerbank | savicontrols | mercado unico |## Get Involved
* **Contributing**: Pull requests are welcome!
* Read [`CONTRIBUTING.md`](https://github.com/hemerajs/hemera/blob/master/CONTRIBUTING.md) and check out our [help-wanted](https://github.com/hemerajs/hemera/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) issues
* Submit github issues for any feature enhancements, bugs or documentation problems
* **Support**: Join our [gitter chat](https://gitter.im/hemerajs/hemera) to ask questions to get support from the maintainers and other Hemera developers
* Questions/comments can also be posted as [github issues](https://github.com/hemerajs/hemera/issues)
* **Discuss**: Tweet using the `#HemeraJs` hashtag## Contributing
Please read [CONTRIBUTING.md](https://github.com/hemerajs/hemera/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Supported Node Versions
Support policy for Nodejs versions follows
[Nodejs release support]( https://github.com/nodejs/Release).
We will support and build hemera on even Nodejs versions that are current
or in maintenance.# Professional services
Hemera is free for any use (MIT license). If you are in production don't miss the professional support service. For courses and training send me an email to [[email protected]]([email protected]) or contact me private on
# Sponsorship
Development of the hemera core module generously supported by contributions from individuals and corporations. If you are benefiting from hemera and would like to help keep the project financially sustainable, please visit [Dustin Deus](https://www.patreon.com/starptech) Patreon page, his [Paypal Me](https://www.paypal.me/payinstant/25) or contact him via [email](mailto:[email protected]).