Comments (3)
Also, remember the same message can be send over multiple channels, right?
So, depending on the use case and how heavy parsing the message actually is, it might make sense to give each message a unique ID and keep a small LIFO cache with parsed messages, with a look-up table/hash for the unique ID. So if you have a collection myCollection
and an object {_id:'foo',prop:value}
which you send over 2 channels collection::*
and collection::foo
that both has subscribers on the same server, you give the message a unique id when you send it and parse it only once on the receiving end. Then again, maybe this might be a micro optimization not really worth it.
However, I do think giving each message a unique ID if you send it over multiple channels might have other useful purposes.
from redis-oplog.
Assuming the redis cacher is done, and we don't usually send the message to more than 2-3 channels. When you work with 'channel' or 'namespace' it won't push it to the main collection channel. You could do that by doing:
// on an update/remove for example:
channels: ['customChannel', 'collectionName']
// will push to 3 channels
'customChannel', 'collectionName', 'collectionName::id'
Problem is, how do I give that unique id ? Redis accepts a channel and a string when publishing to it, I will still need to deserialize it in order to get the id somehow
from redis-oplog.
done.
from redis-oplog.
Related Issues (20)
- what exactly happens if you set `pushToRedis: false` on an update? HOT 3
- redis in write-only/unsubscribed state after reconnect?
- Possible inefficiency on reconnect
- Reactivity bug in fairly specific situations HOT 7
- Meteor.userId can only be invoked in method calls or publications. HOT 2
- Check failed: IsFeedbackVector() HOT 1
- Sometimes missing redis events? HOT 2
- collection.update with options.upsert set to true is returning an object rather than a number
- Specifying SSL/TLS certificates for MongoDB Encrypted connections HOT 1
- Error Exception in onStop callback: TypeError: Cannot read property 'stop' of undefined HOT 1
- SyntheticMutator does not apply globalRedisPrefix setting HOT 1
- Direct channels do not respect collection level namespace configuration
- Not working under PM2 Cluster HOT 1
- Meteor v2.6 support ([email protected])
- Is there a way to gradually migrate individual collections to redis oplog HOT 1
- How to run REDIS on a separate server? HOT 2
- Using new meteor mongo async api HOT 9
- Redis oplog connects and disconnects all the time HOT 1
- Exception when a modifier with undefined values is used HOT 2
- Inserts with callbacks are not actually async HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redis-oplog.