Git Product home page Git Product logo

Comments (9)

mcollina avatar mcollina commented on July 30, 2024 2

you can embed Mosca and use its own API to do all the above things

from mosca.

wallies avatar wallies commented on July 30, 2024

could you not just use PM2 instead https://github.com/Unitech/pm2. This has a built-in loadbalancer which uses the node-cluster module.

from mosca.

mcollina avatar mcollina commented on July 30, 2024

This is not going to happen, as Mosca requires a database. If it's LevelDB is an embedded one, and it's impossible to use inside cluster. If it's a remote one, then you can just spawn a set of Moscas and connect them to a remote broker.

So, it's not needed.

from mosca.

mcollina avatar mcollina commented on July 30, 2024

It seems it will be possible to use LevelDB across multiple clustered instances with Level/party#1.

from mosca.

mcollina avatar mcollina commented on July 30, 2024

You can launch multiple mosca instances using Redis or Mongo.

No plans at the moment, but if you want to contribute I'll help you.

from mosca.

fubuki avatar fubuki commented on July 30, 2024

Thanks for your reply. I use mulitple mosca instances with MongoDB. It works.
About cluster. I just think can we use redis or something to implement cluster just like socket.io.

from mosca.

karthik2883 avatar karthik2883 commented on July 30, 2024

Is it possible to have plugin option in mosca ?

from mosca.

mcollina avatar mcollina commented on July 30, 2024

@karthik2883 what do you mean?

from mosca.

karthik2883 avatar karthik2883 commented on July 30, 2024

I mean custom plugin option (callbacks) .
Some Mqtt broker are giving custom plugin option (callbacks) which can be customize to fit the requirement
Example

  1. Authenticate user with database,
  2. Add or subscribe to default topics
  3. Save all the publish message into the db ,
  4. Publish message internally to the relevant topics
    These are some feature can be handle via plugin.

from mosca.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.