Comments (15)
in your y-websocket repo, modify bin/utils.js like this
//use y-redis
const redisConfig = {
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
password: process.env.REDIS_PASSWORD,
db: process.env.REDIS_DB,
keyPrefix: process.env.REDIS_KEY_PREFIIX
}
const rp = new RedisPersistence({redisOpts: redisConfig})
persistence = {
provider: rp,
bindState: async (docName, ydoc) => {
rp.closeDoc(docName)
return rp.bindState(docName, ydoc)
},
writeState: async (docName, ydoc) => {}
}
from y-redis.
An example in the README on how to use and configure this would be very helpful.
from y-redis.
Any updates on this?
from y-redis.
I'd use it! just some basic usage example would be clutch
from y-redis.
Hi @bionicles , thanks for your interest! Just a heads up: Unfortunately, I currently don't have time to work on it. If you are willing to, I'd be happy to help you out if you contribute to this repository.
from y-redis.
sure, I love me some Redis, and CRDTs are fascinating.
Question:
const redis = new Redis()
await redis.flushall()
{
const redisPersistence = new RedisPersistence()
how does RedisPersistence find out about Redis?
from y-redis.
You set the address as a parameter of the RedisPersistence (the default is localhost)
from y-redis.
@dmonad it may make more sense to either accept a factory for redis/cluster clients or 2 instances rather than the configs.
I think its a bit more clear and helps with testing / separation of concerns.
from y-redis.
+1
please!
from y-redis.
+1
from y-redis.
plz +1
from y-redis.
+1
from y-redis.
Related Issues (4)
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 y-redis.