Top
Best
New

Posted by yakkomajuri 11/3/2025

Why we migrated from Python to Node.js(blog.yakkomajuri.com)
229 points | 281 commentspage 2
travisgriggs 11/3/2025|
I do a lot of glueware and semi-embedded stuff with Python... but my goto these days for anything networky is Elixir (LiveView if ux). If I need an event loop, async that is more than a patched on keyword, it just rocks. It is amazing to me how much Elixir does not have, and yet how capably it solves so many problems that other languages have had to add support for to solve.
euph0ria 11/3/2025||
"we almost quit multiple times"

It was a three day small task?

ehutch79 11/3/2025||
This didn't make sense to me either? If it only took three days for a complete rewrite to another language, what's the problem? Did I read they were getting interrupted for user requests? felt weird.
novoreorx 11/5/2025||
Probably because they have to deal with customer feedbacks and bugs on existing system. The stress would be huge, making a day like a week long, I guarantee
pier25 11/3/2025||
I would have picked Hono and Drizzle. In part because of the great TS support but also Hono is much faster than Express and supports Zod for validation out of the box. This stack would also allow to use any other runtime (Deno, Bun, or Cloudflare Workers).

Given they used TS and performance was a concern I would also question the decision to use Node. Deno or Bun have great TS support and better performance.

