Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Best language for micro services for a startup
2 points by skar on July 3, 2015 | hide | past | favorite | 8 comments
I'm in a startup and we're looking for the right language to build our micro services. Our Android/iOs mobile apps and our website are accessing our database using their own respective PHP backends. We're working on building a set of services which'll serve as a common backend for all these. Our team has 15 odd developers ranging from newbies to people with 7 years of experience. Look at the linked google spreadsheet where I've jotted down certain options that I could. What's your suggestion?

https://docs.google.com/spreadsheets/d/1vfP9lF5Xeeov6_aRriDW2IyNZMcUKqQGxgqu5sn0Rks/edit#gid=0




Elixir (or plain Erlang) by far. http://blog.plataformatec.com.br/2015/06/elixir-in-times-of-...

Edit

A few more reasons:

- Elixir/Phoenix outperforms quite everything for some usecases https://twitter.com/julianobs/status/614416512825323520

- Elixir Code is well suited for longer maintenance modes http://blog.plague-dev.de/posts/Maintainable-Code-in-Elixir

- Elixir unions the advantages of monolithic apps and microservices and is very easy to scale http://blog.erlware.org/monolith-vs-microservices-where-to-s...


The numbers are impressive for sure. One worry that I have is about how to validate the message received from each of the microservices. We have a json composed of different data types and some amount of nested collections in there as well. With something like Go[1] or Scala[2], we can convert a json or each of the objects inside a collection in the JSON into an object.

1. http://stackoverflow.com/questions/24812933/golang-null-type... 2. http://stackoverflow.com/questions/11889907/how-to-convert-j...


https://hex.pm/packages?search=json&sort=downloads may contain something for your needs


IMHO: Scala by far

- You can use pretty much any JVM library

- You can execute Scala applications in a JVM which is a pretty common platform for other tools. Think CI, deployment on servers, etc.

- Akka Cluster out of the box. On other systems you have to build your custom communication pipelines for messaging between your multiple instances of the services


Every single thing in your spreadsheet is impossible to objectively measure (I'd argue your Java row is laughably incorrect for instance).

From a business perspective picking a language just isn't that important, it will NOT be the thing that makes you (un)successful.

So I'd go the other way, what language do the most people want to work on and has the least "I'll quit if we pick that" factor? Just use that.


One of the big advantages of "micro-services" is that for each individual service, you can pick the best language suited for that service. If you're going to pick a single language (and I agree with kasey_junk on which to pick), then just make a single service, in one language, and split it when you need the isolation or differences in scaling each piece.


Why not keep using PHP and experiment with new languages on smaller and less critical services?


Yes, we tried it already and we have certain sinatra/rails based services, but it's causing difficulties for the developers new to ruby and those who've recently come in and been working only on ruby, since they know only part of the stack. So we stuck to the PHP version and are averse to diversifying our code base into multiple languages.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: