These are chat archives for Automattic/mongoose

18th
Apr 2016
Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 13:08

Out of curiosity, who even sees that much traffic? I'm not Wells Fargo or Facebook, man.

@LeonineKing1199 I do. Netflix does and they use Node. Amazon does and they use Node.js, etc.

LeonineKing1199
@LeonineKing1199
Apr 18 2016 15:19
Damn, 10k concurrent users ain't bad
So to be super efficient, I assume you use only vanilla JS callbacks and every time you need your own module, you just write it yourself in high-performance JavaScript
Ítalo Maio
@italomaio
Apr 18 2016 15:48
i cant create an INDeX in my DB im getting E11000 someone could help me?
why its causing this?
i know its a duplicate key but i could not see that duplicate index except in my other collection which have another key
but its name the same { key: email }
Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 16:03
@LeonineKing1199 I use bluebird promises. I avoid certain bad patterns, but other than that I don't spend too much time pre-emptively optimising. My point is that Node.js is not under-performing at all.
LeonineKing1199
@LeonineKing1199
Apr 18 2016 16:03
I never said it was. It's just a stupid thing to prioritize
LeonineKing1199
@LeonineKing1199
Apr 18 2016 16:11

Which isn't to sound mean.

I did google it though. Facebook gets around 500k concurrent users and their back-end is written in PHP/C++ so take that for what you will.

Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 16:18
HHVM
It does interpret php, but it's a VM
The fact that it outperforms php <7 significantly (and php 7 by a smaller margin) says a lot about the language and its community
LeonineKing1199
@LeonineKing1199
Apr 18 2016 16:30
Doesn't seem to say that much. Point is, it's kind of silly to let buzzwords like "scalable", "web scale" and "high performance" cloud your software design when in all reality, it's always been reliability and safety before speed.
Just think about how fast those hackers' scripts are going to run once they get inside XD
Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 17:04
I agree, as long as speed is good enough (like, within the same order of magnitude), it doesn't matter much
But reliability and safety before speed... I mean, it always depends on your needs.
LeonineKing1199
@LeonineKing1199
Apr 18 2016 18:01
I would be willing to wager that more than 80% of websites need security before speed
Valeri Karpov
@vkarpov15
Apr 18 2016 20:02
@diegoaguilar I think that was fixed: mongodb/js-bson@2d89288
@Nepoxx for sure. But even at that scale the question is (at least on the server side) primarily how to effectively parallelize work, not how to squeeze every last drop of perf out of the CPU, which is what people usually mean when they say "JS is slow" or "bluebird is faster than es6-promise"
Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 20:07
My point is this and only this: Node.js performs very similarly to other similar runtimes
Valeri Karpov
@vkarpov15
Apr 18 2016 20:08
@computertechie seems about right :) timestamps doesn't automatically create an index
Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 20:08
The "node/javascript" is slow/fast argument is moot, the benchmarks/production use speak for themselves
Valeri Karpov
@vkarpov15
Apr 18 2016 20:08
@Nepoxx looks like we're emphatically agreeing :)
Pier-Luc Gagnon
@Nepoxx
Apr 18 2016 20:08
Yeah :)
LeonineKing1199
@LeonineKing1199
Apr 18 2016 20:46
The only language that could possibly be faster than C++ is ++C and that's because the prefix operator doesn't return a copy before the incrementation