readyset
reactfire
readyset | reactfire | |
---|---|---|
24 | 17 | |
3,882 | 3,477 | |
1.7% | 0.2% | |
9.8 | 4.2 | |
6 days ago | 22 days ago | |
Rust | TypeScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
readyset
-
Ask HN: How Can I Make My Front End React to Database Changes in Real-Time?
- Some platforms like Supabase Realtime [3] and Firebase offer subscription models to database changes, but these solutions fall short when dealing with complex queries involving joins or group-bys.
My vision is that the modern frontend to behave like a series of materialized views that dynamically update as the underlying data changes. Current state management libraries handle state trees well but don't seamlessly integrate with relational or graph-like database structures.
The only thing I can think of is to implement it by myself, which sounds like a big PITA.
Anything goes, Brainstorm with me. Is it causing you headaches as well? Are you familiar with an efficient solution? how are you all tackling it?
[1] https://readyset.io/
-
FLaNK Stack 26 February 2024
Postgresql + MySQL Cache https://github.com/readysettech/readyset
-
Readyset: A MySQL and Postgres wire-compatible caching layer
I just wanted to give a high five for having Jepsen tests for this: https://github.com/readysettech/readyset/tree/stable-240117/...
-
Fine-grained caching strategies of dynamic queries
This example is a great use case for partial incremental view maintenance systems like ReadySet: you automatically get something like the “prepopulating the cache” section (toward the end of the blog) while only caching the data the application is using, and avoiding the need to manually implement any sort of invalidation logic.
(Disclaimer: I used to work for them, but don’t anymore. It’s all available for free on GitHub though for anyone interested: https://github.com/readysettech/readyset)
-
Squeeze the hell out of the system you have
There are systems that will do that for you like https://readyset.io/.
-
Production grade databases in Rust
ReadySet
-
Dozer: A scalable Real-Time Data APIs backend written in Rust
readyset.io is the company that jonhoo was associated with for work on noria
-
I'm building Memories, a FOSS alternative to Google Photos with a focus on UX and performance
Might be interesting to try out https://readyset.io for this use case.
- Materialized View: SQL Queries on Steroids
-
Tips on scaling a monolithic Rust web server?
On the caching topic, I found the ReadySet(né Noria) approach to be extremely interesting.
reactfire
-
Angular Fire equivalent for React?
ReactFire
- How can I use Firebase to monitor live circuit tripping in a train IoT project?
-
Can't call Google Cloud Function from a react app. I get googleauth.js:17 Uncaught Error: Cannot find module 'child_process' in my browser's console
Are you using Firebase? If not, you probably should. You can call functions (with Auth) from your react app. There's a framework you can use to help: https://github.com/FirebaseExtended/reactfire
-
Convex vs. Firebase
I was an early developer at Firebase. I think we made Firebase so easy to use and never spoke on about the technicals that the whole software ecosystem now underestimates the complexity involved. I see various Firebase competitors asserting various "mistakes it makes" without really understanding what it delivers, which is understandable because we never marketed it like that because we spoke only about how it can help you build easier.
The idea that n queries instead of a join is slow is not as true as you would think. Firestore supports streaming and pipelines at its core, and can reuse cache across operations. At the end of the day, the data goes over a narrow network channel. If you can saturate the channel, and don't leave any gaps, what's the performance difference if the data comes from a single query or many that are back-to-back. The data is transferred to the client either way. Both Firebase databases are pipelined, so this "many round trip" argument is not a decent argument if the client can issue the queries without waiting for responses (such as the code in this article).
The other is consistency levels and correctness. I constantly see devs call Firebase an eventually consistent database which is wrong, its causally consistent [1], and this makes a huge difference when trying to do OLTP. The offline capabilities are built on the consistency primitives, and it's the only way it can work. So while this convex article is banging on about "End-to-End Correctness Philosophy", they miss the most important quality of correctness, and if they are not careful, will miss the required engineering, and then be unable to deliver an offline cache over real-time streams. I see this playing out with Supabase, I warned them personally before they got into YCombinator that what they were building was not causally consistent. Since then, they have had to rearchitect their real-time features after shipping them. (I have not reviewed their latest design yet so I have no idea whether they have it right yet).
Many things sucked about Firebase. The bespoke security rules and the lack of views. So Convex is on the money shipping functions on the backend. I think Supabase is shipping competitors' mistakes with row-level security language. Personally, I think Firebase's mistakes can be fixed with the addition of an open-source Firebase server [1], as the clients are already open source and the mistakes are all to do with just the server. The real tech was always in the clients anyway (offline cache, connection management, operation queues).
It will be interesting to see if building expressly for React is a good idea. Firebase shipped many adapters, like https://github.com/FirebaseExtended/reactfire, using the "thin-waist" principle of not over-fitting. But Javascript technology moved from callbacks to async while Firebase was in the field, so the current API is not now idiomatic. But convex is setting itself for even more ecosystem fragility, what if React changes API or falls out of favor? This is a big risk! I hope they can roll with whatever happens!
[1] https://observablehq.com/@tomlarkworthy/redis-backend-1
-
Do you have to use an ODM for firestore?
Since you mentioned you're also using React, we have a React specific library (ReactFire) that also helps out quite a bit.
-
Get current user firestore database
Use ReactFire! It's our official library for React and Firebase. It has a bunch of useful hooks that probably handle most of the actions you are looking to do.
-
Intro To ReactFire v4 - Login, Logout Create Account And Protected Routes
This is a quick walkthrough of a code example using ReactFire v4 in an application. The application supports login, logout, create an account, and protected routes. We also walk through two approaches for protecting routes since the AuthCheck component that existed in v3 no longer exists in v4 of ReactFire.
-
Is state management (React Context, Redux) really needed for Firebase?
FWIW check out ReactFire, it gives you hooks and context for Firebase. Will likely feel more natural than using the vanilla platform-agnostic SDK.
-
React Query + Firestore = ❤️
reactfire
What are some alternatives?
materialize - The data warehouse for operational workloads.
react-query-firebase - React Query hooks for managing asynchronous operations with Firebase. Supports Authentication, Analytics, Firestore & Realtime Database.
noria - Fast web applications through dynamic, partially-stateful dataflow
use-pagination-firestore - 🔥 React hook for non-cumulative pagination of Firebase Firestore collections
singleflight - Rust port of Go's singleflight package
strapi-connector-firestore - Strapi database connector for Firestore database on Google Cloud Platform.
chiselstrike - ChiselStrike abstracts common backends components like databases and message queues, and let you drive them from a convenient TypeScript business logic layer
rowy - Low-code backend platform. Manage database on spreadsheet-like UI and build cloud functions workflows in JS/TS, all in your browser.
googleapis - Public interface definitions of Google APIs.
react-famous - React bridge to Famo.us
genSQL - A SQL generator tool to create random rows for test schemas
Redux Slim Async - :alien: A Redux middleware to ease the pain of tracking the status of an async action