Live data from Hacker News

We rewrote JSONata with AI in a day, saved $500k/year

reco.ai

11–20 of 278 posts

Re: We rewrote JSONata with AI in a day, saved $500k/year

#12

> The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. > This was costing us ~$300K/year in compute Wooof. As soon as that kind of spend hit my radar for this sort of service I would have given my most autistic and senior engineer a private office and the sole task of…

Your most autistic and senior engineer is now named Claude. Point him at nearly any task, pair-program with codex, and review the results.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#13
I'm just kind of confused what took them so long. So it was costing 300k a year, plus causing deployment headaches, etc.

But its a realitively simple tool from the looks of it. It seems like their are many competitors, some already written in go.

Its kind of weird why they waited so long to do this. Why even need AI? This looks like the sort of thing you could port by hand in less than a week (possibly even in a day).

Re: We rewrote JSONata with AI in a day, saved $500k/year

#14

> This was costing us ~$300K/year in compute, and the number kept growing as more customers and detection rules were added. Maybe I’m out of touch, but I cannot fathom this level of cost for custom lambda functions operating on JSON objects.

It has to be satire right? Like, you aren't out of touch on this. I get engineers maybe making the argument that $300k / year on cloud is the same as 1.5 devops engineers managing in-house solutions, but for just json parsing????

For numbers like that, I can never tell whether it's just a vastly larger-scale dataset than any that I've seen as a non-FAANG engineer, OR, a hilariously-wasteful application of "mAnAgEd cLoUd sErViCeS" to a job that I could do on a $200/month EC2 instance with one sinatra app running per core. This is a made-up comparison of course, not a specific claim. But I've definitely run little $40 k8s clusters that replaced $800/month paid services and never even hit 60% CPU.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#15
post #13

I'm just kind of confused what took them so long. So it was costing 300k a year, plus causing deployment headaches, etc. But its a realitively simple tool from the looks of it. It seems like their are many competitors, some already written in go. Its kind of weird why they waited so long to do this. Why even need AI? This looks like the sort of thing you could port by hand in less than a week (possibly even in a day)…

If I had to guess… The same thing happening to a lot of the industry… the era of cheap money is over.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#16
>The approach was the same as Cloudflare’s vinext rewrite: port the official jsonata-js test suite to Go, then implement the evaluator until every test passes.

the first question that comes to mind is: who takes care of this now?

You had a dependency with an open source project. now your translated copy (fork?) is yours to maintain, 13k lines of go. how do you make sure it stays updated? Is this maintainance factored in?

I know nothing about JSONata or the problem it solves, but I took a look at the repo and there's 15PRs and 150 open issues.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#18

>The approach was the same as Cloudflare’s vinext rewrite: port the official jsonata-js test suite to Go, then implement the evaluator until every test passes. the first question that comes to mind is: who takes care of this now? You had a dependency with an open source project. now your translated copy (fork?) is yours to maintain, 13k lines of go. how do you make sure it stays updated? Is this maintainance factored…

That's only important if the plan is to stay feature-compatible with the original going forward.

For this case, where it's used as an internal filtering engine, I expect the goal is fixing bugs that show up and occasionally adding a feature that's needed by this organization.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#19
The key point for me was not the rewrite in Go or even the use of AI, it was that they started with this architecture:

> The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. That meant that for every event (and expression) we had to serialize, send over the network, evaluate, serialize the result, and finally send it back.

> This was costing us ~$300K/year in compute, and the number kept growing as more customers and detection rules were added.

For something so core to the business, I'm baffled that they let it get to the point where it was costing $300K per year.

The fact that this only took $400 of Claude tokens to completely rewrite makes it even more baffling. I can make $400 of Claude tokens disappear quickly in a large codebase. If they rewrote the entire thing with $400 of Claude tokens it couldn't have been that big. Within the range of something that engineers could have easily migrated by hand in a reasonable time. Those same engineers will have to review and understand all of the AI-generated code now and then improve it, which will take time too.

I don't know what to think. These blog articles are supposed to be a showcase of engineering expertise, but bragging about having AI vibecode a replacement for a critical part of your system that was questionably designed and costing as much as a fully-loaded FTE per year raises a lot of other questions.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#20

> This was costing us ~$300K/year in compute, and the number kept growing as more customers and detection rules were added. Maybe I’m out of touch, but I cannot fathom this level of cost for custom lambda functions operating on JSON objects.

First I thought they were AWS lambda functions, perhaps possible if they are over-provisioned for very concurrency or something similar $25k/month is in realm of possibility.

But no, the the post is talking about just RPC calls on k8s pods running docker images, for saving $300k/year, their compute bill should be well above $100M/year.

Perhaps if it was Google scale of events for billions of users daily, paired with the poorest/inefficient processing engine, using zero caching layer and very badly written rules, maybe it is possible.

Feels like it is just an SEO article designed to catch reader's attention.

Post reply on HN