Live data from Hacker News

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

reco.ai

141–150 of 278 posts

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

#141
post #41

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, ev…

I mostly agree, but it's more appropriate to weigh contributions against an FTE's output rather than their input. If I have a $10m/yr feature I'm fleshing out now and a few more lined up afterward, it's often not worth the time to properly handle any minor $300k/yr boondoggle. It's only worth comparing to an FTE's fully loaded cost when you're actually able to hire to fix it, and that's trickier since it takes time a…

> it's often not worth the time to properly handle any minor $300k/yr boondoggle

No, because you can use that 300k to solve some real problem instead of literally lighting it on fire.

(Hell, just give employees avocado toasts or pingpong tables instead.)

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

#143

Earlier quoted context omitted.

You aren’t accounting for managerial politics. A product manager won’t gamble on a large project to lower operating cost, when their bonus is based on customer acquisition metrics.

The original author said he built this on the weekend, so my assumption is that this was something engineers had advocated for before but were shut down because management wanted them elsewhere. The use of ai agents allowed them to shrink the problem down to the point where it was small enough to fit in their free time and not interrupt their assigned work.

Why are engineers spending their week-end on saving their company money especially if the company clearly doesn't care to allocate resources to the problem?

I get that it's fun and there's personal satisfaction in it, but it just reinforces to management that they don't need to care about allocating resources to optimisation, the problem will just take care of itself for free.

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

#144
post #133

Earlier quoted context omitted.

Given that the potential high paying customer is just that - a potential, one must always keep the long term platform stability in mind as it affects every other customer, not just this potential customer. Hence, it boils down to opportunity cost and setting the right expectations: We can deliver feature X for you - incrementally broken down into sub-features x1, x2, x3 over a period of Y weeks/months The other way t…

The customer could be on the fence between you and a competitor and this customer could be potentially paying 10x more than all your existing customers together. It could make or break your company. They would go to the competitor immediately if you make it complicated for them and have delays with the setup. What do you do then?

Sounds like a bad business model then - if you have to depend on one single customer to make or break your company.

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

#145
post #115

Earlier quoted context omitted.

>> 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. And this, this is the core/true/insightful story the executives will never hear about.

Eh. If you get into enterprise business, this is the accepted management style. AI will now mix this up a little, but before you basically needed to ask if you want to blow 300k on developer salaries to maybe fix something that is already working and generating money, or add more features to the roadmap you can pin on your chest. Scaling infrastructure is the best choice for 90% of managers, especially since they are…

Managers love big cloud spend so the vendors take them on fancy golf trips ... er ... "Conferences".

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

#147

Earlier quoted context omitted.

They said in the article that they were running up to 200 pods at a time. Doing some back of the envelope math, 200 pods at $300,000 year is about $0.17/hour, which is exactly what an EC2 c5.xlarge costs per hour (on demand). That has 4 vCPUs, so about 800 vCPUs during peak, with $0.0425/CPU-hour. I do have some questions like: * Did they estimate cost savings based on peak capacity, as though it were running 24x7x36…

This is a helpful breakdown, thanks, @otterley. It is, by orders of magnitude, larger than any deployment that I have been a part of in my work experience, as a 10-year data scientist/Python developer.

This is larger than the resources I have available at Medium-Size-Fabless-Semi-Inc, and larger than the time I had two racks of C++ build farm. It is of course way larger than StackOverflow, which ran for years on two large machines.

All for .. a meta-SaaS?

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

#148
post #2

For context, JSONata's reference implementation is 5.5k lines of javascript.

And no, there are no dependencies in package.json either (other than devDependencies for tests).

Which cumulatively means a competent developer could probably port it in less than one day.

They almost certainly spent longer working out how to deploy and integrate the original JS and ironing out the problems, than it would have taken to port it in the first place.

That’s sad.

And then they definitely spent much longer making their optimised fast path for simple expressions. Which they probably wouldn’t have bothered with if they had just ported the whole thing.

As for trying things like embedding V8… this is getting ridiculous.

I strongly suspect no one had actually looked at the code, but had just assumed all along that it was much more complex than it actually was.

The entire thing is a tragedy.

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

#149
post #124
post #117

Hey all, I'm the author of the blog post. I'm honestly loving the discussion this is generating (including the less flattering comments here). I'll try to answer some of the assumptions I've seen, hopefully it clears a few things. First off - some numbers. We're a near real-time cybersecurity platform, and we ingest tens of billions of raw events daily from thousands of different endpoints across SaaS. Additionally,…

I appreciated the writeup and your clarification. I wonder whether this was your first attempt to solve this issue with LLMs, and this was the time you finally felt they were good enough for the job. Did you try doing this switch earlier on, for example last year when Claude Code was released?

Honestly, I was very adverse to agentic code up until Opus came out. The hallucinations and false confidence it had in objectively wrong answers just broke more things than it fixed.

However after it came out it suddenly behaved closely to what they marketed it as being. So it was my first real end-to-end project relying on AI at the front seat. Though design wise it is nowhere near perfect, I was holding it's hand the entire way throughout.

Post reply on HN