Arnold Schneider
Arnold Schneider

Reputation: 43

How to share dynamic properties between java and node.js apps

I have an app, most of the code written on java, but web chat written on node.js. How can I share properties like a max requests per second, cdn host etc, between two applications? May be redis ?

Upvotes: 1

Views: 105

Answers (1)

rsp
rsp

Reputation: 111456

There are many ways to do that and Redis is one of them. Redis would be particularly well suited if your data fits in RAM and you need high performance. In theory you could use any other database for that but if your data changes often and you need it up to date then any database that stores data on disk may be out of question and you'll be left with Redis, Memchached etc.

Another way to sync your data would be to use some pub/sub solution to notify your processes about changes to the data made by the other peocess, or using a queue system like RabbitMQ, ZeroMQ, ActiveMQ, NSQ. Some databases like CouchDB and RethinkDB give you a change feed to which your processes can subscribe to get instant notifications about any data changes.

Upvotes: 1

Related Questions