Scaling to millions of simultaneous connections (2012) [pdf]
erlang-factory.com
erlang-factory.com
Let the clients handle end-to-end encryption with something zk DH/OTR/SMP.
I'm curious how they later monitored this and did other common SRE stuff. Also deployments.
As an aside, MQTT has a constrained device optimized sibling MQTT-SN, which works over UDP and supports sleepy nodes, etc. Unfortunately that one's stuck in licensing hell and does not yet have good tooling, at least last time I checked.
I gave a talk about MQTT-SN Gateway at Erlang User Conference 2013:
http://www.erlang-factory.com/conference/ErlangUserConferenc...
http://www.erlang-factory.com/upload/presentations/807/ZviMQ...
ZeroMQ also has its own experimental elliptical-curve encryption protocol now: http://curvezmq.org/ They call it experimental, but I've haven't heard anything negative about the implementation from the cryptographers, and elliptical curve crypto is well-established (it's the basis for Bitcoin's key signing, for example). Also, it's closely based on Daniel J. Bernstein's CurveCP.
An immutable disk persistence mechanism would be a strange thing.
32. Even by the standards of the world’s best technology companies, WhatsApp runs lean. With only 32 engineers, one WhatsApp developer supports 14 million active users, a ratio unheard of in the industry. (WhatsApp’s support team is even smaller.) This L E G E N D A R Y crew has built a reliable, low-latency service that processes 50 billion messages every day across seven platforms using Erlang, an unusual but particularly well-suited choice. All that, while maintaining greater than 99.9% uptime, so users can rely on WhatsApp the way they depend on a dial-tone.
The same is true of client engineers too I suppose. One developer putting out an app to 1 person is identical to putting one out for 100 million. The work is related to the number of clients, not the number of installs.
The backend service is rather simple for 50 billion messages a day? hmmm not so much, I'm thinking.
I ran and scaled the Napster server to 80 million users. We pushed about 70 billion "index file" commands an hour alone at peak. We had a chat and messaging system that also pushed millions of messages an hour.
There were some pieces of data that had to live on all the servers (what user was connected to what server) which would have caused some problems eventually (though with how much memory you scan stick in today's machines, not for a very long time), but from experience, 10k really was the same as 80 million.
The code to do this was a relatively small amount of C++ code. Most of our problems with scaling had to do with bugs in Linux when it was younger and "line-speed" Cisco switches that would blow up just because you pushed a few million packets per second through them.
I'm personally not familiar with Erlang to know if it would have worked for us. A lot of our scaling was about being very efficient with memory (the whole thing ran on little Pentium 2 machines with 2 GB of RAM each and part of the protocol unfortunately relied on MD5 hashes of files for file transfer which took up most of the memory).
Yes and no. It's a solved problem (Tibco RV installations handle this volume without breaking a sweat and have done so for years). On the other hand, this is some impressive price:performance for doing it. Or was; $19Bn would buy you a hell of a lot of Tibco licenses...
BEAM locks are within the VM's implementation[0]: http://www.erlang.org/doc/apps/tools/lcnt_chapter.html. BEAM lock counting is about introspecting runtime state and capabilities.
I doubt Go's runtime is lockfree. The answer would thus be "yes, most likely".
> I think the idiomatic way to work with golang is goroutines rather than mutex
1. depends: http://stackoverflow.com/questions/10728863/how-to-lock-sync... https://code.google.com/p/go-wiki/wiki/MutexOrChannel
2. I doubt channels implementation is lock-free, though I could well be wrong
[0] and maybe in NIF[1] as well
"Non-goals: make channels completely lock-free (this would significantly complicate implementation and make it slower for common cases)"
You may view this comment as too cynical for this particular topic, but the ridiculous surge in Whatsapp stories doesn't lie. And of course we should inspect the action of successful companies.
I am merely pointing at the crude vulgarity of the Valley's barometer for success.
Would be great to have someone from WhatsApp speak at CUFP this year [1]. If anyone reading this can encourage them to do so (or put me in touch with someone one there), that would be great.
[1] http://cufp.org/
*My understanding is that it's a similarly architected system, but built on a Linux/luajit stack
http://hn.algolia.com/#!/story/forever/prefix/0/Whatsapp%20s...
(Correction: the presentation is from 2012; I don't know when it was posted online.)
WhatsApp is also not associated with the titillating "share nude pics" culture of SnapChat.
Yes? It is not only vulgar, it is utterly clueless.
Many people here want to understand how WhatsApp managed to convince someone to pay so much money for it, perhaps so they can replicate this success and also become rich. What's so wrong with that?
My theory: Perhaps because an ever growing population of tech professionals are disgusted with the race for more wealth?
I will be the first to admit, I'm an Elon Musk fanboy, although I think its justified. Instagram. Whatsapp. Messaging apps! Billions of dollars! For messaging! With that same amount of cash, Musk has delivered goods to an orbiting space station and has succeeded in changing the direction of transportation, something an entire auto industry wouldn't (not couldn't, wouldn't) do.
I could be wrong. Perhaps money is still the end goal for everyone. If its just to have money for money's sake, I feel sad for you. If its to pursue your passion, I think we can all empathize with that.
This really wasn't the appropriate thread to hijack for this discussion anyway; I came here to talk about Erlang.
I'm saying that HN's attention span is dominated by dollar signs.
Even if it's overly optimistic, it's a pretty reasonable aspiration compared to the wage slavery most have to endure, so I fail to see why this is wrong.
There are plenty more of stories of failure studied at HN than successes like WhatsApp. That's actually more correlated with reality than the mainstream business media that focuses mostly on success.
One might argue WhatsApp isn't worth what was paid for, or that the money would be better spent elsewhere. But that's a rather subjective judgement. Spending $16 billion on, say, philanthropic causes, doesn't necessarily lead to desirable or sustainable effects. As with any scarce resource, it depends on how the money is managed.
I don't care about money; I care about living an enjoyable life.
I do work hard and desire success; which means to have the liquidity to support the activities and lifestyle that I prefer. This requires money.
So yeah, get off your high horse and please stop lecturing people with cheap and meaningless moral judgments.
Ha. I'm not lecturing; I simply have no respect or consideration for your position.
You are not being lectured: you are encountering an attitude with which you disagree, and one that has no regard for your disagreement.
> consideration for your position
You have enough consideration to feel like posting a comment about how much you feel about it.
I know! My point is merely that I wasn't lecturing.
>You have enough consideration to feel like posting a comment about how much you feel about it.
I suppose I enjoy throwing the moral imperative into sharp relief; making it clear just how much I disdain your vulgar acceptance of the love of wanting money.
That moral imperative alone is enough to carry weight in this thread. It has wandered in as mere sentiment without ever presenting an argument.
...Now, of course, I have strayed into lecturing you about the mechanics of this whole thing--but note I still have not lectured you with the moral judgment itself. I don't care about convincing you that money is vulgar. Sanctimony is enough for me.
You are quite right, though; I have spent enough time here.
Really? You disdain the love of wanting money? Looks like you have some personal issues, you're taking this way too personal. Get over yourself, some people love making money and there's nothing wrong with that. I tend to worry more about people who hate making money and have to rely on others, even if that means giving away their freedom or stealing.
>You disdain the love of wanting money?
At what point has my absolute contempt for "loving money and wanting more of it" been unclear to you? Because you really should have clued in around when I said "Yes?".
>Looks like you have some personal issues, you're taking this way too personal.
This is banter while I fold my laundry.
>some people love making money and there's nothing wrong with that.
See, you just keep on repeating your disagreement with me as if it's going to change anything. Moral imperatives are, well, imperative, you know? I'm just going to reiterate: there is something wrong with that.
I'll rephrase you: some people hate the love of money and there's nothing wrong with that, or at the very least, you can't do anything about it.
You're wasting your own time and giving me more opportunity to bash greed, which is, as I said, making the folding of my laundry more enjoyable.
But I guess it might bother you that someone might think your moral compass is off center because of your position on money.
I don't have the knowledge or experience to say otherwise, so if someone were to ask me if WhatsApp was a success, $16B seems like a good reason to say yes. Are you implying that WhatsApp's sale was a failure case for their owners, and success for them would have looked differently? (reject the sale and continue growth of the platform?)
>If a lot of smart people thought WhatsApp was worth 14B
Why are they smart? Because they have billions of dollars? Because Whatsapp is valuable? Because Whatsapp was less useful before the smart people bought it?
Are you incapable of viewing the transaction of 16 billion as a possible utter mistake? As financial hand-waving assigning a liquid value to shares whose value might well be inflated?
Money is a poor measure of value. Plain and simple. Are you drawn to the volume of the transaction because you think it signifies true success?
> it's probably worth taking a second look at what WhatsApp did to get to this point.
Something I never contested and agreed with explicitly.
Money is just a number. I can't quite tell if you're suggesting that value can't be quantified, or if you believe we could quantify value some other way that would be more functional than capital markets. Do Tell.