Hi team. Can we have client (from javascript) to publish in redis via node.js?
Some thing like this in socket.js:
var r = redis.createClient(12311); //already in the file
socket.on('redis_emit', function(channel, msg) {
r.publish(channel, msg);
});
and from javascript we can send like this:
frappe.socket.socket.emit('redis_emit', "teste_channel", "message!!!");
Of course we can call frappe whitelist method but this way we put more load in python server.
Thanks.
anand
2
Sure. We have a use case which requires this. Can you raise a github issue?
Done: Node.js Notifications from client to server #1374
1 Like