203 karma · joined September 30, 2016
Awesome initiative!
> ETS as a KV/document store to hold user and application state and then reacting to changes in to that the way you are here
This is actually pretty interesting. I can't speak to ETS but Mnesia has replication and you can expose the replication log using something like https://github.com/emqx/mria. I've only had a cursory look at this so I could be wrong about its capabilities but it would be an awesome extension to the new Realtime if possible.
For Broadcast, we can scale by adding additional nodes to the cluster but up to a point. The current architecture works because every node is aware of all other nodes in the cluster, but this strategy becomes untenable after a certain point. The good news is that we're nowhere near that point and we'll optimize and develop other strategies to circumvent this eventual limitation. We'll also need to carefully manage and process the inflow and outflow of messages on each node to make sure we're not delaying message delivery or using more memory than absolutely necessary.
For Presence, it syncs the joins and leaves from node to node every 1.5 seconds (default) and there will be a point where this work will take longer than that interval. Fortunately, the underlying ORSWOT CRDT implementation can be refactored to make syncing more efficient.
- Broadcast: Cursor movements and messages (floating bubbles next to cursors) sent directly to other players in the room.
- Presence: Whenever someone joins the room, you'll be able to see that person represented as a colored circle in the upper right hand cover. When they leave, then their circle disappears.
- Change Data Capture / Replication: When a player sends a message, that message is inserted into the database, and that change is then broadcast to all players in the room. You can see these message in the chat box in the lower right hand corner.
- Latency: You can see how long it takes your client to send a message to the nearest node in the cluster and have the node respond with a message. This will vary depending on your internet.
I think just being mindful about disk space and CPU usage will be helpful when setting up a database for logical replication because of changes being recorded to WAL files and having Realtime poll the database for changes.
Our initial version of Realtime streams database changes to the server and those get broadcast to clients. However, the only security offered is checking whether or not a JWT is valid when client attempts to connect.
The second and current version of Realtime, which I discussed in this post, checks database role and claims of subscriptions for every database change against RLS policies. This comes with a performance tradeoff as it prioritizes security. We are benchmarking this version in our new Supabase Realtime version and our team will try and optimize performance.
> impacting performance with heavy use of multiplayer
Realtime only needs a single connection to the database, and once a node gets the changes, it'll broadcast them to all other nodes in the cluster which will then be forwarded to all clients. This is highly scalable and nodes can be added in different regions experiencing higher loads. We're going to add in rate limiting to make sure that the cluster remains healthy, but those rate limits can be customized depending on the use case.
I moved to San Francisco last November, and since then, I’ve found it difficult to meet new people due to sheltering in place and social distancing. I’ve tried apps like Chatroulette but found it uncomfortable using my video while chatting with complete strangers.
I wanted to create a safe virtual space for myself and others to connect without sharing our video feeds. I also didn’t want to sacrifice the visual cues that help us communicate in more meaningful ways.
You can customize your avatar by selecting from 7 skin tones, 10 hair styles, and 10 hair colors that are currently available. Feel free to join any room or invite anyone in the lobby to chat. Once you’re in a chat, you’ll speak as you normally do, and through your webcam, you’ll animate your customized avatar with your movements. Users you chat with will hear you and only see your avatar.
Here's my previous post: https://news.ycombinator.com/item?id=24824283.
Looking forward to your feedback and hope you make new friends!
I’m wenbo and I created Alto, short for alone together. The app's purpose is born out of the necessity to meet and converse with others while preserving privacy and comfort.
I wanted to create a safe virtual space for people to connect without worrying about how they look and what they might see. I also didn’t want to sacrifice the visual cues that help human beings communicate in more meaningful ways.
You’ll speak as you normally do, and through your webcam, you’ll animate an avatar with your movements. Users you chat with will hear you and only see your avatar.
I built the app by integrating Pose Animator (https://github.com/yemount/pose-animator), which processes camera frames in-browser and animates SVG characters, with the codebase of a side project.
Future direction:
- Higher fidelity and more diverse avatars
- 3d virtual space for immersive experience
- Spatial audio
Built with Elixir + Phoenix LiveView + Alpine.js + TailwindCSS + WebRTC.
Looking forward to your feedback!
I want to first help students connect with others university-wide. That way, a group of students can discover and connect with each other who otherwise might not because they don't share the same academic goals. Also, Alto is a synchronous platform so it's important that students, immediately after they sign in, can begin video chatting with someone. That's more likely to happen when it's open to the entire student population.
I plan on launching groups in the future, subject to change based on feedback, where any cohort, student org or course can have their own group. At this point, it'll be easier for any student to discover other students based on mutual personal/professional/academic interests and frictionless since everyone will already be on the platform.
What's the demographic of your cohort? Is it based on major, year or some other factor(s)? Is the Discord server you're talking about university-wide or cohort-wide?
I've only used Discord a few times so I'm unfamiliar with its features, but I think Alto has less friction when compared. Alto prioritizes video communication, makes it easy to discover any classmate in your school, and in the future, any classmate associated with any group all in the same place. Additionally, Alto allows you to directly invite another student to a video chat room and know within a few seconds whether or not that person wants to chat without messaging back and forth.
I may be completely wrong about Discord's existing capabilities so you'll have to correct me. Also, I would love to learn more about your experiences attending university remotely and using Discord. Let me know if you're free to chat!
Are you planning on eventually open sourcing Virus Cafe on top of releasing the questions?
I am not affiliated with Plaid.