Live data from Hacker News

ExpressJS vs. Actix-Web: performance and running cost comparison

medium.com

51–58 of 58 posts

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#51

It calls expressjs minimalist, but it has 52 dependencies. I really feel like we really need to reconsider what "minimalist" means in the js ecosystem.

I think the author wants to say that it’s like at the opposite of frameworks like Adonisjs, Sailsjs or Rails.

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#52
post #30

No one has ever been deciding between express and actix-web

I have, because I did a bunch of Express+TypeScript, always wanted to learn Rust and wanted to bootstrap a business by optimizing costs. I liked this article since I always wanted to see concrete numbers or at least a general idea. It's not uncommon for business to move from Ruby/Python/JavaScript to Go as they grow. I personally preferred learning Rust over Go because of its depth.

"... wanted to bootstrap a business by optimizing costs" -- The famous quote "premature optimization is the root of all evil" comes to mind. :-) As a fellow tech entrepreneur, thinking long and hard about my planned startup's technology stack, I was also guilty of initially leaning toward a scalable, safe, enterprise-y and fancy, but less mature, stacks, like C# on .NET Core and Julia, correspondingly. However, upon my extensive research and thinking, I'm now leaning toward using Python and Flask for API-focused backend and Vue for frontend. After all, unless you're the next Google (or, at least, Dropbox), costs of your infrastructure would be negligible compared to business costs associated with people (due to salaries) and lost time-to-market advantage (due to higher complexity and learning curve). Should a startup become wildly successful and scale-driven cost optimization would become an issue, it most likely would make much more sense from the strategy perspective to ask a team to rewrite the platform(s) - or, rather, its relevant performance-critical parts - into a highly-performant language, like Rust. Having said that, I still think that the containerized applications (not necessarily microservices!) approach might be preferable, despite corresponding increase in extra complexity, learning curve, efforts and costs, because IMO the above-mentioned extras are less significant (and, thus, more affordable for a bootstrapping startup) than those associated with attempting to use new to founders or relevant team or not mature enough language and corresponding technology stack.

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#53
post #52

Earlier quoted context omitted.

I have, because I did a bunch of Express+TypeScript, always wanted to learn Rust and wanted to bootstrap a business by optimizing costs. I liked this article since I always wanted to see concrete numbers or at least a general idea. It's not uncommon for business to move from Ruby/Python/JavaScript to Go as they grow. I personally preferred learning Rust over Go because of its depth.

"... wanted to bootstrap a business by optimizing costs" -- The famous quote "premature optimization is the root of all evil" comes to mind. :-) As a fellow tech entrepreneur, thinking long and hard about my planned startup's technology stack, I was also guilty of initially leaning toward a scalable, safe, enterprise-y and fancy, but less mature, stacks, like C# on .NET Core and Julia, correspondingly. However, upon…

I 100% agree with the point you are making.

A concret example of that is in a comment in this thread: https://news.ycombinator.com/item?id=22458176

That said you partially quoted me, if it wasn't for learning Rust I would stick to Express+TypeScript. If it's bound to fail, I might as well learn and have fun doing it.

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#54
post #38

They are running Node with only one worker and are instead tuning the DB connection pool in that one worker... So the whole benchmark is bogus.

Author addressed this on a Reddit comment thread: https://www.reddit.com/r/rust/comments/fbu5tt/expressjs_vs_a... . The results aren't significantly different; Rust is still very much more efficient than NodeJS especially when considering memory utilization (and the hosting costs associated with that memory footprint).

I really don't think the results would be significantly different.

I tried to make changes and run his benchmarks, however the DB seeding is in Rust and it fails to compile on my machine....

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#55
post #52

Earlier quoted context omitted.

"... wanted to bootstrap a business by optimizing costs" -- The famous quote "premature optimization is the root of all evil" comes to mind. :-) As a fellow tech entrepreneur, thinking long and hard about my planned startup's technology stack, I was also guilty of initially leaning toward a scalable, safe, enterprise-y and fancy, but less mature, stacks, like C# on .NET Core and Julia, correspondingly. However, upon…

I 100% agree with the point you are making. A concret example of that is in a comment in this thread: https://news.ycombinator.com/item?id=22458176 That said you partially quoted me, if it wasn't for learning Rust I would stick to Express+TypeScript. If it's bound to fail, I might as well learn and have fun doing it.

I'm sorry about partially misinterpreting your words - it was not intentional. I'm getting myself a cup of coffee to improve my level of attention for the rest of the day. :-) Anyway, I'm glad that we're on the same page on the core issue discussed.

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#56
post #39

Earlier quoted context omitted.

A real minimalist web framework for Node is Koa. Basically anything besides the bare minimum is a separate dependency, so you only install what you need. That said, it probably means minimalist in a usage sense. Compared to things like Nest.js (which I love, don't get me wrong), express is a lot more straightforward and basic.

Koa is better but still has 43 dependencies...

23 according to npm, with a size of 83kb. Sounds pretty minimal to me.

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#57
post #56

Earlier quoted context omitted.

Koa is better but still has 43 dependencies...

23 according to npm, with a size of 83kb. Sounds pretty minimal to me.

NPM only counts direct dependencies, so the reality is almost always higher.

Re: ExpressJS vs. Actix-Web: performance and running cost comparison

#58
post #24

Earlier quoted context omitted.

How you generate the types from graphql. I noticed most of the generators create types with all optional keys. Do basically you need to check all the time...

If they're creating types with optional keys it's probably because that's how you're defining your types in GraphQL. E.g. with type Foo { bar: String } bar would be optional in the Typescript type because it's specified as optional in the GraphQL type. You would need to do the following to make it required: type Foo { bar: String! }

I mean... All keys can be optimal in reality, but in real world you can't put all non optional because defeats the purpose of graphql.
Post reply on HN