• Stars
    star
    375
  • Rank 110,892 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated 30 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Redis Oplog implementation to fully replace MongoDB Oplog in Meteor

Introducing BlueLibs

Welcome to Redis Oplog

LICENSE: MIT

Build Status Backers on Open Collective Sponsors on Open Collective

RedisOplog

A full re-implementation of the Meteor's MongoDB oplog tailing. This time, reactivity is controlled by the app, opening a new world into building reactive applications, highly scalable chat apps, games, and added reactivity for non-persistent data.

Incrementally adoptable & works with your current Meteor project.

Installation

meteor add cultofcoders:redis-oplog
meteor add disable-oplog

Configure it via Meteor settings:

// settings.json
{
    ...
    "redisOplog": {}
}

// default full configuration
{
  ...
  "redisOplog": {
    "redis": {
      "port": 6379, // Redis port
      "host": "127.0.0.1" // Redis host
    },
    "retryIntervalMs": 10000, // Retries in 10 seconds to reconnect to redis if the connection failed
    "mutationDefaults": {
        "optimistic": true, // Does not do a sync processing on the diffs. But it works by default with client-side mutations.
        "pushToRedis": true // Pushes to redis the changes by default
    },
    "debug": false, // Will show timestamp and activity of redis-oplog.
  }
}

To see what you can configure under "redis": {} take a look here: https://www.npmjs.com/package/redis#options-object-properties

meteor run --settings settings.json

Notes

RedisOplog is fully backwards compatible, so there won't be any change in how you use Meteor, unless you want to fine-tune your application for absolute performance.

To make sure it is compatible with other packages which extend the Mongo.Collection methods, make sure you go to .meteor/packages and put cultofcoders:redis-oplog as the first option.

RedisOplog does not work with insecure package, which is used for bootstrapping your app.

Stats

If you are interested in viewing how many observers are registered or memory consumption:

meteor shell
import { RedisOplog } from 'meteor/cultofcoders:redis-oplog';

// works only server-side
RedisOplog.stats()

The levels of scaling reactivity

  1. Just add RedisOplog, you will already see big performance improvements
  2. Fine-tune your reactivity by using custom namespaces and channels
  3. Implement your own custom reactivity by using Redis Vent

Events for Meteor (+ Redis Oplog, Grapher and GraphQL/Apollo)

  • Meteor Night 2018 Slide: Arguments for Meteor - Theodor Diaconu, CEO of Cult of Coders: β€œRedis Oplog, Grapher, and Apollo Live.

Optimistic UI

If you are using Optimistic UI (Latency Compensation) in your application, you should give this a read.

How It Works

Find out what RedisOplog does behind the scenes

Fine Tuning

Find out how you can use the advantages of Redis Oplog to make your app very performant.

Redis Failover

Find out how you can hook into redis events to customize, when it fails.

Redis Vent

Find out how you can customize your reactivity and enable it across multiple languages/microservices with ease.

Outside Mutations

If you have different workers/services that perform updates to mongo and they exist outside Meteor, you can still trigger reactivity for the Meteor instances with a few lines of code.

Premium Support

If you are looking to scale your business using this package and you need to have your back covered. We are here to help. Feel free to contact us at [email protected].

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! πŸ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

More Repositories

1

grapher

Grapher: Meteor Collection Joins + Reactive GraphQL like queries
JavaScript
276
star
2

apollo

Meteor & Apollo integration
JavaScript
88
star
3

meteor-tuts

Meteor Tutorials - From Noob to PRO
CSS
39
star
4

grapher-react

Provides easy to use React Components that are suitable for grapher package.
JavaScript
39
star
5

react-molecule

Molecule is a light-weight framework that lets you reason about inter-component communication, dependency injection and logic decoupling.
TypeScript
33
star
6

apollo-client-transformers

Bringing the ability to parse data using Apollo Client
TypeScript
30
star
7

fusion

Fusion is the DDP client from Meteor that has the ability to be conditionally started.
JavaScript
22
star
8

grapher-boilerplate

Boilerplate for structuring your apps using Meteor + React + Grapher
JavaScript
21
star
9

meteor-persistent-session

Modifies Meteor's Session to store variables in the browser's `localStorage`
JavaScript
16
star
10

meteor-react-routing

Very easy way to build routes for your Meteor + React application
JavaScript
15
star
11

meteor-ssr-react-router-demo

This is a demo boilerplate to how you can use SSR inside Meteor with React Router v4
JavaScript
14
star
12

apollo-live-server

A set of tools to enable reactivity in Apollo alongside Meteor
TypeScript
13
star
13

apollo-live-client

Handles reactive events to easily work with live queries
TypeScript
12
star
14

grapher-docs

Grapher Doc Search
CSS
12
star
15

easify

Build in React complex lists with pagination, filters, sorting and searching
TypeScript
11
star
16

meteor-tuts-tutorial

This is the repository for the http://www.meteor-tuts.com/ tutorial.
JavaScript
11
star
17

graphql-load

GraphQL schema loader for complex & ambitious projects
TypeScript
9
star
18

quantum-framework

Quantum Framework
JavaScript
8
star
19

mutations

A new way to think about mutations inside Meteor
JavaScript
8
star
20

grapher-schema-directives

Grapher & GraphQL Schema Directives
JavaScript
7
star
21

meteor-apollo-accounts

Meteor Accounts & Apollo
JavaScript
7
star
22

grapher-live

Grapher Live - Verify your queries live
JavaScript
6
star
23

meteor-seculayer

Seculayer is a layer of security on top of Meteor's methods and publications.
JavaScript
6
star
24

storm-admin

Build Admins with Ease.
JavaScript
4
star
25

meteor-tuts-boilerplate

CSS
3
star
26

quantum-core

JavaScript
2
star
27

bigbang-docs

This is the documentation for BigBang
CSS
2
star
28

meteor-flux

Flux implementation for Meteor
JavaScript
1
star
29

react-mod

ReactMod is the complement of the Component, separating ui logic from the rest
1
star
30

quantum-framework-router

Based on Flow Router, this plugin allows you to easily create routes within Quantum Framework
JavaScript
1
star
31

quantum-iron-routing

Iron Router built for Quantum Framework
JavaScript
1
star
32

meteor-collection-names

Find collection by it's name in Meteor
JavaScript
1
star
33

ddp-silencer

Silence to Meteor's DDP
JavaScript
1
star
34

meteor-boilerplate

The ultimate Meteor Boilerplate.
1
star
35

meteor-graphql-loader

Easily load GraphQL Schema in your Meteor app
JavaScript
1
star
36

morpher

Morpher is a small npm library which allows you to work with GraphQL in isomorphic fashion.
TypeScript
1
star
37

typescript-workshop-2021

The repository in which our internal workshop was based on.
TypeScript
1
star