HN user

andremedeiros

1,394 karma

EM of SRE Tools & Technologies at TELUS. Wants to be the Ted Lasso of computing. Loves mechanical keyboards, retro computers, coffee, spreadsheets, and you.

Posts6
Comments75
View on HN
Microsoft TypeSpec 2 years ago

That's totally fair feedback. Particularly optionality having been removed from proto2 to proto3 is confusing.

Microsoft TypeSpec 2 years ago

The default transport (gRPC) certainly is, but HTTP RPC translation/gateways are easily generated.

Microsoft TypeSpec 2 years ago

Gotcha. I think this might be where Protobuf falls short because you have to "source" the tooling for all its different outputs, but support for OpenAPI 3.0 spec generation has existed for over a year.

Amazon is great at a lot of things, but AI and Machine Learning aren't it. From what I saw when I worked there, they don't have the talent to produce their own models (which is, I think, what we all expected to see), but the surprising thing is that they haven't partnered yet.

The Reddit API usage is as efficient as it can be, server wise, although I’d like to be proven wrong by them.

As far as the app goes, an average of ~330 reqs/user/day is pretty good, considering they built the platform budgeting for 86,400.

HN is a whole other beast. A notification server would have to keep track of any replies to any of your comments / submissions in order to determine what to notify you about, purely because they don’t have a notification model.

All the comments in this thread are right. This specific scenario was about providing a consistent experience. All the work that this backend does could be done using iOS’ background updates, but:

1. Those aren’t consistently scheduled 2. They have an extremely tight deadline (and sometimes Reddit can be a bit slow)

Making it server side means we controlled that experience better.

Theoretically it could do it all from the app, but it would have to resort to background updates, which are scheduled at iOS’ discretion. Christian was aiming for consistency, which is why this exists.

That’s how it worked, yes, but we went to great lengths to ensure that call had minimal impact on their end.

The TLDR here is that we only ever requested new notifications (give me anything that came after this thing I know about), which funnily enough then broke for some users, because if a reply you got notified about gets deleted and you use it for reference, Reddit will never return anything new to you, so I had to go and write a 2nd service that runs much more infrequently but does some checks on each account to make sure this isn’t the case.

I’m never proud of my code haha. This could always be better. No specific design patterns either.

The one fun thing I learned was about databases. Given enough records, a query planner might decide to start doing things very differently and you will get woken up at 3am with a CPU usage alert. That was a fun one to debug for sure…

Honestly, Lemmy would probably not need half this code. We wrote this to work with an entity that exists in a “come and get it” model. Lemmy being open source means we could build the features right in the server and slash this code to a bare minimum (mostly the watcher stuff at this point.)

Hi all! I wrote this code, and for educational purposes, I’d be more than happy to answer any questions.

A gentle reminder that the whole history is here for show. This is very vulnerable — you can see the times I was in a rush, or when I took my time. You’ll find my mistakes. Either way, all I ask is please be kind. I know there are 50 things I could have done better, but this is a product of the reality at the time — a balance between something that works and something that was cost effective for Christian.

I’m the guy who built the server end of Apollo. I can tell you that there would be no problem paying for API usage. In fact, it would have been welcomed, as this is a sure fire way to support the service you depend on.