News for hackers. Stuff that matters.
Re:JavaScript is Eating the World by TrickyRick on Thursday August 24, 2017 @09:47AM (#15090055)
What computations do you do in a webserver which hosts a REST API? Most of it is simple CRUD connected to a database, possibly with an auth layer on top, which is pretty much what you describe, passing IO through to a database and back.
Re:JavaScript is Eating the World by falcolas on Thursday August 24, 2017 @09:57AM (#15090129)
Compression, hash computation, regular expression routing lookups, parsing text, building and serializing datastructures, reading and writing caches; I could go on.

Sure, JavaScript (and Ruby and Python) are usually fast enough with modern hardware - but we can't pretend there's no cost.

Re:JavaScript is Eating the World by jdc0589 on Thursday August 24, 2017 @10:53AM (#15090557)
deserializing data structures is a great example. JSON.parse is SLOW. all it takes is a bit of bad code that doesn't do any checking of input size/etc... and if an authoritative source starts sending larger payloads than usual, your node process is horked. Granted, that's not a problem remotely specific to node, it just has a bigger effect in a node env.
Re:JavaScript is Eating the World by flavio81 on Thursday August 24, 2017 @10:56AM (#15090589)
> Most of it is simple CRUD connected to a database

If my apps were that way, i could have replaced my team with 20 well-fed monkeys.

Re:JavaScript is Eating the World by tisdy on Friday August 25, 2017 @12:08AM (#15096050)
Honest related question:

Does HN think putting 2-15KB JSON blobs in a Postgres DB running on Docker on a router is a good idea? Oh, and the table stores log data, so there's about 2 million rows after 5 days uptime. What do you think?

EDIT: This was not entirely related but it goes to the notion that it seems like a lot of myopic decision-making has somehow become even more acceptable and I would say this leads to dumb situations as above, and Node.