Hacker News new | past | comments | ask | show | jobs | submit login

To be fair, Sequelize makes itself look like a joke. I normally wouldn't call out an individual library to shit on, because I understand that a lot of work has gone into it.

But I used it for years and it was always buggy. Sometimes options wouldn't work correctly because the authors liked to do that clever JavaScript thing where they write `foo = optional_thing || default_value` even for BOOLEAN options. I always had issues with it not being able to truncate/drop tables correctly that had foreign keys (it didn't attempt to order them intelligently), some of the options weren't compatible with each other even though they were orthogonal (I'm thinking about the snake_casing options and the created_at/updated_at column features), etc, etc.

It just... didn't actually work. Over many versions. I think I used it from late 3.x somewhere through 5.x.

Maybe it's awesome now, but I doubt it.




> I normally wouldn't call out an individual library to shit on, because I understand that a lot of work has gone into it.

I don't think I've ever called out on a library, or not felt truly thankful that it was there to help me. But Sequelize... man...

When I first got into Node, and got Sequelize, after working for years with .NET, Entity Framework, NHibernate and the likes, it just felt like horrible-everything. I've forced myself to use it in some projects, because node is cheap, and I kept thinking that I'm missing something. Some brilliance behind the questionable... everything. No. I can't even bring myself to think about that design mess. Sorry for the rant, Sequelize makes me feel insecure, and little, in the chaos of the Universe.


Same. Honestly, I only have not-nice things to say about Node, JavaScript, and its ecosystem, so I should probably just shut up.

But I was like you- I picked up Node because we had an existing project in it. It only used libraries that had the most "stars" or whatever on NPM and they were all pretty deficient (and some were shockingly slow). But none were so frustrating as Sequelize.


I only have not-nice things to say about Node, JavaScript, and its ecosystem,

The NPM ecosystem can be frustrating and annoying sometimes but today nodejs is a solid server runtime.


Node-the-software-project is a feat of engineering.

But the API, the client language, the ecosystem, and even the idea are bad, IMO.

Bad API example: Tell me how to deal with time zones in Node without pulling in a big third party library. Answer: You can't. So, a "scalable" backend platform can't handle datetimes from different time zones? Neat!

"Well, that's JavaScript's fault" you say. Node certainly has (a few) APIs that don't apply to the frontend, so why not add more of the important ones for backend work?

Or, maybe JavaScript really just doesn't belong on the backend at all...

Not to mention that it's single-threaded, so the answer to scaling up better is to just run more instances. -_-

See? I should've stayed quiet. ;)


> Not to mention that it's single-threaded, so the answer to scaling up better is to just run more instances.

Yeah, this sucks. It's impossible to do any actual processing in javascript since functions that don't return immediately will clog the event loop. Why can't we have javascript code that runs asynchronously and reports completion and results as events? Even browsers seem to have this now. I tracked issue #2133 on GitHub for a long time and nothing materialized.

Not sure if Node.js still lacks this feature. If so then it means Node.js is nothing but an I/O scripting platform. You get events and you make the system copy data from some source to some destination in response. Any sort of actual processing means latency becomes unacceptably high.


Node has worker threads, which are basically the equivalent of Web Workers from browsers, with similar message based API


Wow really? Since when/what version? I have to see it. How did they solve the serialization issue? If I remember correctly that was necessary to pass objects between threads.


I think they became stable in v12. I'm actually not sure about the internal implementation, but from user's point of view you can pass almost [1] any value via a message and you will get a copy on the other side. You can even share memory between threads with SharedArrayBuffer.

[1] https://nodejs.org/api/worker_threads.html#worker_threads_po...


No it's not. Even if they fixed all the bugs which I doubt the API design is bad.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: