1.0.0 • Published 3 years ago

fastify-redis-db v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

fastify-redis-channels

Contributor Covenant js-standard-style

A Fastify plugin for a Redis DB model interface suitable for a single or a cluster environment using a fixed pre-sharded approach.

It supports a generation of primary keys (UUID), the definition of unique keys, indexes, and mandatory fields.

It suits perfectly building distributed applications.

It includes performant queries and all CRUD operations.

It includes a capability to create relations between data sets based on their primary keys.

Allows a dynamic load balancing in a running operation within the pre-shard slots.

The package can be used in a single Redis instance with an already pre-sharded configuration and later migrate to a cluster configuration. An application change is not necessary.

It can be used as a replacement of a typical RDBMS in many use cases by benefiting from speed and scalability.

Under the hood, ioredis is used as a client.

It suits perfectly together with a @hearit-io/fastify-redis-channels to build powerful application quick and easy.

Do you want your application to grow? Then start right from the begging.

Under the hood @hearit-io/redis-db is used, the options you pass to a register will be passed to the RedisModel instance.

Table of Contents

Install

$ npm install fastify-redis-db --save

Usage

Add it to your project with register and that's it!

You can access the RedisModel instance via fastify.db. All error object are accessible via fastify.RedisModelError, etc.

A Redis connection is automatically closed when a fastify instance is closed.

Project status

hearit.io

Smart home automatization designed for visually impaired people.

fastify-redis-db is used productive in our web app. The package will be updated and maintained in a regular base.

The main goals of hearit.io is to make accessible the world of IoT to everyone.

No technological, design or speed compromises, we just do it.

We will be grateful to you if you make awareness to other people of our project.

Other useful packages, part of our project, will be available soon.

We use Fastify as an application framework. Thanks for the great job!

Todo

  • Add plugin unit tests.
  • TypeScript support.

Authors and acknowledgment

hearit.io

License

MIT