Skip to content

theojulienne/usvc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usvc - A node library for microservices

A MicroService is a set of Facets - small objects that manage part of a microservice, such as database access, rest services, etc.

Facets intialise by returning a promise, and can depend on other facets starting (providing there are no dependency loops) by waiting on dependant initialisation promises before returning their own.

Facets are responsible for setting themselves up from configuration properties and for alerting the base service of critical errors like database disconnections. These errors will result in the process exiting, a process manager should be used to ensure it reconnects with back-off.

Built in facets:

  • facets.db.redis: Single server promise-based redis connect. Correctly throws errors on connection close.
  • facets.db.mysqlPool: Connection-pool based MySQL. Initial connection failure throws errors, future connection errors retry within the pool.
  • facets.rpc.jsonServer: Creates a local RPC server that can be called by a facets.rpc.jsonClient on another microservice.
  • facets.rpc.jsonClient: Provides access to a remote facets.rpc.jsonServer.
  • facets.web.express: Runs an Express web service as a facet.

About

A node.js library for microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%