jherdman 11/3/2025||
Have you tried Elysia (https://elysiajs.com/)? Admittedly I'm not using it at scale, but it's quite pleasant.
internetter 11/3/2025|||
I've written 10s of thousands of lines of Elysia+Kysely and its a match made in heaven
jherdman 11/3/2025||
I’m curious about your choice of Kysely. I’ve really only used Drizzle. It’s fine but it has some very rough edges around Bun and SQLite.
internetter 11/4/2025||
I'd rather use SQL than an ORM. Kysely is basically a wrapper for the SQL query syntax inside typescript which has the benefit of composability and incredibly rich typescript support
pier25 11/3/2025|||
I checked it out and it looks good on paper but it only runs on Bun.

Don't get me wrong, I use Bun and I'm happy with it, but it's still young. With Hono/Drizzle/Zod I can always switch back to Node or Deno if necessary.

bytehowl 11/4/2025||
ElysiaJS's blog claims that support for other runtimes was added in 1.2: https://elysiajs.com/blog/elysia-12.html#adapter
pier25 11/4/2025||
Thanks I wasn't aware of this
rozenmd 11/3/2025|||
I recently moved a classic HTTP API server from Express to Hono (through the Hono node-server package), absolutely seamless migration.
verdverm 11/3/2025||
I wouldn't call it seamless, having also done this recently. (Handler func signature is different) But it is relatively straight forward without major changes to the code needed
jgehrcke 11/3/2025|||
I'm sure you know what you're taking about -- yet, your response reminds me of https://youtu.be/aWfYxg-Ypm4

"drizzle works on the edge"

breakfastduck 11/3/2025|||
I've had a really pleasant experience with Drizzle as an ORM. It feels straightforward compared to some of the incredibly bloated alternatives.
tracker1 11/3/2025|||
I'm more a fan of just a sql template string handler... in C#/.Net I rely on Dapper... for node, I like being able to do things like...

    const results = await query`
      SELECT...
      FROM...
      WHERE x = ${varname}
    `;
Note: This is not sql injection, the query is a string template handler that creates a parameterized query and returns the results asynchronously. There's adapters for most DBs, or it's easy enough to write one in a couple dozen lines of code or less.
breakfastduck 11/3/2025|||
Sure, looks good. I often do templating.

However drizzle makes it very very straightfoward to handle DB migration / versioning, so I like it a lot for that.

tracker1 11/4/2025||
I mostly use grate.
pier25 11/3/2025|||
With something like EF Core in .NET or Drizzle in TS you get a lot of help from your editor that you wouldn't get when writing SQL.
tracker1 11/3/2025|||
In TS, I can still create a type for my result... const results : Promise<Foo[]> = ...

I'm not sure what additional help you're getting. I'm just not a fan of ORMs as they tend to have hard edges in practice.

pier25 11/3/2025||
ORMs not only help with the result of the query but but also when writing queries. When I wrote SQL I was constantly checking table names, columns, and enums. With a good ORM like EF Core not only you get autocomplete, type checking, etc but dealing with relationships is much less tedious than with SQL. You can read or insert deeply nested entities very easily.

Obviously ORMs and query builders won't solve 100% of your queries but they will solve probably +90% with much better DX.

For years I used to be in the SQL-only camp but my productivity has increased substantially since I tried EF for C# and Drizzle for TS.

tracker1 11/3/2025||
VS Code plugs into my DB just fine for writing SQL queries...

With an ORM, you can also over-query deeply nested related entities very easy... worse, you can then shove a 100mb+ json payload to the web client to use a fraction of.

mrsmrtss 11/3/2025||
That's just nonsense. It's trivial to make efficient projected queries with ORMs like EF. Nothing stops you doing stupid things with plain SQL either.
tracker1 11/3/2025||
No, but it does put you closer to the actual database and makes you think about what you're actually writing. You also aren't adding unnecessary latency and overhead to every query.
pier25 11/3/2025||
Better DX is not unnecessary.

Also the overhead of good ORMs is pretty minimal and won't make a difference in the vast majority of cases. If you find a bottleneck you can always use SQL.

pjmlp 11/4/2025|||
Only if using the wrong kind of editor.
carderne 11/3/2025|||
Bit of a plug but I just started working on a drizzle-esque ORM[1] for Python a few days ago and it seems somewhat appropriate for this thread. Curious whether anyone thinks this is a worthwhile effort and/or a good starting point syntax-wise.

https://github.com/carderne/embar

tracker1 11/3/2025|||
Made pretty much the same comment Hono + Zod + Swagger is pretty nice all around. Not to mention the portability for different runtime environments. I also enjoy Deno a lot, it's become my main shell scripting tool.
adzm 11/3/2025||
I think it makes sense to start with node.js... it's the standard and widely supported. Eventually it should not be too difficult to switch to bun or deno if the need arises.
jackblemming 11/3/2025||
When they start moving away from API calls to third parties to their own embeddings or AI they’re in for a bad time.

What’s going to end up happening is they’ll then create another backend for AI stuff that uses python and then have to deal with multiple backend languages.

They should have just bit the bullet and learned proper async in FastAPI like they mentioned.

I won’t even get started on their love of ORMs.

resiros 11/3/2025||
TL;DR

>I'll preface this by saying that neither of us has a lot of experience writing Python async code

> I'm actually really interested in spending proper time in becoming more knowledgeable with Python async, but in our context you a) lose precious time that you need to use to ship as an early-stage startup and b) can shoot yourself in the foot very easily in the process.

The best advice for a start-up is to use the tools that you know best. And sometimes that's not the best tool for the job. Let's say you need to build a CLI. It's very likely that Go is the best tool for the job, but if you're a great Python programmer, then just do it in Python.

Here's a clearer case where the author was not very good with Python. Clearly, since they actually used Django instead of FastAPI, which should have been the right tool for the job. And then wrote a blog post about Python being bad, but actually it's about Django. So yeah, they should have started with Node from day one.

com2kid 11/3/2025||
Actually after having written a complex CLI in Node, I think I would've been better off learning Go and writing in that.

Sometimes tools are worth learning!

morshu9001 11/3/2025||
I'd also rather write a CLI in Python than in Node
com2kid 11/4/2025||
The only issue with writing a CLI in Node is ecosystem. The CLI libraries for Node are (or were last time I checked) inspired by React. Not a paradigm that is fun to write in, and if I'm making a CLI tool it is because I am bored and want to make something for my own entertainment.
pjmlp 11/4/2025|||
Here is an unwanted advice from a old dog, you don't need any libray to write CLIs.

A function to display help, and another old to parse the CLI parameters isn't PhD level coding.

Also nowadays, any LLM friend can quickly generate them.

com2kid 11/5/2025||
Yeah the last CLI app I used was actually a TUI. It routed std out and std err from scripts and programs it'd call out to into separate windows. It had animations and effects and a help system built in. It also had theming support because the library I used for the TUI happened to have that and came with some default themes! It was a bit beyond a simple CLI tool.

If I'm farfing around with the console I'm going to have fun.

morshu9001 11/4/2025|||
There are also CLIs actually written in React using Ink
com2kid 11/4/2025||
I'm aware....

That is exactly what I am complaining about.

I guess some people like it, but just, ick.

morshu9001 11/4/2025||
Gemini CLI used it, and I actually hate the layout. Never thought I'd see a CLI manage to waste terminal window space to the point of needing to zoom it out.
kelvinjps10 11/3/2025||
They were good but no experience with python async
cryptomic22 11/3/2025||
This is a lot more about Django than it is about Python.
luxuryballs 11/3/2025||
I don’t know a ton about either but now I am curious if I should takeaway the idea that async with Python is problematic or if only async with Django is the issue.
morshu9001 11/3/2025||
Async with Python is problematic, but this article doesn't really explain that. Django async being bad is just one of many symptoms.
fatih-erikli-cg 11/3/2025||
[dead]
ccanassa 11/5/2025||
Sounds like a hammer-and-nail problem to me.

Django works perfectly with green threads. It’s a superior model to async and avoids the whole function-coloring mess. I’ve seen Django setups outperform Go-based services running under similar conditions.

JavaScript is a terrible language and should only be used when there’s absolutely no alternative, such as in browsers.

fakedang 11/3/2025||
I'm actually building an app on the side and went the other way around on this. Migrating from Typescript back to Python. Granted, my gripes were more with NextJS rather than Node or Typescript.

Using Django was so intuitive although the nomenclature could do a bit better. But what took me days trying to battle it out on NextJS was literally done in an hour with Django (admin management on the backend). While Django still looks and feels a bit antiquated, at least it worked! Meanwhile I lost the entirety of the past weekend (or rather quite a bit of it), trying to fight my code and clean up things in NextJS because somehow the recommended approach for most things is mixing up your frontend and backend, and a complete disregard for separation of concerns.

My new stack from now one will likely be NextJS for the frontend alone, Django for the CRUD and authentication backend, Supabase Edge functions for serverless and FastAPI if needed for intensive AI APIs. Open to suggestions, ideas and opinions though.

inerte 11/3/2025||
Looks like last week was coding week, current one is marketing week.
pspeter3 11/3/2025|
I'm curious about who else is using MikroORM. I see a lot of hype around Prisma, Drizzle, and Kysely but MikroORM has always looked interesting.
sthuck 11/3/2025|
I'm using it for a hobby project, and pretty pleased.

My personal maybe somewhat "stubborn old man" opinion is that no node.js orm is truly production quality, but if I were to consider one I think I would start with it. Be aware it has only one (very talented) maintainer as far as I recall.

stephen 11/3/2025||
Everyone's definition of "production quality" is different :-), but Joist is a "mikro-ish" (more so ActiveRecord-ish) ORM that has a few killer features:

https://joist-orm.io/

Always happy to hear feedback/issues if anyone here would like to try it out. Thanks!

More comments...