Database with websocket?

CouchDB has an http interface that makes it accessible from the server and client. Does something like this exist with the websocket interface?

Thanks in advance for any information!

+4
source share
2 answers

In general, you do not want to directly open your database server through an open interface, so a server application must exist between providing authentication and services such as web sites. It will usually be something like node.js or Tornado .. but since you know about it based on your question tags, what is the actual solution you are looking for?

CouchDB currently does not directly support the websocket interface, but the next version (1.3) seems to include support for the protocol sent by the server , which is widely supported, with the exception of IE (see browser compatibility ).

+3
source

CouchDB seems to support the EventSource feed type for _changes :

https://issues.apache.org/jira/plugins/servlet/mobile#issue/COUCHDB-986

Description

I am implementing an EventSource protocol feed for the _changes API (Feed = "EventSource").

A little about it: http://dev.w3.org/html5/eventsource/ This is more useful than websocket, beacause it is read-only.

Also: consider https://github.com/nolanlawson/socket-pouch :

SocketPouch is a custom PouchDB adapter that proxies all PouchDB APIs and calls another PouchDB running on a server in Node.js. The communication mechanism is Engine.io, the well-known core of Socket.io.

This means that instead of synchronizing via HTTP, SocketPouch synchronizes WebSockets. Thanks to Engine.io, he is returning to polling XHR in browsers that do not support WebSockets.

PouchDB is a CouchDB port in JavaScript designed to run inside a browser (to launch the CouchDB database in a browser) and / or Node.js (as a lightweight replacement or add-on for CouchDB)

+1
source

All Articles