up73k / hemera

🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hemera

License MIT Build Status Build Status Coverage Status Gitter JavaScript Style Guide Known Vulnerabilities lerna

A Node.js microservices toolkit for the NATS messaging system
Run on repl.it

📓 Getting Started

Hemera (/ˈhɛmərə/; Ancient Greek: Ἡμέρα [hɛːméra] "day") is a small wrapper around the 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 add the same add as many as you want on different hosts to ensure maximal availability. The only dependency you have is a single binary of 7MB. 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 can be extended by extensions or plugins.
  • 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: Providing 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) e.g. topic:auth:germany. Queue group name allow load balancing of services.
  • 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 the signatures of your 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: Any distributed system need good tracing capabilities. We provide support for Zipkin or Jaeger tracing systems which manages both the collection and lookup of this data.
  • Monitoring: Your NATS server can be monitored by cli or a dashboard.
  • Payload validation: Create your own validator or use existing plugins e.g Hemera-Joi.
  • Serialization: Use custom serializer e.g MessagePack.
  • Metadata: Transfer metadata across services or attach contextual data to tracing systems.
  • Dependencies: NATS is a single binary of 7MB and can be deployed in seconds.
  • Typescript: We provide a definition file to support auto-intellisense.

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).

Who's using Hemera?

appcom-interactive amerbank savicontrols
appcom interactive amerbank savicontrols

Get Involved

  • Contributing: Pull requests are welcome!
    • Read CONTRIBUTING.md and check out our help-wanted issues
    • Submit github issues for any feature enhancements, bugs or documentation problems
  • Support: Join our gitter chat to ask questions to get support from the maintainers and other Hemera developers
  • Discuss: Tweet using the #HemeraJs hashtag

Changelog

See Releases

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. Available versions tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Inspiration

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 deusdustin@gmail.com or contact me private on Gitter

Support / Donate

About

🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/

License:MIT License


Languages

Language:JavaScript 99.8%Language:CSS 0.2%