Hacker News new | past | comments | ask | show | jobs | submit login
Why is signal servers using Java and not Erlang
51 points by _4ql7 on Jan 16, 2021 | hide | past | favorite | 28 comments
Signal has been built by whatsapp co-founder, why did they choosed to use java and not erlang like they did for whatsapp?



Brian Acton, of WhatsApp fame, joined with the creation of Signal Foundation circa 2018. Moxie Marlinspike and others created the software that became Signal much earlier, they were not part of WhatsApp.


Back when it was TextSecure.

Also, it's worth noting that the Signal team didn't work on WhatsApp. It was WhatsApp that chose to integrate the Signal protocol, which Open Whisper Systems/The Signal Foundation open-sourced their protocol.


I thought I remembered them actually hiring Moxie to review code.


Mostly because both JavaVM and ErlangVM are solid but Java VM is much more popular.

If you're looking for a technology to run a service focused on privacy and security one of the things to consider is the amount of use and thus testing something gets. In case of Java that's testing in enterprise setting.


I'm a little surprised that the stock response seems to be that erlang is "arcane" and would have a higher cost to maintain. I don't use it myself but there definitely are erlang programmers, and I sometimes wish I had chosen a less mainstream tech stack than typescript for my own company as it makes filtering for engineers a bit easier. Erlang is surely quite stable given that it was initially designed for telecoms, and projects like rabbitmq are based upon it?


Some people seem to value high availability of a lot of staff choices and others value the small number of experts that a more obscure language provides. There are very different philosophies of what makes a successful business underlying each of those differing world views.


I wouldn’t fret. Moxie is a smart guy and he can scale it or find someone who can. He is well-regarded in the security community and has the network of people to make things happen.


Are you implying that Signal wouldn't be having scaling issues had it been written in Erlang instead of Java?

An obvious reason why any project picks a more popular language over an obscure language is the number of engineers comfortable with that language.


It’s possible. I wrote a service in Elixir processing every message posted on Reddit and HackerNews almost in real-time. The $5 VPS was loaded 5-10% most of the time. The Erlang runtime is more efficient than one imagines.


Hi Stanislavb - Care to elaborate more?


I think what was cool with WhatsApp was just how few engineers was necessary to scale well. I would guess Signal has enough money to throw around that having Java is a better deal, making the buss factor bigger and such.


This is an odd take to me.

It is common for a JVM app on a single box to process >100K messages a second with an eventing system. It is not as common, but relatively normal, to process >1M per node.

With the cost of hardware, a company is usually "throwing around" money on maintainability of a much less supported runtime. Engineering time of something like JVM vs Erlang is much more substantial of a cost.


I worked once in a system that was sending messages to via message queue to Java based service. We once send 60k messages and a Java based system failed to process these over the whole night.

Java have a high ceiling for writing high performance systems but in practice it is easy to make a massive ball of mug that performs extremely poorly. In many cases it is easier to write fast erlang/elxir/node application.


Signal just sent a Twitter message that Signal is back after technical difficulties.

So maintainability might be up for discussion...


> I think what was cool with WhatsApp was just how few engineers was necessary to scale well.

Probably because they started out using ejabberd, a very mature and widely deployed XMPP implementation.


Erlang is not an "obscure language" for that use case. It’s also a good way to filter developers and pre-select the ones being skilled about the domain problem.


Erlang was literally made for this job.

WhatsApp managed to scaled to 500M user with only dozens of Servers that were using 2010 Tech.

Scaling issues in FreeBSD, Linux and BEAM VM were all upstreamed.

When people say something wont Scale, it implies Scaling "x" cost more than "y". In which case I dont doubt Erlang is better here.

I seriously doubt Engineers were an issue. I mean they had a team of 3x when they reached 500M user. That is including Engineers on both iOS and Android Clients.


Erlang is a pretty rarefied tech stack, which generally only gets adopted if you have an evangelist in the room on day0. Which also means it's a lot easier to hire Java developers.


I’d ask why they used Erlang to build WhatsApp in the first place instead of Java. I suspect it’s what’s that had at the time


I suspect, given that Signal server is open source too, we will likely have an even faster server runtime than in the past built with something like rust or erlang. The potential infrastructure savings at their hypergrowth scale could be enormous.


The Signal server is not quite open source. Yes, there is a repo with source for a server, but it us not clear if Signal is actually using this source for their server.


Hello Snowden, Hello Dave


Hehe, shame this got down voted so much. It's actually a pretty hilarious Erlang joke. They made a video way back showcasing Erlang in the setting it was primarily used: telecom systems. In this video they keep calling and greeting each other. The video can be found here: https://www.youtube.com/watch?v=uKfKtXYLG78


WhatsApp was doing 2 million concurrent TCP connections to a single server years ago with FreeBSD and Erlang


Java with vert.x can do the same Job, no need to go for Arcane tech like Erlang


“Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.” — Robert Virding :: First Rule of Programming


A language can’t be separated from the platform it runs on and the JVM has really good concurrency primitives, so a lib written on top of them will be top notch. Furthermore, the JVM will run circles around Beam with its state of the art GC and JIT compiler. (Not trying to start a flamewar, I really like Erlang, but the JVM is really incredible)


Akka "do" the same Job... Typed Akka "do" the same job better...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: