-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syncing multible dbs over a single socket.io connection [feature] #37
Comments
Hi @svogl, is your "piggy version" stable? |
@kripper it's working in a production environment for ~2years now, so 'works for me' :) |
Hi @svogl, I got it working but only without a proxy. When using the same Apache proxy I used with the original socket-pouch version, the request returns a What is your environment? @nolanlawson: Since socket-pouch-voxel is the improved version, shouldn't we merge with the official pouchdb-community version? BTW, I'm commenting here because socket-pouch-voxel has the issues panel disabled. I'm also surprised that socket-pouch's user base is so small, being the only solution to properly work with more than 5 PouchDBs. |
Hi @svogl, I was wrong. Your repo is broken. BTW, I don't understand why all your functions trigger an
This causes problems beacuse the response to a request is emited and processed as a new request causing this kind of stack trace:
Maybe the client is outdated and doesn't support this new "topic" based protocol. This other repo (with a previous version of yours) works fine: |
Nevermind. This repo works perfect, supports multiplexing, socket.io (on top of engine.io) and is clean: |
We wanted to get pouch synchronisation working over an existing socket.io connection (for authorisation, other data) as well as synchronize more than one DB.
For this to work at the server side, we added a piggy() function to the server side that you can pass a reference to an existing socket object and start listening. We typically call this after authorisation has been performed. The synchronisation logic registers for messages with topic 'pouch', when a createDatabase message is received, everything is set up to sync this database using its name for the topic.
On the client side, the existing socket can be passed in the constructor options ( opts.socket = ...).
If you're interested, you can find the current state in this fork:
https://github.com/voxel-dot-at/socket-pouch
Simon
The text was updated successfully, but these errors were encountered: