Node.js + CouchDB vs CouchDB

后端 未结 5 1731
感情败类
感情败类 2021-02-04 10:20

I\'m questioning myself why should I use combination of Node.js + CouchDB versus CouchDB standalone approach. What are the benefits of getting Node.js into the game? Any comment

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-04 10:42

    What Node can do and CouchDB cannot

    Node.js can do inter-process communication using unix sockets, real time file uploads, it can start a websocket server or even a SPDY server.
    You can create a DNS server or even handle some geo targeting stuff (MaxMind db).

    Nice stuff CouchDB can do

    However there are a lot of interesting things you can do with CouchDB, even if they would be a little more difficult to achieve. For example using the _changes feature you could do inter-process communication, a real-time chat system (long-polling).

    I'm no expert (but CouchDB is top priority on my to-learn list), but I guess you could also simulate sessions for logged in users.

    CouchDB is amazing and so is Node.js, so the important thing is what application are you planning to develop, what's your use case.

提交回复
热议问题