Communicate between a Rails app and a Node.js app

前端 未结 5 2132
长情又很酷
长情又很酷 2021-02-13 14:41

This question follows a previous one: Shall I use Node.js Instead of Rails for Real-time WebApps?

The question:

What\'s the best way of communic

5条回答
  •  悲哀的现实
    2021-02-13 15:14

    One way is to have a common back-end database or some kind of memory storage which will act as intermediary layer between the two technologies. Popular is for example to use NoSQL DB like Redis which is fast, memory based and supports advanced data structures which are handy for this scenario. Also node.js and RoR both have a good client libraries for communication with Redis.

    I would say the main problem is in initial authentication between the two separate systems which both needs to be synchronized. There are similar questions/answers related to this topic which may come useful to read, for example these two shows what are the possible ways how to solve the authentication problem.

提交回复
热议问题