Support multiple orgs on the same instance
Transparently divide a single server into several different instances shared between different groups of users.
Evaluate https://atmospherejs.com/mizzao/partitioner
Hi! We might be interested in helping on this one.
Is it to be the same 'teams' feature as on Slack? Has anyone started on it yet?
Cool. Please join the #contributors channel on the demo chat. Can definitely use the help, especially if you guys have experience in working with mizzao:partioner already!
Not used it, but reading the docs and discussion, seems like a nice solution. Will see you in the chat room soon!
Great, @mhurwi ! Catch you on demo soon. Can't wait to see what sort of real world performance hit partitioning brings. Day job's got me running 'round in circles on a Sunday :grinning:
THe good news is, I just talked to 2 companies that want this feature so bad, they will allocate their own developers to contribute and build it :)
One of the companies if from around the block, so they will just come to the office for a few days and work from here.
:+1: this is awesome
Haha what a team! @mhurwi , you just got yourself some teamates from the real sunny south! :grinning:
Partition is the same as "team" at slack? At slack, one user(email)can create and join multiple teams, can can switch team. If Partition is only a solution like load balance, rocket cloud add team feature at one instance first.
One thing about mizzao:meteor-partitioner: it seems set up to allow one user to belong to only one group.
https://github.com/mizzao/meteor-partitioner/blob/master/grouping.coffee#L19-L23
Partitioner.setUserGroup = (userId, groupId) ->
check(userId, String)
check(groupId, String)
if Grouping.findOne(userId)
throw new Meteor.Error(403, "User is already in a group")
This makes sense, compared to Slack. From my experience, Slack requires a unique new password for each team. That could mean that each team represents a new instance and behind the scenes, on Slack I have a separate account for each team I belong to.
Maybe using meteor-partitioner would require creating a new account for a user when they want to join a new group?
Not sure what you all think about this?
Just copying a post from the other thread (use a context id):
Can we 'virtualise' the real email + an appearance id ... and then gen a unique guid email to be used by meteor?? just a thought
the appearance id might just be a 'context identifier', from which white-labeled instance (or a team name) the user is logging in from (as), for example:
([email protected] + 'rocketchat team') -> [email protected] ([email protected] + 'sings own family chat') -> [email protected]
I think we should look into mizzao:partioner, but not use it, just understand it and apply some of the logic into our project. The main reason being that we want this behaviour to be optional. Some organization will just want a very simple Rocket.Chat deployment, for a single team. So we need to add the hooks on the right places, and only activate them via settings.
I suggest to add the "team" feature as optional settings. And then consider how to expand one instance to more.
@liuliming2008 that's a completely separate thing and is being tracked here. RocketChat/Rocket.Chat#520
High Availability / Scaling to multiple instances.
Lets implement that using the new abstraction layer at
Rocket.Chat/packages/rocketchat-lib/server/models/_Base.coffee
Althou we will use the word "TEAMS" to denominate the enviroment variable, the property name on the schema should be configurable, so we can keep compatibility with https://atmospherejs.com/mizzao/partitioner as they use _groupId
Hello guys. I'll work on this issue on the next days! As @engelgabriel said before, we have a product that needs this feature and will be a pleasure for me to help.
Yesterday I was talking with @engelgabriel and @rodrigok about the first steps to develop and the suggestion was to start changing this file: https://github.com/joaocarloscabral/Rocket.Chat/blob/master/packages/rocketchat-lib/server/models/_Base.coffee
The idea is intercept all calls to DB, add a property named as _teamId and check if the property was not changed from the client.
Right? :)
@joaocarloscabral Take a look on the link below for how to grab the connection object for that fiber. https://github.com/RocketChat/Rocket.Chat/compare/EnvironmentConnection#diff-e214084ef39ef04ea8cfce4bd72a420bR26
@engelgabriel when I think teams i'm thinking of an organizational unit. A way to say this user is part of this team, this channel is part of this team. A way of visually organizing and displaying things. But essentially its still all in the same organization, and same instance and they could directly interact with other teams.
Like Company X has:
- Sales Team
- Marketing Team
- Engineering Team
Etc, but they can still talk in general shared channels.
When I read through this thread, this looks like you guys are talking multi-organizational support? Or partitioning of a single server to be able to take care of multiple organizations. Completely separate but on the same instance.
I'm I correct in thinking this is actually multi-organization support not really teams?
We are in favor of 'multi-organization'. We use slack this way-- each team is a different customer organization that we manage. These different organizations do not talk to each other.
'sales team' and 'marketing team' seem like people that belong to the same organization. They can use private channels to stay separate, but they can still direct message whoever they want and also join in the public channels.
@mhurwi right that makes sense that you would have the option to separate out to a multi-org if you want isolation between teams.
@engelgabriel I'm going to go ahead and change this title so we its a little more clear.