HNHacker News
TopNewBestAskShowJobs

NathanFlurry

512 karma · joined September 16, 2016

Building open-source actor library, a serverless primitive for stateful workloads.

https://rivet.dev

submissionscomments
NathanFlurry··on Show HN: Rivet Actors – Durable Objects build with Rust, FoundationDB, Isolates
For example – I'm a big proponent of local-first apps, but even those require a sync server. You can easily implement one in under 100 lines of code with actors.
NathanFlurry··on Show HN: Rivet Actors – Durable Objects built with Rust, FoundationDB, Isolates
Hey!

> What kinds of web sites need this level of complexity?

The most common use cases are high contention & strong consistency workloads where using an OLTP database doesn't work well. A few examples:

- Collaborative docs

- Local-first & CRDT sync (e.g. Yjs)

- Stateful multiplayer games, often async multiplayer (e.g. chess)

- Agentic workflows with frequent memory updates

- Chat

- Scheduling software

- Rate limiting

Actors can also be used for stateless realtime workloads that benefit from edge computing, similar to what you would use existing serverless edge functions for.

The actor model is widely used in larger companies. The best-known example is how WhatsApp used Erlang to scale to 900 M users with 50 devs [2]. It's also widely used at Discord, LinkedIn, Microsoft, etc. Take a look at Erlang/Elixir, Akka, and Orleans for prior art.

> Does this have enough performance to solve the server cost problem of Improbable's metaverse back end?

Actors usually have a single responsibility (e.g. document or chat room) while Improbable focused on building expansive worlds without clear boundaries between entities. Our docs include tips on scoping the responsibility of actors [1].

The actor model encourages actor-actor communication, sort of similar how entities in the ECS model communicate in games.

> That's a remote object system too expensive to run 24/7.

Actors automatically go to sleep when unused. They provide the benefit of realtime workloads without the cost of keep idle compute sitting around.

[1] https://rivet.gg/docs/scaling#tips-for-architecting-actors-f...

[2] https://www.wired.com/2015/09/whatsapp-serves-900-million-us....

NathanFlurry··on Show HN: Rivet Actors – Durable Objects build with Rust, FoundationDB, Isolates
You have Godot wired up to talk to FoundationDB? That's incredibly cool, curious about your use case.

Godot runs using our container runtime on Rivet. The FDB API for containers is currently undocumented. I'd be happy to share early access on Discord – https://rivet.gg/discord

Games running on Rivet usually have a hybrid of actors that handle persistent storage (e.g. a matchmaker) and the game server itself.

NathanFlurry··on Show HN: Rivet Actors – Durable Objects built with Rust, FoundationDB, Isolates
Yep! Same repo, lots of changes. Since we were on HN in 2023, we've:

- Rewrote Nomad from scratch with our own in-house workflow engine

- Launched Rivet Actors and isolate runtime

- Overhauled our OSS experience to make self-hosting easier

- Rewrote frontend from scratch with shadcn to be like the cool kids

- Replaced Nebula with mTLS

- Completely stripped out Redis for non-caching use cases

We've also opened up the platform to non-gaming use cases.

NathanFlurry··on SDL-based Lua programming environment for kids similar to Codea
I learned to program in Codea since I only had access to an iPad when I was younger. I published my first game on the App Store with it and threw me into the world of Objective-C. I'm really glad to see people are still using it to learn to program.

To this day, I still believe it's one of the best ways to learn to program:

- You're exposed to low-level primitives instead of complicated high-level frameworks (like Unity) that abstract the fun/educational code away.

- The Lua manual is arguably the best programming manual for students learning to program.

- Includes a built-in GLSL shader editor makes advanced graphics programming a small stepping stone.

- They automatically shipped in-depth examples with the app that are intentionally built for learning by reading the code.

- In-app docs encouraged discovering new APIs; I took it as a challenge to use all of the APIs they exposed and learned a lot in the process.

- No package managers, no complicated install steps, no security concerns, and a unified editor.

P.S. If you have an iPad and haven't played Two Lives Left's Crabitron [1] – it's easily the most creative game shipped for iPad.

[1] https://apps.apple.com/se/app/crabitron/id440462182?l=en

NathanFlurry··on What happens when you make a move in lichess.org?
I've been managing game servers that get attacked on a daily basis for almost a decade. I've tried Cloudflare a few times (on their business plan) and seen poor results every time.

