6 ms·
If you're looking for something like superbase but with a more end-to-end typesafety approach + optimistic updates, check out Thin Backend https://thin.dev/ htt
by _query 4y ago
If you're looking for something like superbase but with a more end-to-end typesafety approach + optimistic updates, check out Thin Backend https://thin.dev/ https://thin.dev/ It takes a bit more of a higher level approach to database operations than superbase, which allows us to do things like optimistic updates that are hard to do in other tools.
- searchableguy 4y agoHow does thin realtime work in the backend and behind the scenes?
- _query 4y agoIt's using Postgres pg_notify to subscribe to tables and using a WebSocket server to distribute the changes. The table watcher is written in Haskell and based on the IHP haskell framework. Using Haskell makes it very easy and efficient to deal with lot's of active sessions in parallel. You can find the source code here https://github.com/digitallyinduced/ihp/blob/master/IHP/DataSync/ControllerImpl.hs https://github.com/digitallyinduced/ihp/blob/master/IHP/Data... if you're interested :)
- searchableguy 4y agoThat's a similar approach to supabase. Why reinvent the wheel? (I'm asking out of curiosity here). Why websockets? Do you allow bidirectional communication? If not, wouldn't it be better to use http push for easier scaling?
- _query 4y ago> That's a similar approach to supabase. Why reinvent the wheel? We've initially built the technology already for IHP DataSync (https://ihp.digitallyinduced.com/Guide/realtime-spas.html https://ihp.digitallyinduced.com/Guide/realtime-spas.html). So we used what we already had here :) > Why websockets? We also use the WebSockets to do write operations. This allows for lower latency than doing a HTTP call for any API call. Additionally we run all operations in parallel. With HTTP push we wouldn't be able to easily run all these operations in parallel.
- searchableguy 4y agoCool. Thanks for answering.
- robertlagrant 4y ago> That's a similar approach to supabase. Why reinvent the wheel? Supabase is a copy of Firebase. Same question?
- searchableguy 4y agoSupabase real time is open source while firebase is not. You cannot provide firebase as part of your services because you cannot self host it. I asked why to understand the reason for another open source implementation.
- robertlagrant 4y agoPoint being you can usefully have two or more of the same type of thing, even if their only difference is the quality of the team building them. That's why the market sustains more than one car of each type.
- wenbo 4y ago> That's a similar approach to supabase I'm a Supabase dev and the maintainer of Supabase Realtime and just wanted to clarify that Realtime works by listening to Postgres' logical replication because we realized early on that it scales better and circumvents the limitations of pg_notify; for example notify has a payload limit of 8000 bytes.
- dexterdog 4y agoIt charges you $2/GB for bandwidth making you poor very quickly.