mqttjs / MQTT.js

The MQTT client for Node.js and the browser
Other
8.59k stars 1.42k forks source link

Mosca or MQTT.js to create a MQTT Chat Proxy Server? #376

Closed alliv8 closed 8 years ago

alliv8 commented 8 years ago

I'm working on creating a clustered chat app using MQTT and Aerospike/Redis. The idea is to use Mosquitto as the underlying brokers connected via bridge mode and have public facing MQTT Proxy Servers responsible for the Auth, Security and logic.

Which would be the correct library to deploy? MQTT.js Server or Mosca?

alliv8 commented 8 years ago

Sorry for that. Went through Mosca in detail and loved the abstraction with ascaltatore. I think we'll go ahead with Mosca keeping Mosquitto as the backend for Ascaltatore, and Aerospike as the persistence layer. We'll be writing a persistence wrapper for Aerospike as well.

mcollina commented 8 years ago

I'm splitting Mosca and Ascoltatori into multiple modules. Check out Aedes.

alliv8 commented 8 years ago

Oh, we're just about to start using Mosca in production. We're looking at overriding the client.js & server.js prototype functions to fit in our custom logic. We have a requirement of modifying the payload at the proxy server layer before sending it to mosquitto.

Please share your thoughts on this. Thanks

On Sun, Jan 24, 2016 at 8:06 PM, Matteo Collina notifications@github.com wrote:

I'm splitting Mosca and Ascoltatori into multiple modules. Check out Aedes http://npm.im/aedes.

— Reply to this email directly or view it on GitHub https://github.com/mqttjs/MQTT.js/issues/376#issuecomment-174303781.

mcollina commented 8 years ago

Aedes already provides that: https://github.com/mcollina/aedes#instanceauthorizepublishclient-packet-doneerr

alliv8 commented 8 years ago

But MQEmitter is backed by memory right? I'm looking to have Mosquitto as the backend

mcollina commented 8 years ago

@alliv8 you can use redis: https://gist.github.com/mcollina/a37f135136192d9c58a4. Other options coming soon.