Roomy – alpha 5

The 5th iteration of Roomy, the gardenable group chat, has just landed!
New Website
We've got a new website, a.roomy.space! It's now our main introduction page for what Roomy is and what we are trying to accomplish.
As roomy stabilizes we'll add more explanations and documentation about how Roomy works and how you can use it.

New Features
Updated UI
In this release, Roomy's UI got an update to use the Fox UI framework, which is developed by @flo-bit.dev, who has been leading the UI development for the last two releases.
This will help us get the UI more stable and avoid chasing little glitches.
The new UI doesn't have the same level of theme customization as the old one, and we may add more options in the future, but for now this will help us make sure that, as we add new features, everything works consistently, regardless of the theme that you select.
Work-in-Progress Discord Bridge
While not ready for general use, we started working on our Discord bridge, which will allow Discord admins to opt-in to syncing with a Roomy space.
We partially bridged a couple of our Discord guilds to act as public demo spaces that you can join to test out Roomy:
Right now the spaces are not completely synced and Discord is the "official" source, but we will be working on maturing the bridge to allow fully featured communication between both platforms in the near future.
Stress Testing & Challenges
Hooking up the Discord bridge was a great stress test for Roomy and revealed some weaknesses that we had to work through.
Permission System
While working on the bridge we were noticing some significant slow-downs in the UI compared to previous versions and we also found that the import from Discord into Roomy was going very slow. After some investigation it turned out that the way were were handling permissions with Jazz, our sync engine, had a performance problem that was slowing everything down. Our current setup was designed to allow permissions customization on a per-message basis, but that was creating too many permissions objects.
While it should be possible for Jazz to fix the performance issue, in order to get things functioning right now we worked around it and simplified the permissions model, using the same permissions for all of the messages by the same user.
Bridge Import
Simplifying permissions sped things up dramatically and fixed our UI slow-downs, but we were still having sync timeouts, slow-downs, and out-of-memory crashes while trying to import thousands of messages.
We haven't tracked down the source of the issue yet, and it's possible be that there's something that we are doing incorrectly, but we're not sure yet. To get the release out, we decided to import just our two demo guilds, and kept restarting the bridge after crashes until the whole history was imported.
This got our demo spaces imported, but it's not something we can let other people try out at this point.
Whole Space Subscription
After working through the import problem, we ran into another issue syncing messages in realtime from Roomy to Discord.
In Jazz, every chat message, channel, etc. is a separate, collaborative value or CoValue
as they are called. When you load a CoValue
you can subscribe to all updates to that value so it stays in sync in realtime with other peers.
This is usually great, and it can work well in the UI so far, but we run into a problem when something like the bridge needs to subscribe to all updates in the entire chat space.
Because each CoValue
must be subscribed to separately, in order for the bridge to detect updates like edits, reactions, etc. to different messages, it would have to open and subscribe to every single chat message in the space. This would take a prohibitive amount of memory on the Discord bridge.
While it is possible for Jazz to support deep subscriptions in the future, and in way that won't require keeping all of the values in memory, we don't have that option yet, so we decided to keep only the channels in memory. This allows us to detect new messages in channels, but we don't be able to detect edits or reactions on previous messages, or messages in threads.
This is not acceptable long-term, we will also run into the same deep subscription problem later, when it comes time to implement push notifications. This set us to doing a lot of thinking about different solutions and architectures.
Event-based Architecture
After running into the performance and subscription problems, I started brainstorming different designs that would help improve performance and give us a way to subscribe to the entire chat space for notifications / bridging.
I liked an idea that I had heard of before about using SQLite on the client side as a local store and query engine, and I started taking some inspiration from livestore.dev. This led to more brainstorming, and lots of great chatting with my fellow Roomy dev @meri and a new Muni Town community member, @ndyg.
After iterating on the idea I think we have a good design plan based on event-sourcing, similar to LiveStore, as well as ideas for how to make it very extensible to handle what we'll need in the future.
This new design will end up the third major iteration of our Leaf protocol idea that we've been thinking about for over a year and it will hopefully be the final re-architecture of Roomy.
The plan is to put together a minimal version of the architecture for Roomy alpha 6, and, if it works, to extend it iteratively with extra features and extensibility so it can be a generic framework used outside of Roomy for other apps.
Consider this a bit of a teaser and we'll have an in-depth overview of the new design later.
Summary
In short, the UI is coming along great and is getting more stable as we iterate on it. We've also go some preliminary work done on a Discord bridge along with lessons learned from the effort.
We're running into limitations with Jazz, our current sync engine, and have started designing a new, simpler iteration of our own sync engine in order to make up for it and give Roomy the performance and features we need to support our specific use-case.
We're making great progress, and I can't wait to come back soon with another update!