|
I like the idea of using node to pre-render JS frontend stuff on the server. Having two different sets of view rendering code sucks, and so does serving a blank page that turns into an actual page five seconds later.
|
# ¿ Feb 25, 2015 18:07 |
|
|
# ¿ May 10, 2024 01:13 |
|
Gul Banana posted:this is a genuine use case for javascript on the server - but it might still not count for node. using node for ssr, you have the overhead of process creation and startup on every web request - or at best, serialised ipc.. to a manually managed pool of processes since they're each single threaded. that's a good way to waste hundreds of milliseconds and hit scaling bottlenecks. it's easier just to embed v8 or some other javascript engine in-process of whatever you're using for the server. Embedding v8 in your main application server would probably be better, but it certainly wouldn't be easier than using pre-existing solutions. A load-balanced node worker pool that doesn't add hundreds of milliseconds of latency is a rather solved problem, and since it doesn't need to be public-facing you don't even really need to be able to scale the worker pools.
|
# ¿ Feb 26, 2015 16:59 |