Cloudflare has a lower latency product called Argo Smart Routing [1]. When we tried Argo in 2020, we still saw 10+ ms increased latency across the board, which is unacceptable for competitive multiplayer games. That said, Discord voice still (or used to) uses Argo for voice, so there are certainly less latency-sensitive games where it would work well.

The other issue with sockets over Cloudflare (circa 2020 on business plan) is they get terminate liberally with the assumption you have a reconnection mechanism in place. I'd imagine this is acceptable for traditional WebSocket use cases, but not for games.

Services like OVH & Vultr also advertise "DDoS protection for games," but I've found these to be pretty useless in practice. We can only measure traffic that reaches our game servers, so I have no way of knowing if they're actually helping at all.

Your best bet is getting familiar with iptables and fine-tuning rules to match your game's traffic patterns. Thankfully, LLMs are pretty good at generating these rules for you nowadays if you're not already familiar with these tools. Make sure to set up something like node-exporter to be able to monitor attacks and understand where things go wrong. There have been a few other posts on HN in the past that go into more depth about game server DoS mitigation [2] [3].

I built something in the same vein for my startup (Apache 2.0 OSS, steal our code!) [4] that runs a series of load balancers in front of game servers in order to act like a mini-Cloudflare. In addition to the basics I already listed, we also have logic under the hood that (a) dynamically routes traffic to load balancers and (b) autoscales hardware based on traffic in order to absorb attacks. We're rolling out a dynamic bot attack & mitigation mechanism soon to handle more complex patterns.

[1] https://www.cloudflare.com/application-services/products/arg...

[2] https://news.ycombinator.com/item?id=35771466

[3] https://news.ycombinator.com/item?id=28675094

[4] https://github.com/rivet-gg/rivet

NathanFlurry··on Dito – an advanced Layer 7 reverse proxy server written in Go
I love the focus on flexibility & integration with Redis.

We use a mix of Traefik and Envoy for complex + dynamic LB configurations. Doing anything related to custom middleware, dynamic configuration, and caching feels archaic on Traefik and requires a non-trivial amount of code on Envoy. I hope Dito becomes the next gold standard for load balancing.

One caveat — one of my biggest complaints with Traefik is the memory usage, which makes it difficult to run as an mTLS proxy between services. We use Envoy for these use cases instead. I’m curious to see how Dito compares on memory usage, despite also being written in Go.

NathanFlurry··on Show HN: An online 2D MMO game, written in Rust and JavaScript
We work with a lot of multiplayer game devs and always recommend fast-paced games take a second look at client <-> server WebRTC.

This the demo we share: https://github.com/rivet-gg/examples/tree/main/javascript/we...

NathanFlurry··on WebGL visual programming editor cables.gl is now open source
GitHub: https://github.com/cables-gl/cables

Really cool project, love to see things that touch web tech, VPLs, and creative programming. Could not find repo from the website on mobile, would love to see it in the footer or in the CTA.

NathanFlurry··on Show HN: Unreal Engine 5 in WebGPU
A friend and I forked UE4 a while back and stripped all of the bloat to try and get it running well on a shit-tier Chromebook. We only stripped it down to 30 mb, but the end result (physics + terrain) ran way smoother than any Unity game I've played on that ToasterBook.

Plot twist: people stop writing casual games in Unity and switch to Unreal to target low-end hardware.

Needless to say: as someone who spent my teens and early 20s working on multiplayer web games, I'm incredibly excited for this.

NathanFlurry··on I kind of like rebasing
Our team switched over to Graphite [1] 8 months ago now. Graphite involves a lot of "restacking" (i.e., rebasing for every commit/branch in a "stack").

No one on our team had used rebasing extensively before this, but it's hard to go back. Similar to the article, the benefits we see are:

- Fast iteration with `gt m` (`git commit --amend`) and `gt s` (`git push --force`) - Using `gt restack` (`git rebase` on each parent commit) helps make merge conflicts more transparent in what happened - Commit histories are much more legible

I highly recommend giving it a go.

[1] https://graphite.dev/

NathanFlurry··on Show HN: Pico: An open-source Ngrok alternative built for production traffic
This is very cool! Trying to get it added to awesome-tunneling: https://github.com/anderspitman/awesome-tunneling/pull/149

Related -- we also built a simple (but not production-grade) tunneling solution just for devving on our open-source project (multiplayer game server management).

