appy-one / acebase-client

Client to connect to remote AceBase NoSQL database server
MIT License
21 stars 8 forks source link

[discussion] Connect browser-based client to a local browser-based server? #9

Closed willrogers007 closed 3 years ago

willrogers007 commented 3 years ago

Not meant so much as an issue to be solved, but more of a discussion topic / tentative-feature-request-if-it-makes-sense.

In the docs I've seen an example of a client using a local server as a cache, but I haven't seen an example of a client connecting to a local server as it would to a remote server.

The client creation options seem to expect a host/port, whereas I'd love to just pass a living server object reference in.

I imagine this could have some wild uses, especially if plugging it into something like WebRTC. Could enable a peer-to-peer database system, piggybacking on the acebase-server's ability to have authentication, access rules & schemas.

Anyways, color me intrigued; I'd be excited to explore in that direction.

appy-one commented 3 years ago

Exactly what I've been thinking about the past weeks - using WebRTC for cross-browser synchronization. I'll be committing new IPC code for node clusters somewhere this week, which shares code for cross-browser-tab communication and leaves room for additional IPC implementations.