Scaling Open Source Realtime Messaging System for Millions
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 542 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/61773 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
00:00
Open sourceProjective planeSystem programmingDifferent (Kate Ryan album)Open setReal-time operating systemScaling (geometry)Bit
01:02
Event horizonDigital filterDatabaseBefehlsprozessorRead-only memoryScaling (geometry)Instance (computer science)Message passingPlateau's problemOnline chatTape driveNetwork socketCodeMobile appService (economics)Scale (map)Streaming mediaSoftware frameworkMetric systemCache (computing)Model theoryModul <Datentyp>BenchmarkGroup actionSystem programmingAxiom of choiceTask (computing)Module (mathematics)AuthenticationMobile appExterior algebraService (economics)Library (computing)Metric systemRemote procedure callDifferent (Kate Ryan album)Functional (mathematics)Online helpOnline chatOffice suiteComputer configurationSystem callArithmetic meanCuboidOrder (biology)Revision controlOpen sourceRoutingSoftware architectureVirtual machineRobotMereologyService-oriented architectureMessage passingExtension (kinesiology)Computer animation
06:14
Port scannerSystem programmingClient (computing)Point cloudProgram flowchart
06:24
Scaling (geometry)Open sourceOnline helpView (database)File formatGamma functionGroup actionSoftware frameworkBenchmarkLemma (mathematics)System programmingAdaptive behaviorQueue (abstract data type)Formal languageSoftware developerSystem callService (economics)Interface (computing)Proxy serverSocial classParameter (computer programming)Concurrency (computer science)BefehlsprozessorInstance (computer science)Software developerUsabilityDifferent (Kate Ryan album)Maxima and minimaEnterprise architecturePerfect groupImplementationSoftware testingMobile appSemiconductor memoryBefehlsprozessorVolume (thermodynamics)Extension (kinesiology)Instance (computer science)Task (computing)Structural loadInteractive televisionQueue (abstract data type)Group actionDivision (mathematics)Open sourceComputer animation
09:02
Different (Kate Ryan album)BitMatrix (mathematics)Component-based software engineeringCausalityProjective planeLibrary (computing)Information security2 (number)Lattice (order)Revision controlCartesian coordinate systemMultiplication signEncryptionSelf-organizationImplementationCommunications protocolService (economics)Decision theoryComputer animation
12:11
Program flowchart
Transcript: English(auto-generated)
00:13
All right, sorry for the delays, I had a little bit of technical difficulties. My name is Flores van Geel and since 2010 I'm an open source enthusiast and since 2014
00:27
when I joined my first FOSDEM as a speaker, after that I became an open source, cross open source fanatic. So I really, really love and appreciate when different open source projects come together and they strengthen each other's power.
00:43
And for RocketChat I'm a community liaison, so I help to engage with community and support and so forth. So let's get to the chase, why we're here, scaling open source real time and messaging systems for the millions.
01:02
Starts off with what is RocketChat, who here knows what is RocketChat? We see a few hands there, like half the room already knows it, so that's great, lots of engagement. In general, people know about this side of the story, which is like team chat, like you know from Slack or Teams if you use that stuff.
01:21
There's different order variants, also open source. The cool thing about RocketChat is that it is not the master of chat, that it wants to control all the chat, no, it wants to include as much different chat services as possible. Thus, if you look up, there is Omnichannel, imagine you have like a company with support
01:41
or sales offices and those have clients. And clients, they don't want to install yet another thing on their phone, no. What they do, they have email, they have SMS, they have WhatsApp, they have WeChat, they have whatever telegram, you name a few, so I'm not commercializing one of those. And it will connect via an app to the Omnichannel, meaning that the people in the backlog
02:04
who have to process that, they can directly route it and solve the issues. On top of that, you can add bots with BotPress or Rasa and that help to automate the task of the people doing those great chores that make business.
02:21
Since version five, there's the option with the metrics to federate, not just to another RocketChat, but also to other home services. So it's not longer like we're on an island sitting and please come to us and chat with us, no. Actively federating and working and collaborating together, all of us.
02:45
And then as an extra sauce on the cake, RocketChat has a very extended API, not just the normal service calls that you know for creating users and so forth. No, it also has a real-time API, which means that inside your app or game, you can directly engage with the message flows and with the chat.
03:05
Then when it comes down to voice calling, RocketChat is agnostic. It's not part of the core. We support mainly the chat. So for voice calling, you can make your choices. You can use Jitsi from out of the box.
03:21
You can add big button or if needed for corporate reasons, Teams or Google or a few others. So that's about RocketChat. Now, RocketChat is built like many other software architectures as a monolith,
03:40
meaning that it is one service that's supposed to do everything. And that is pretty nice if you have a medium-sized organization, except when things start to scale, you get running into issues. So it's based upon MongoDB. That's important to know.
04:01
Originally, it was built in Meteor because at the time, it was the best and fastest and most efficient route of making a real-time chat service. So this monolith, you can scale it horizontally by adding more and combining more monoliths,
04:22
which obviously has an extent and you cannot reach beyond a certain point of users. So what RocketChat did after version 5 going into 6, is re-architecting this monolith into a microservices architecture. You still have the same MongoDB cluster, but on top of there,
04:44
there is different services like authentication and presence and the actual chats. Those get divided and they can fail individually and be restarted individually. So you don't have a dependency that if one little thing breaks, that your whole system is down.
05:04
And on top of that, it has the ability to keep on scaling this way. In order to change this architecture, a new library was chosen. In this case, it's called molecular. And there are alternatives on the market,
05:23
but due to functionality and exchange of libraries and code, this module was chosen. It's MRT licensed, extensible, and the most important part is this part here. We want to use NATs, but it can also work great with MQTT and other machine brokers like Kaka.
05:47
Furthermore, there are many adapters, caching, and extra great features to add upon. So in this re-architecting, this monocular was the primary choice. Why is that so?
06:02
There are options which are actually faster. You see here this one, Kote, like faster. But the difference is between having your remote actions, remote calls, and your internal call. Oh, no. Next cloud is acting up. Sorry for that.
06:24
And then go back to this one. Still, still followed. The cool thing about molecular is that you can change between these remote and local actions. And you can switch them within a proxy.
06:43
And due to this flexibility, that's the reason why this is chosen as the primary driver for the architecture of microservices. And then NATs is pretty straightforward. I imagine that most people in the room have heard about NATs as a standard.
07:03
It's open source Apache 2. Very modern, fast. It has very different ways of implementation examples. And the main downside is that it doesn't support queues. And that is solved by inside the Mongo queue runner that will take over the division of those queue tasks.
07:28
And that has also great advantages due to using these libraries. It is possible to make interactive extensions for developers. And that's also something that we've been facing with coming from Meteor to React and TypeScript for the apps.
07:47
Is that it's much easier for modern days developer to adopt the software. And thus the community has more impulse for growth. We'll talk about that.
08:01
Okay, perfect. Two minutes left. So in results, if we look down, this one is the monolith. It's built on 4K concurrent users due to the fact that that was the maximum that it could hold and could serve. And doing so, it has usage of 12GB of RAM as well as 15 virtual CPUs on this Amazon instance to test it.
08:26
And for the new architecture, the microservices, it could hit over 50K with ease. But for making the tests equally, the test was made with 4K concurrent users.
08:41
And then you see that the load on the CPUs and the usage of memory is actively reduced. It's only using 3 CPUs and 5GB of memory to perform the same amount of volume of users who are actively chatting.
09:01
So, if you want to learn more about RocketChat, this is our main place where we communicate within the company. It's open.rocket.chat and it's open for community, it's open for support. Everything happens in one place. Sometimes there's a little bit of an earthquake due to some updates or a new version which is deployed.
09:22
But within 30 minutes, that's all okay. That means that we take our own pain and thus not leave the pain at our clients. And the project itself you can find on GitHub. And if you GitHub one little bit up, there is many different implementations and add-ons and libraries
09:42
that help you to integrate RocketChat within your applications as well as connect with its APIs and its services. I still have 30 seconds left for questions. You mentioned I seem to recall that not that long ago you guys announced that you were supposed to be using Matrix as the protocol.
10:13
What would you say if someone was thinking about choosing one? Like what does RocketChat add on top of what Matrix provides?
10:22
Yes, I've had this question many times at the booth and it's pretty easy to answer. So what is the added value of RocketChat compared to the Matrix? Because the Matrix is already really, really great, if I translate it correctly. And that is actually within tech-savviness. All of us here at Fosdom, we're all so-to-call nerds or geeks or very technical people that can take this Matrix and make it work.
10:48
And specifically if you look at marketing or sales or other roles that are not so tech -savvy, it's much easier to use RocketChat, specifically with the omni-channel and engaging with the customers.
11:04
UI looks a bit like Slack, however it's more slick and it's faster, so it's easier to adapt. And that would be the incentive to say, okay, go for the RocketChat. If you have a tech-savvy organization and you want to deep dive and include WebRTC and have all these components under your own control, go for the Matrix.
11:27
Both have on-prem possibilities, data interoperability, security and to-end encryption. So that's not the real cause for making this decision.
11:42
Any other questions? Okay, then I thank you very much for attending this late at the last slot. And if any questions pop up, feel free to join OpenRocketChat, contact me, contact Duda, contact Gabriel or anyone that is within there.
12:03
Thank you.