Show HN: Firenook – Firebase emulators in Rust: 40× faster writes, 10× less RAM
Posted by sanjevirau 1 day ago
Hi HN, we have been developing with Firebase for a long time, and the only way Firebase developers can build apps without directly costing them is using the official Firebase Emulator Suite.
However, the issue with this suite is, it's dependent and running on Java with a old Console UI (not updated in years), that was not built to support tons and millions of data and has pretty bad developer experience. For a long time, we were hitting Out of Memory on even high specs laptop while developing and the worst part is while this happens all the persists data keep getting lost.
We were honestly frustrated with this, and thought what if we built the Firebase Emulator Suite the right way, as it always should have been.
Introducing Firenook, a faster drop-in replacement for Firebase Emulator Suite for Firebase developers. It's 40x faster writes and needs 10x less RAM to run it. We took the right approach of first building it Rust as a single engine, so that there will be no Java dependencies and built from scratch a new Console UI using modern web stacks.
The result is, now we were able to run 2 millions datas loaded to Firenook with only taking around 2GB ram compared to 22GB of the official suite. Things are way faster and rebuilt Console UI gives best developer experience from logging Firebase Functions, to editing Firestore documents in JSON and many more.
We developed this throughly for around 2 months now and ran this internally for a month before we decided it's time to release it to public so that other devs can make use of Firenook and also contribute it to make it better.
Firenook is still new and I'm sure it misses things. So please try it our on your project and let us if there are any issues.
Thank you.
Comments
Comment by jamest 20 hours ago
Comment by sanjevirau 19 hours ago
Comment by joshdavham 20 hours ago
Somewhat off topic question though: if you guys are such skilled developers to be building something as involved as this, why not just use something other than Firebase? I used Firebase mainly as a crutch when I was first getting into web dev, but feel that I’ve sorta outgrown it. Do you feel Firebase still serves developers like you well or are you developing this moreso for people like my old self?
Again, nice work!
Comment by sanjevirau 19 hours ago
And surprisingly, there are still many large scale mobile app and webapps that's running on Firebase. For most of them, the local development without costing them, depends on this local emulators suite.
Compare to the alternatives like Supabase, where the team are really focused on giving best dev exps, for some reason Firebase local development has been the same for a long time.
I personally thought, giving that best dev exps locally for Firebase, could give devs a fresh of breath air for maintaining or developing new projects faster.
Comment by nfw2 16 hours ago
To me, the lack of good developer tooling has been what holds it back. Not having a maintained type-safe querying ORM/ODM library like eg. Prisma or Mongoose is a major flaw imo (not to mention missing out on the coolest firestorm)
Comment by TaterCello 3 hours ago
Firestore now provides MongoDB compatibility and Mongoose suport, so you can use it this way: https://docs.cloud.google.com/firestore/mongodb-compatibilit...
Comment by CharlieDigital 8 hours ago
1. It is practically free for a lot of my projects. Yes, there are also other free platforms out there now, but because Firebase is largely an abstraction on GCP, I have more reach if I need to scale it or move it into a more capable backend that I have full control over (very natural progression from Firebase -> Cloud Run -> GKE Autopilot -> GKE). For a few use cases, I do pay (e.g. keep a warm Function for an auth flow).
2. Firebase auth is still really, really good. It is super easy to get SSO working with Firebase auth. End of the day, it is largely (entirely?) just an abstraction on top of Google OAuth API, but it is by far the easiest and most foolproof of the solutions on Azure, AWS. And again, for most use cases, it is entirely free.
3. A well-designed Firestore backend is for all intents and purposes free for side projects and can still scale without the need to overthink it. I have had a few projects that had big Reddit spikes and Firestore just swallows the volume like a champ (that would have swamped a small Pg instance). I have run several side projects, blogs, etc. for years purely on Firebase because Firestore's free tier is really, really generous and when you pass those limits, the pricing is still reasonable. Ridiculously generous.
4. Firestore gives you real-time websockets with no additional infra needed and again, practically free for most side projects. Cloudflare now has PartyKit which fills the same niche, but Firestore's real-time subscriptions are nice because of how integrated they are into the backing store. Amplify's AppSync (when I used it last) was janky AF; did not like it at all and did not like the fake relational abstraction over DynamoDB (dangerous at scale). Azure SignalR, Web PubSub, and Fluid Relay are not free or they are not usable at the free tier beyond initial sandboxing.
5. It is easy to operate. If you want to run directly on a hyperscaler cloud (AWS, Google, Azure), Firebase is the best tooling. Azure doesn't really have an equivalent. AWS killed off their Copilot CLI[0] which I felt like was approaching the utility of Firebase and not a fan of Amplify (which seems to have changed direction recently). I was a fanboy of CosmosDB, but Microsoft refused to ship a working ARM64 emulator version for YEARS[1] which made it unusable on Mac. I am comfortable operating at any layer of any of AWS, Azure, GCP, but most of the time I only want to when I need to. So Firebase lets me ship something fast, but drop down into the underlying cloud infra when I need to.
6. Until recently, the other platforms did not have great options for emulation. I think AI has changed that and now we are seeing more proliferation of platform emulators. LocalStack, for example, had already locked some of their emulation behind paid licenses. Firebase emulators were pretty complete in terms of what was needed to build and ship an app end to end. The OAuth emulator is still really, really nice.
[0] https://aws.github.io/copilot-cli/ : literally their best infrastructure tooling and they killed it....................
[1] https://github.com/Azure/azure-cosmos-db-emulator-docker/iss...
Comment by tmpz22 19 hours ago
Why didnt you simply provision more powerful developer boxes to handle the needs of the Firebase emulator?
If runtime performance is the moat then won’t Google simply improve on these regressions using their decades of cloud database expertise with projects like Google Spanner?
—-
These are hardball questions and I feel a bit bad asking them, but I believe asking hard questions is kinder than blind adulation and support.
Comment by nfw2 16 hours ago
The developer experience of trying to emualate firebase locally has always been horrible, going on fifteen years, so I would guess no, they won't because they don't care.
Comment by CharlieDigital 7 hours ago
Comment by nfw2 3 hours ago
But local developer experience is still not good compared to Postgres or Mongo.
Comment by CharlieDigital 3 hours ago
I used Firefoo for a while and Google should just buy that product and ship it with Firebase. Otherwise, I have no issues with local Firestore emulation; everything works as I expected it with a few edge cases.
Comment by miserve 2 hours ago
Comment by sanjevirau 19 hours ago
Firstly, we already running of powerful dev boxes but still hitting out of memory issues in the official local emulators. These stronger machines doesn't remove Java or replaces the old console UI or able to loads tons of data.
Google should fix it and it's expected, but for some reason, they haven't really prioritized local tools for local devs. In other ways of saying, some one had to take this in hand and try it out, and well we did :)
Comment by tmpz22 2 hours ago
Comment by silverlight 19 hours ago
Comment by sanjevirau 19 hours ago
Comment by corytheboyd 20 hours ago
> [...] the only way Firebase developers can build apps without directly costing them is using the official Firebase Emulator Suite
We had started on the management UI portion of this at my old job out of similar frustrations. Felt awful seeing what should be a small/medium sized development-only application spew forth Java flotsam.
Comment by sanjevirau 19 hours ago
Comment by codazoda 7 hours ago
Comment by anilgulecha 12 hours ago
Comment by sanjevirau 6 hours ago
Comment by shaolinspirit 9 hours ago
Comment by willdub 20 hours ago
Comment by sanjevirau 19 hours ago
Comment by lenerdenator 6 hours ago
Comment by measurablefunc 21 hours ago
Comment by _minjun_choi 17 hours ago
Comment by citescope 7 hours ago
Comment by vishalps2606 3 hours ago
Comment by joka88xj 10 hours ago
Comment by drrajvanshi 13 hours ago
Comment by lanmu 20 hours ago
Comment by edvong 15 hours ago
Comment by engma7moud3ly 6 hours ago
Comment by sooftware14 15 hours ago