"We spin up 50 node containers" <-- WTF?! or WTF!?
-
@lucas1 said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
. I met a guy that was running his business on node.js + express and cassandra. He claimed that it was much better than ASP.NET.
You should've simply said no and just walked away!
-
@dkf said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
Getting paid is the #1 objective…
Shit, I've been doing it wrong.
Filed under: I didn't paid for any of that shit.
-
-
@xaade said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
An asynchronous callback is a thread.
Not necessarily, and
(with the exception of Web Workers)not ever in JavaScript.Edit: Web Workers run as separate threads, but even there, callbacks run in the same thread as the one that set the callback.
-
@error How is it asynchronous then?
-
@dcon I like the way docker allow to have an exact environment in production that I used to development and etc. I think it is still worth it's bugs. But I never used it for anything in production, so I wouldn't bet my job on that.
-
@xaade said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@error How is it asynchronous then?
Remember how multitasking worked before we had multiple CPU cores?
that's how Javascript works. it's cooperatively multitasked in that you can choose to yield your execution to other code so that other code may execute while you are waiting for a thing to happen.
this is how callbacks work in CPS style and how Promises work under the hood in ES6 style.
there's only the one thread but you can queue up functions to execute and the thread picks up the next function to execute when the current one fully unwinds its stack from that queue.
N.B. : This explanation is massively over simplified and while it is correct in the general effect it is likely very very very wrong in the specifics as to how the effect is generated.
-
@fbmac said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@dcon I like the way docker allow to have an exact environment in production that I used to development and etc.
You use <insert Linux distro of choice> on your production server ? Install that on your workstation.
Bam! Same environment in dev and prod.
-
@error said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@dkf said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
Getting paid is the #1 objective…
Shit, I've been doing it wrong.
600+ contribs, not bad. Unfortunately 3 of my latest projects aren't on GitHub so my contribs since spring are fairly sparse.
-
@Polygeekery said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@apapadimoulis said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
is nodejs really that deficient of a hosting platform that it can't utilize worker threads to process reqeusts?
Yes.
@apapadimoulis said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
Are they really that incompetent that they managed to build a doubly-load balanced thing so they could put on their resume that they know how to use as many stupid dev tools as possible?
You've been doing this for a while...you host a website that showcases this exact sort of thing...and you dare ask this question? Of course they are.
I maintain my suspicion that he chose the most WTF tech for the forums on purpose. It fits the website theme.
-
@dkf your hard drive is a key value store
-
@fbmac said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@dkf your hard drive is a key value store
Your mom is a key value store.
Filed under: With a high load factor.
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
local storage isn't exactly a file system.
it's more...... like a Dictionary<string,string> that you can use, but not forever because if you put too much data in there it suddenly goes "fuck you, no more storage for you!"
You mean like
ENOSPC
?
Key-value has no directories, I give you that.
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
Remember how multitasking worked before we had multiple CPU cores?
that's how Javascript works. it's cooperatively multitasked in that you can choose to yield your execution to other code so that other code may execute while you are waiting for a thing to happen.
[...]
N.B. : This explanation is massively over simplified and while it is correct in the general effect it is likely very very very wrong in the specifics as to how the effect is generated.Preemptive vs. cooperative multitasking is completely orthogonal to the distinction between single-CPU and SMP/multicore, so even as a simplification...
Cooperative is the Mac Classic and Windows-3 "multitasking" model, and you're right you have to yield your program flow there just like in Node, but both systems moved to preemptive long before multicore. Not to mention the guys who did preemptive in the mid-60s.The reason cooperative makes sense in web scenarios is that you're almost always IO-bound there, waiting for user input, databases, networks, whatever, but at the same time you need to handle a large number of independent connections. On a desktop you have a small number of event sources and programs that are often (even more in the era when it was common on desktops) CPU-bound, so it's plain fucking annoying plus usually a significant slowdown to have to break up your computations into chunks that yield to the OS every once in a while so as not to freeze the whole system.
-
@LaoC i'm trying to follow your argument here...... so my simplified explanation is right in that it describes what JS does, but completely wrong in explaining how or why it does?
..... so you just dais the same thing my disclaimer said at the end of the post?
or was there a specific point there that i'm missing. Cause there's geniune confusion here.
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@LaoC i'm trying to follow your argument here...... so my simplified explanation is right in that it describes what JS does, but completely wrong in explaining how or why it does?
..... so you just dais the same thing my disclaimer said at the end of the post?
It's right regarding the way Node.js works but not in the juxtaposition with SMP. "Regular" multitasking stopped being cooperative long before stuff outside universities or the NSA had multiple CPU cores. I daresay most Node.js programmers haven't even used cooperative multitasking in any other system.
-
@LaoC said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
I daresay most Node.js programmers haven't even used cooperative multitasking in any other system.
If that counts.
And if I count as a node.js programmer... (I use it! Sometimes. For stuff. It's good for a Raspberry Pi because it's lightweight compared to my other languages of choice)@LaoC said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
The reason cooperative makes sense in web scenarios is that you're almost always IO-bound there, waiting for user input, databases, networks, whatever, but at the same time you need to handle a large number of independent connections
It also makes concurrency a little less ouch. Because you can guarantee that a chunk of code will finish without something interrupting it. Of course, performance hits and all that, but sometimes, that's a good thing to know.
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
dais
HOW? HOW DID YOU EVEN MANAGE THAT?!?!?!?!
-
@sloosecannon said in ["We spin up 50 node containers" <-- WTF?! or WTF!?](/post> > I daresay most Node.js programmers haven't even used cooperative multitasking in any other system.
If that counts.
Sure, some will have :)
It also makes concurrency a little less ouch. Because you can guarantee that a chunk of code will finish without something interrupting it. Of course, performance hits and all that, but sometimes, that's a good thing to know.
You avoid the locking issues that are the big gun pointing at your foot as soon as you use threads. But the logic can get horribly convoluted.
@sloosecannon said in ["We spin up 50 node containers" <-- WTF?! or WTF!?](/topic/21261
dais
HOW? HOW DID YOU EVEN MANAGE THAT?!?!?!?!
Stack machine?
-
@fbmac said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
your hard drive is a key value store
No, because there are also directories, hard links and symbolic links. Also, it stores more metadata about the files than just the name. ;)
-
@dkf key: cylinder, sector, and whatnot - value: data
-
@dcon said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
Haven't read the whole thing yet, but this seemed appropriate:
That was a 7 hours interplanetary outage because of Docker
Hyperbole much?
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
are we using docker on the new server or did we do the sane thing and say "screw it"?
Yes.
-
@LaoC said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
It's right regarding the way Node.js works but not in the juxtaposition with SMP. "Regular" multitasking stopped being cooperative long before stuff outside universities or the NSA had multiple CPU cores. I daresay most Node.js programmers haven't even used cooperative multitasking in any other system.
we did cooperative multitasking before we had SMP.... and i was describing a coperative system so......
what exactly is your point then? am I wrong or am i right but using a flawed metaphor (as all metaphors are in some manner)?
-
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
that is ominously ambiguous.
Indeed.
-
@sloosecannon said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
dais
HOW? HOW DID YOU EVEN MANAGE THAT?!?!?!?!
my paws are quite skilled at the typos and the swypos.
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
we did cooperative multitasking before we had SMP.... and i was describing a coperative system so......
what exactly is your point then? am I wrong or am i right but using a flawed metaphor (as all metaphors are in some manner)?Yeah, but we also did preemptive multitasking before SMP. Your analogy is needlessly complicated by including that aspect
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
using a flawed metaphor
you didn't use a car analogy, did you?
-
@Luhmann said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
using a flawed metaphor
you didn't use a car analogy, did you?
........ maaaaaaaaaaaaaaaaaaaaaaaaaybe?
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
what exactly is your point then?
-
@boomzilla said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
what exactly is your point then?
if you're going to be a pedant, have a damned point to it. If you're going to pedanticize around me and your pedantry says the same thing i'm already saying i'm not going to give you pedant points.
@LaoC and @Jaloopa would have had points if i hadn't qualified my statement with that N.B. line at the end, but i did, so they don't. at least not from where i stand.
I will be happy to sell them some soapboxes to stand on, but if they want me to be impressed they should actually try to have a point and not shout "BAR BAR BAR BAR" at the top of their lungs.
:-P
-
@accalia "Remember how movies worked before we had Blu-Ray players? That's how $THING works. It's all black-and-white, grainy and flickering images without sound."
Yeah, you could say that. Technically the era of black-and-white, grainy and flickering images without sound was strictly before Blu-Ray. Never mind that everybody had better imaging tech long before Blu-Ray, so most people wouldn't find that a helpful description but if you're enough of a you can insist on the technical correctness.
-
@LaoC my description was helpful in that it explained the situation at a high level, your pedantry is denied as the description was not intended to be a perfectly accurate description of the process.
I appreciate the attempt, but as far as i am concerned you have lost the battle. I welcome you to try again next time.
good day to you sir and/or madam.
:hat_tip: :jaunty_cane_wave:
-
@accalia said in
I appreciate the attempt, but as far as i am concerned you have lost the battle.
There was a battle?
-
@LaoC said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@accalia said in
I appreciate the attempt, but as far as i am concerned you have lost the battle.
There was a battle?
indeed, good sir and/or madam. Indeed there was.
Good day!
:over_elaborate_wave_that_arnold_rimmer_would_be_proud_of:
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
:over_elaborate_wave_that_arnold_rimmer_would_be_proud_of:
-
@dkf said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
:over_elaborate_wave_that_arnold_rimmer_would_be_proud_of:
i was hoping @Onyx would post that frist..... but yes, that is the general idea.
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
i was hoping @Onyx would post that frist.....
I was busy!
-
@accalia said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
Good day!
-
@Yamikuronue said in "We spin up 50 node containers" <-- WTF?! or WTF!?:
You then treat the 50 docker containers like 50 worker threads.
Ehrm, no chance of pre-forking?
-
alt text: "4. They unplug the root machine but the thousands of leaf VMs scatter in the wind and start spinning up new instances wherever they land"