Kevin Whitley
banner
itty.dev
Kevin Whitley
@itty.dev
I build things from time to time. :)

https://itty.dev
That said, it's not like I'm pushing any boundaries at the moment... haha. I'm sure it has rough edges I haven't discovered!
July 7, 2025 at 4:51 PM
What specifically you having issues with?

I generally haven't had much issue with local CF DX. Pretty wild that it works as well as it does TBH...
July 7, 2025 at 4:50 PM
See more patterns at itty.dev, or join the Discord community for help! :)
itty.dev - itty.dev
Ultra-small, powerful helpers for modern serverless APIs.
itty.dev
July 7, 2025 at 4:45 PM
A few notes...

1. Every route can take N handlers. Each can return or not return (middleware)

2. Every handler is automatically awaited

3. The request itself is a transport, since it's always available

4. "Just returning" is the easiest pattern, since we do this the most
July 7, 2025 at 4:45 PM
I should note... while this API can handle load fine, you should only use something like this for prototyping/hacking stuff out, not in production.

Why?

Any latency adds overhead to your system, and this is nowhere close to as fast as just including your chosen uuid/id generator into your code!
June 27, 2025 at 1:26 PM
I'll be adding in some of the usual culprits like uuids and nanoids as well...
June 25, 2025 at 2:40 PM
The flipside is, obviously it solves some issue for some audience, or it never would have been built in the first place.

One could say the same for any of my byte-optimized libs... in a world where devs don't seem to care about bundle size, one could always ask: who cares?

A few do! :)
June 25, 2025 at 1:52 PM
I mean I sorta see what they're getting at, but...

IMO it solves an edge case problem that I don't think stresses the majority of devs out (we expect *any* function to be able to throw)

...by converting arguably readable code into symbol soup, with added bloat per function.

By their own example:
June 25, 2025 at 1:49 PM
Violence only creates more violence, hatred more hatred.

I fully believe the answer is to overwhelm each other (the good and the bad) with compassion.

It’s really hard to be shitty to a person who truly cares for you and shows you kindness.
June 18, 2025 at 6:27 PM
Inspired me to play… 🍻
June 17, 2025 at 6:11 AM
edit: <100ms, lol.
June 14, 2025 at 7:27 PM
This is all available for anyone else to play with, explore patterns on, etc.

ittysockets.io

The client is tiny (<500 bytes), and uses a standardized public backend. You can send/receive any message format you need (within reason) for your app!

Go check it out!
Itty Sockets
Realtime communication in 3 lines of code.
ittysockets.io
June 14, 2025 at 7:26 PM
Since everyone is already connected via socket, the latency is reduced to a few ms (typically under 9ms) for messaging, allowing incredibly fast back-and-forth systems like this - which would be impractical/slow via REST/HTTP.
June 14, 2025 at 7:26 PM
6. When the user receives a state message in response, they decode it and apply it to their board. Now they are fully synced with the users!

All in all, a typical time from component mount to fully synced takes between >100ms. This is often WAY faster than a round trip to some sort of API layer.
June 14, 2025 at 7:26 PM
5. If a user receives a "request-state" message, they immediately encode/compress their board (takes about 1-2ms) and sends it.
June 14, 2025 at 7:26 PM
3. Since every new player will need the board state, each existing player responds to the join event with a welcome message to that user.

4. That user listens for welcome messages, and responds to the first one (fastest), asking for the board state.
June 14, 2025 at 7:26 PM
Let's assume someone is already in the channel with a drawing/board.

1. You join.

You as the joiner have no idea who is in the channel (just the number of players).

2. However, when you join, everyone in the channel is notified of this (standard event in ittysockets.io).
Itty Sockets
Realtime communication in 3 lines of code.
ittysockets.io
June 14, 2025 at 7:26 PM
Seriously. Was it wrong/punishable for them to criticize Biden? I don't understand how folks can see one side, but not the very obvious reverse?

It's like our brains now just process one side of an equation and ignore the mismatch... :(
June 13, 2025 at 1:17 PM