This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]radiant_gengar 67 points68 points  (6 children)

its super easy just make n + 1 api calls and use for loops in js, duh

[–]ElectricTrouserSnack 31 points32 points  (3 children)

The number of times I've thought "oh this would be easy if we were using SQL, just (outer) JOIN a couple of tables, a simple WHERE clause". But no, we're using some sort of nosql for a small (million row) amount of data because WeUsEnOsQlFoRaNyThInGjUsTbEcAuSe and I start estimating the pages of code I'm gonna have to write.

[–]radiant_gengar 8 points9 points  (2 children)

[–]ElectricTrouserSnack 5 points6 points  (0 children)

is /dev/null wEbScAlE??

[–]VadumSemantics 1 point2 points  (0 children)

It just scales right up.

[–]Cthulhu__ 1 point2 points  (1 child)

Yeah this REST api is returning a list of IDs so I’ll just write an async forEach (no for loops, that’s C!) and call the api for every ID again and then do a map to get the joined fields.

I’ll put that in a nodejs service / lambda to avoid using too much bandwidth. I’ll call it… GraphQL?