We recently ran in to an issue where we need devs to be able to have a public IP with vanilla TCP+TLS sockets to hack on some parts of our software. I tried Ngrok TCP endpoints, but didn't feel comfortable requiring our maintainers to pay for SaaS just to be able to hack around with our software. Cloudflare Tunnels is awesome if you know what you're doing, but too complicated to set up.

It works by automating a Terraform plan to (a) set up a remote VM, (b) set up SSH keys, and (c) create a container that uses reverse SSH tunneling to expose a port on the host. We get the benefit of a dedicated IP + any port + no 3rd party vendors for $2.50/mo in your own cloud. All you need is a Linode access token, arguably faster and cheaper than any other reverse tunneling software.

Source: https://github.com/rivet-gg/rivet/tree/main/infra/dev-tunnel

Setup guide: https://github.com/rivet-gg/rivet/blob/main/docs/infrastruct...

NathanFlurry··on Show HN: Timmerse.com (YC W22) Easily create immersive real-time interactions
The rabbit hole goes deeper:

- The OP's acc was created today

- The support email for their site is a Tencent email (timmerse_support@tencent.com)

- They have an old NPM package [1] which lists colleenyu@tencent.com as a contact

- "colleenyu tencent" brings up a PM at Tencent on LinkedIn [2]

I have a lot of questions, now I really want to know the story behind this project.

[1] https://www.npmjs.com/package/timmerse

[2] https://www.linkedin.com/in/ucl-kejing-yu/?original_referer=...

