last day (15 days later) » 

3:36 PM
-2
Q: Is hands-off server-less PouchDB replication after twilio authentication practical?

Nick CarducciI see some SO questions about replicating between CouchDB and PouchDB, but how feasible is hands-off PouchDB replication so that [2] a user signs in to live sync their plans/chat from their other devices? I've watched this video twice, I'll probably watch it two more times before I try to implem...

 
What do you mean by "hands-off"? And what is "feasible" to you?
 
hands-off means the pouchdb on user devices does not sync to a couchdb
 
So what is it replicating to, then?
 
feasible means ...do-able with these strategies before I commit to them
replicating to a user's multiple devices after authenticating to sync them. otherwise the pouchdb users don't really need to sign in
 
So you want various PouchDB clients to replicate to each other, with no server?
 
3:36 PM
yes I'm sure I'll find directions in pouchdb docs I just wanted some feedback/stories of experiences on the strategy, since I can't find an open-source example that's similar
 
PouchDB -> PouchDB sync is not possible, due to the fact that PouchDB does not have a complete replication protocol implementation. A server is required. Full sync doesn't make much sense in PouchDB, anyway, since it's meant to run in the browser, where accepting TCP connections isn't possible. Although your sync server doesn't need to be CouchDB. You could use PouchDB-server for instance.
 
aw man that would have been great for user privacy
 
If privacy is your concern, you can encrypt your documents. Have a look at Crypto Pouch, for example.
In theory, I suppose it would be possible to do PouchDB -> PouchDB replication via websockets or similar, but I believe it would require significant effort to add that support to PouchDB, and I'm not sure it's really very valuable--and even then a server would need to be involved, it just wouldn't need to be running CouchDB. It would act as a websockets proxy.
 
what do you mean by "full sync" doesn't make sense in pouchdb?
 
I mean: If you have two PouchDB clients, A, and B, how do you expect A to connect to B? They're both running in a browser. There's no network port to connect to.
 
3:36 PM
It is valuable so that I don't have to store user data, encrypted (won't I have the key?) or not
so I can create a port, that's good news to look into
 
huh? You can't open a port. Browsers don't have that capability.
This looks a lot like an XY Problem. I'm pretty sure you're making this far more complex than it needs to be.
 
idk what xy problem is, you said I can do websockets, which I guess you are saying isn't a port (same thing as TCP)?
 
I said in theory websockets might be possible. But it'd probably take several months of development work by people with intimate knowledge of PouchDB and CouchDB replication protocol, and building a proxy server. It's not a trivial task. It's theoretically possible, in much the same way landing on Mars is theoretically possible.
Implementing the CouchDB replication protocol is not simple (I can say this from personal experience). Making it even more difficult by using a new protocol only adds to the complication.
XY Problem <-- Read this.
 
wow and you're not exaggerating I assume. could you guess how many lines of node.js it would take. thanks I might hire someone
 
If you want to hire someone for custom CouchDB/PouchDB work, there are people available (myself included, as well as some of the core developers). It won't be cheap. But the first step is to make sure this isn't an XY Problem.
 
3:36 PM
ok per xy problem what I am trying to solve is local storage replication without server, I think I can do now because of you (with difficulty however) websockets with pouchdb or rxdb
 
I suggest asking about your actual problem to solve, either here, or on the CouchDB Slack channel or PouchDB IRC channel, and see what you can find. Only if this Pouch->Pouch sync is then deemed the best solution, should you even consider hiring someone to do this work.
"without a server" is still part of your solution (Y). What is the actual problem (X)?
 
x = I don't want to store user data, only passwords and public events (in another part of the app)
 
user data meaning data about the user?
Or data owned by the user?
 
plans and chats
latter
 
What kind of app are you developing? A chat client or so?
 
3:38 PM
yes thumbprint.us
is info
a social calendar with reactjs
 
So you're trying to use PouchDB for real-time messaging?
 
I think that's probably a mistake. PouchDB isn't designed for real-time.
 
rxdb?
 
I'm unfamiliar with that.
 
3:40 PM
I like local storage, it can help attain end-to-end encryption, how else is e2e done?
 
Pouch/Couch offer eventual consistency. In some cases that might be good enough for human-scale "real-time", but it's really a different approach, probably not what you want.
 
that's ok
 
But it's really about data, not messaging
 
yeah it doesn't have to be the fastest or uptodate if there is no internet... how else anyway would it be up to date
 
Well, my gut tells me Pouch is the wrong tool for this job.
I'm sure you can shoe-horn it in... "Give a man a hammer" and all that
 
3:42 PM
haha
 
but I think you'd be better off looking for something closer to what you already need
 
I'm surprised
what I already need?
 
Unfortunately, I don't know what to suggest.
 
oh
before you go
 
sorry, I meant "what you really need"
 
3:43 PM
Another question I was thinking of using chatkit with pouchdb, do you know about that or socket.io and compatability with pouch to pouch via websocket which you're against haha
idk what else
I'll keep asking people of course for alternatives
 
I don't. I'm not a frontend guy really
 
So I don't know much about web libraries, unfortunately
You might ask on the PouchDB channel on IRC anyway
if nothing else, maybe you'll get confirmation that it's the wrong tool.... and maybe someone there can recommend a better tool
 
you did sort of tell me this is possible, but thanks for the forewarning of troubles ahead with it and to look for alts
 
Or maybe someone there will surprise me and tell you that PouchDB is perfect for your case
 
3:45 PM
I'll ask there ok
hahaha
I hope
 
:)
Good luck
 
ok thx
 
 
3 hours later…
6:41 PM
I see an ngnix welcome page at [1] this link for the slack link from [2] this blogpost

[1] http://slack.pouchdb.com/ [2] https://pouchdb.com/2015/09/01/pouchdb-4.0.1-gotta-go-fast.html. do I have . to learn irc?
gonna try kiwiirc
is that the server>? irc://freenode.net/#pouchdb
 
7:06 PM
hmm I tried #pouchdb on freenode... I'll email someone from pouch to find a place to ask
 

last day (15 days later) »