Reactive Stack JS replacement.
See owservable.github.io for more info.
Checkout my Reactive Stack Udemy course.
See the TypeDoc documentation.
See the Test coverage.
- Web Server abstraction
- Database abstraction
- Client-side datastore abstraction
- Larga Data handling
- Server-Side Events
Make sure your MongoDB database is running as a Replica Set: http://stojadinovic.net/2020/07/05/mongodb-change-streams-on-localhost-with-nodejs/
This is the main class.
It processes client subscription requests, creates appropriate stores and subscribes to them to observe changes.
It extends RxJS:Subject, so that any websocket instance can subscribe to it, in order to forward updates back to the client.
Defines a Connection`Manager interface to be implemented by the application using this library.
This implementation is required for the above OwservableClient
. An instance of OwservableClient
is calling IConnectionManager
methods accordingly.
This is a map of all defined Data Middleware methods.
A Data Middleware is tied to a collection name and is used to modify an observed payload if necessary. For example, if based on users access permissions a portion of the payload needs to be removed or replaced, etc.
Method that initiates all watchers. Takes the project root folder path and a global folder name for the watchers.
Watchers can either perform simple tasks or add jobs to a queue, to be processed by the workers.
Method that initiates all cronjobs. Takes the project root folder path and a global folder name for the cronjobs.
Cronjobs can either perform simple tasks or add jobs to a queue, to be processed by the workers.
Method that initiates all workers. Takes the project root folder path and a global folder name for the workers.
Workers can either perform simple tasks or take jobs from a queue.
A MongoDB database connector class, used to initialize the database collection which Mongoose will then use.
This method parses all models and adds them to the CollectionsModelsMap
if they pass validation. The method takes the project root folder path and a global folder name for
the models and an optional folder name(
s) to exclude, for example mixins
and similar.
This is a map of all Mongoose models and related MongoDB collections. It is populated automatically during the execution of processModels
.
Requires MongoDB 3.6+: This method returns an RxJS Subject that can be subscribed to and thus observe a particular MongoDB collection. This method takes a Mongoose model instance.
Requires MongoDB 4.0+: This method returns an RxJS Subject that can be subscribed to and thus observe the entire MongoDB database.
This method stores all fastify routes into the RoutesMap
in order to display them on request as a form of quick routes documentation.
This method is set as blippLog
options attribute during fastify registration of the fastify-blipp
plugin.
Eg. server.register(fastifyBlipp, {blippLog: processFastifyBlipp});
.
This is a map of all available routes. It is populated automatically during the execution of processFastifyBlipp
.
This method adds all routes to fastify automatically. It requires as parameters a fastify instance, the project root folder path and a global folder name for the routes.
Helper metohd used in addFastifyRoutes
to generate the route path from filename and file location relative to routes root folder.
Abstract class for CountStore
, DocumentStore
and CollectionStore
implementations.
Enum for existing store types: COUNT | DOCUMENT | COLLECTION
.
Count store, observes a particular query and returns only an integer representing the count of response rows.
Document store, observes a particular query and returns all response rows.
Collection store, observes a particular query and returns all response rows.
Store factory method, creates an appropriate AStore instance based on passed subscription parameters.
These types are self explanatory.
- CronJobType
- WatcherType
- WorkerType
- StoreScopeType
- StoreSubscriptionConfigType
- StoreSubscriptionUpdateType
- ConnectionManagerRefreshType
Licensed under The Unlicense.
Predrag Stojadinović 💻 📖 🤔 🚧 📆 |
This project follows the all-contributors specification.
Contributions of any kind welcome!
Checkout the UML diagram.