NathanFlurry··on Show HN: Timmerse.com (YC W22) Easily create immersive real-time interactions
+1 for launch times & build sizes for web. Browser game bounce rates skyrocket after 5 seconds of loading, most Unity games exceed this. (I've worked on several of the large multiplayer web games.)

That said, I've met & work with _a lot_ of developers who shipped Unity for web solely because (a) they already knew Unity, (b) they could easily hire for Unity, (c) their art pipeline only worked with Unity, or (d) they aim to ship to mobile later. Built-in physics + better rendering + networking are usually just a bonus.

NathanFlurry··on Redis adopts dual source-available licensing
Check out DragonflyDB (BSL): https://www.dragonflydb.io/

BSL is not OSI-approved, but it’s a much more reasonable AWS-resistant license. It’s the same license CockroachDB uses, for example.

KeyDB (BSL, acquired by Snapchat) is also an option: https://keydb.dev/

BSL is a much better license, but it’s a gamble on how long KeyDB will be supported. I don’t want to mess around with such a core part of my architecture.

NathanFlurry··on Show HN: OpenGB – modular game back end engine with first-class scripting
Thanks! We don't publish a roadmap at the moment, but a few things coming soon are a managed cloud, SDK gen for the major engines, more auth providers, and a few more foundational modules.
NathanFlurry··on Show HN: OpenGB – modular game back end engine with first-class scripting
Cheers!
NathanFlurry··on Facebook incorrectly reports personal blog to DigitalOcean for phishing
I've experienced many similar incidents – I've been running multiplayer game servers on these "discount" server providers for a while now. They receive umpteen requests per day about spamming, hosting pirating/other illegal content, botnets, etc with only an associated IP address.

Vultr has a nasty habit of forwarding these directly to the current holder of the IP address with a dire warning that your account will be shut down within 24h if no action is taken, regardless of the timestamp of the complaint. Abusers just create & destroy servers frequently frequently to acquire fresh IP addresses to host malicious content on. It became a morning routine of copy+pasta responses to these emails to keep the servers online.

NathanFlurry··on Open source Datadog alternative SigNoz crosses 15K GitHub stars
Imo almost every "open source" VC-backed startup is actually "open core" (including us.) I'm yet to see a startup that doesn't have a significant closed-source or restrictively-licensed component.

My philosophy for both creating & consuming OSS: the core needs to (a) have an OSI-approved license (read: no BSL, SSPL), (b) needs to be useful without the closed source component, and (c) needs to be easy to run without the closed source component. Otherwise, see [1]. I also avoid AGPL, even though it is OSI-approved.

TC has a good take on the economics of fully open source companies [2].

[1] https://openwashing.org/

[2] https://techcrunch.com/2014/02/13/please-dont-tell-me-you-wa...

NathanFlurry··on Show HN: DotBigBang – Multiplayer game engine with 120fps and 2 second load time
I was employee #1, worked on basically everything that wasn't actual gameplay (core engine, matchmaking/servers, WASM-based anticheat) and left mid-2020. I work with a lot of non-web games nowadays, but I really miss building for web (esp with WebGPU & WebTransport in the mix now).

Hope we cross paths at a conference at some point!

NathanFlurry··on Show HN: DotBigBang – Multiplayer game engine with 120fps and 2 second load time
Looks awesome! I worked on Krunker.io a few years back (which had a UGC aspect similar to this), love seeing more people picking up on the < 5s time-to-fun mechanic.
NathanFlurry··on Show HN: DotBigBang – Multiplayer game engine with 120fps and 2 second load time
Looks like https://dotbigbang.com/game (no www) works
NathanFlurry··on What is wrong with TOML? (2019)
TOML config files are used heavily in my product for developer-facing features. I personally think it's the cleaner compared to YAML + JSON.

It also benefits from being easier to copy + paste configs from docs since the entire path is included in each block; users don't have to worry about setting up the correct hierarchy.

Regardless, I strongly agree with points #1-#3. I also wish there was a way to support something similar to inline YAML schemas to catch users' typos in their IDE.

I would love to use HCL or potentially Ion, but IDE support and widespread acceptance isn't strong enough yet.

NathanFlurry··on Show HN: Langfuse – Open-source observability and analytics for LLM apps
GPT wrappers [handshake emoji] ClickHouse wrappers
NathanFlurry··on Show HN: Rivet – Open-source game server management with Nomad and Rust
Thanks for the kind words and tips!

> Anyways I’d just like to voice myself as a possible target audience

Local development is tricky, and we have plenty of room for improvement here.

Currently we provide a special developer token [1] which will cause API endpoints to return mock responses when used locally. This way, you can use the exact same API with no difference in production & locally, so you don't have to mess with nested prefabs.

However, this doesn't help much with exposing your local machine for testing. We've toyed around with the idea of something similar ngrok built in to our Rivet CLI and integrated in to the API.

[1]: https://rivet.gg/docs/general/concepts/dev-tokens#mock-respo...

NathanFlurry··on Railway Oriented Programming
+1 this

I don't understand why this answer is buried deep in a thread & isn't included in the Rust Book, even though it's been conventional wisdom among experienced Rustaceans for a few years now.

NathanFlurry··on HashiCorp adopts Business Source License
We built our OSS company (Apache 2.0) with Nomad at its core. We provide game server orchestration with a handful of services around it, which could be misconstrued to be considered providing a "competitive offering to HashiCorp." Needless to say, we'll be freezing our Nomad version at the last MPL version because of how vague the license is (intentionally).

We also use CockroachDB which uses BSL, but we're not providing a remotely competitive offering.

I'll likely continue to recommend HashiCorp products (Nomad, Consul, Terraform, and Packer) to anyone who asks my advice, but it's disappointing to hear this change.

We maintain a rudimentary SBOM for anyone curious: https://github.com/rivet-gg/rivet/blob/main/docs/infrastruct...

NathanFlurry··on Show HN: Phind.com – Generative AI search engine for developers
Hello was already pretty good, but when ChatGPT came out, I completely stopped using it. It’s great to see this next iteration!

Naturally, the first thing I searched for was something I’ve put on the internet that is not well indexed by Google.

When I search “how to find a lobby with rivet.gg” (that’s our most basic functionality), it doesn’t come up with an answer. However, it does spit back a descent summary of relevant features we provide.

What’s odd – it always continues on to talk about an unrelated company. The first time, it started talking about top.gg as a way to add Fortnite-style bots to your game. (They’re actually a Discord bot directory.) The second time, it mentioned a completely random Reddit called Guilty Gear Strive.

Can you elaborate on how it finds these related topics?

NathanFlurry··on Launch HN: Lago (YC S21) – Open-source usage-based billing
We just rolled out Lago billing in Rivet yesterday. Lago is very well designed and the team is incredibly helpful!
NathanFlurry··on John Carmack goes off about online-only games being abandoned
In my experience, game developers are some of the most talented engineers I've ever met. But they're very different from the "high quality" engineers you'd find in the rest of tech.

They're usually really good at getting the job done and balancing quality + productivity. However, most things are written with a one-off mindset because chances are your next game will need things to work completely differently. Everywhere else in tech you find "scalable" and "backwards compatible" solutions; not in gaming.

Part of this is the job description. Unlike the rest of tech, you're usually building a game that will be popular for 2-3 years then disappear. It's not common to find that model anywhere else in tech.

Just my 2 cents.

← PreviousPage 3 of 4Next →