Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
orf
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
391.
▲
by
orf
2y ago
Hey! This looks awesome, but I have one question: What happens if I make a HTTP call that returns a time-limited resource (a token perhaps) that expires in 1 minute? What’s the pattern to handle this?
392.
▲
by
orf
2y ago
Hmm, why do you need a unique index if you’ve never had a duplicate message? :thinking emoji:
393.
▲
by
orf
2y ago
> and the maintainers are very hostile towards enabling this behavior. Got any links to read more?
394.
▲
by
orf
2y ago
Parquet.
395.
▲
by
orf
2y ago
Sure, but who does this? And the typical pattern is to wrap exceptions, giving you access to the inner exception if you need more context. The requests HTTP exception contains the request and response object. Wrapping that would be a huge p
396.
▲
by
orf
2y ago
Gratuity charges are what they mean. Parties over a certain size have them added, or it’s sometimes offered on the payment terminals. Always a fixed percentage of the bill.
397.
▲
by
orf
2y ago
That’s interesting - is it common to do this instead of casting to an interface? It seems a lot more impactful with Python due to type equality being core to how exceptions are handled, even if there are similarities.
398.
▲
by
orf
2y ago
> you don't throw it or catch it Herein lies the issue: in this context exceptions can be thought of as the same as returns. So you actually need to catch/handle all possible exceptions in order to not leak private types. Als
399.
▲
by
orf
2y ago
The problem with this is exceptions: they easily allow dependencies to escape, be that via uncaught exceptions or wrapped ones. Go and JavaScript have type systems and idioms far more amenable to this kind of thing (interfaces for Go, no re
400.
▲
by
orf
2y ago
This comes up every now and again, and there are two fairly simple examples that I think show the complexities: One: Library A takes a callback function, and catches “request.HttpError” when invoking that callback. The callback throws an ex
401.
▲
by
orf
2y ago
Why have a “created_at” column if you’re using ULIDs? Isn’t that encoded as part of the ULID itself?
402.
▲
by
orf
2y ago
I have never crashed my car, yet I acknowledge it is between a possibility and a certainty, depending on the situation. Saying “Well I’ve driven 100k miles and never crashed” doesn’t add much. Also, not sure how you’re consistency checking
403.
▲
by
orf
2y ago
Manually pulling plugs is for amateurs: automate or die Either way, you’re getting duplicate deliveries if you’re using >1 machine. And if you’re not, what are you adding to the conversion?
404.
▲
by
orf
2y ago
A lot of developers assume exactly once semantics, often implicitly, and have no metrics or consistency checks in place to detect issues. Or the issues are silently hidden - I.e the same database row updated with the same value. I remember
405.
▲
by
orf
2y ago
You wouldn’t expect to see issues in a simple system in a steady-state. The problems arise when the system responds to other transient or unexpected issues. Try `kill -9`ing your consumers or unplugging a network cable and see what happens.
406.
▲
by
orf
2y ago
And how do you guarantee it only acts on messages once? It’s the same problem. Even so, it’s very explicitly not exactly once delivery.
407.
▲
by
orf
2y ago
> they just need a transport API that guarantees exactly-once Which is the same problem, but at a different layer.
408.
▲
by
orf
2y ago
I get your point, but you have to understand that for every second you’ve spent writing that comment, globally hundreds of millions of HTTP responses have been processed that contain UUIDs of some kind. Yes, there’s a more optimal format th
409.
▲
by
orf
2y ago
There is something impressive about Lennart’s work, in that treads a thin line between “completely triggering” to some people and “genuinely quite a good idea” to others. Lots of discussion here has been around the choice of JSON as a forma
410.
▲
by
orf
2y ago
Naming the system would be useful context to add to this point.
411.
▲
by
orf
2y ago
The protocol supports “upgrading” requests. If your service relies on sending large binary blobs (over this? Why?), then it doesn’t have to be done with JSON. For example, the metadata of the blob could be returned via JSON, then the reques
412.
▲
by
orf
2y ago
Read the comment you’re replying to. In it OP says it’s not slow, and the “hundreds of messages per second” you are referring to is not regarding the performance but the expected rate. It’s possible for something to be fast, but only
413.
▲
by
orf
2y ago
Eh, not bad. Don’t believe everything you read online.
414.
▲
by
orf
2y ago
Cool story I guess, but that’s not related to anything I said.
415.
▲
by
orf
2y ago
Good - then the person who sees that they didn’t report it can whistleblow on that and get a nice paycheck. See how that works out for the person who didn’t report it.
416.
▲
by
orf
2y ago
> But neither of us has time for that. Indeed, so why waste it reinventing the wheel instead of using a high quality third party package? Or arguing about highly suspect LoC numbers pulled out of thin air as if it’s not an apples-to-oran
417.
▲
by
orf
2y ago
But a database can handle tens of millions of rows with those resources. If you’re worried about excess, why even use Wordpress? My god - serving rarely updated static content with a database? Stupid. The entire thing is excessive and waste
418.
▲
by
orf
2y ago
What database is burdened by 200k rows? That’s tiny.
419.
▲
by
orf
2y ago
The getting started docs[1] are really good, I’d recommend starting there for sure. Basically you just run a few commands and you’ve got a website. Edit the Astro files to put HTML in, don’t worry about any JavaScript. Then try adding a sim
420.
▲
by
orf
2y ago
Astro is fantastic. I initially used NextJS with MDX, and something simple like using relative markdown links to images was utterly impossible. I remember going down a day long rabbit hole to understand why, and it boiled down to content la
More ›