News for hackers. Stuff that matters.
Re:Why we ditched Django for Microservices by davidw on Monday January 12, 2015 @07:34AM (#8873535)
> A microservices architecture is (fairly) new and it doesn't tie you to a particular language. If you want to build a service in Lisp, Go, Elixir, etc then you can (assuming it makes sense). Good devs love to learn, experiment and hate being bored. A microservices approach encourages all of that

The developer in me kind of likes that - fun new toys! But from a business point of view, I'm not sure it sounds like such a good idea: lots of weird, unmaintainable stuff.

[deleted]
Re:Why we ditched Django for Microservices by tmwatson100 on Monday January 12, 2015 @08:44AM (#8873790)
Correct, writing code does not make money. However this change is a little bit like starting a blog... You don't see the immediate benefits straight out but you'll realise them over time. You can put it off and put it off but the longer you do the harder it gets, especially in this scenario.

This architecture doesn't make sense for everyone and we could have continued with Django. But making these changes now mean that we will be able to fix all the above a lot quicker going forward.

Re:Why we ditched Django for Microservices by adambratt on Monday January 12, 2015 @02:38PM (#8875923)
Don't take this the wrong way, but you have 3 people writing code right now according to your Team page on the website.

Isn't it way more confusing to have a bunch of different code repos that only a single person owns? Sounds to me like you'll be locking up too much code in a single individual's head. Not to mention if they're using different frameworks and libraries you're only going to add to the headache.

For smaller teams, it usually is best to stick with one or two codebases/languages for your backend. Sure there are often "better" tools for specific applications but at the end of the day there's usually a way to handle them with your existing codebase that will let you scale for now.

As an example, we needed a robust messaging framework to support our chatrooms and private messaging features. We originally built it out in Tornado, then switched to NodeJS with a rabbitMQ backend, and finally realized it was easier for us to just use PubNub and fire off the pushes from our main Django app. It'll scale with us for probably 10x our current size and by that time we'd have a team of 4-5 people dedicated just to this feature anyways.

Re:Why we ditched Django for Microservices by indymike on Monday January 12, 2015 @10:34AM (#8874383)
Finding architecture that makes sense to everyone is a tall order.
Re:Why we ditched Django for Microservices by raverbashing on Monday January 12, 2015 @08:01AM (#8873630)
And of course, ignoring the problem of duct-taping all the services together.

"Oh we'll just RabbitMQ everything together", sure, great, until you discovered certain services needed a smaller latency, more bandwidth, etc

And RabbitMQ libraries are a pain and are not smart

Re:Why we ditched Django for Microservices by sandGorgon on Monday January 12, 2015 @10:51AM (#8874493)
actually this is a question that I have - how do you render the final output ?

I mean lets say I request a web page which depends on 5 microservices. What happens ? does rails or whatver block till all five have returned the output - or do you use something like ESI ... how are the microservices composed finally ?

Re:Why we ditched Django for Microservices by chrisvxd on Monday January 12, 2015 @03:03PM (#8876080)
Adopting a microservice architecture does nothing to define how you "render your output"- the devil is still in the details, but that is why a microservice is so interesting and flexible.

The way you will tackle this will largely depend on many questions like what services are safe to be exposed publicly, what services are dependant on other services, do you have a public API?

For example, you could have a public facing API on each service, or endpoints that render HTML templates. The services may or may not talk amongst themselves, either via the same public API, or a private one. If you make a request to one of the services, and that service needs to make a request to another service to generate the response, you've got to make a call on whether you want a blocking or non-blocking approach. Consider:

1) Blocking until the other services have responded

2) Pinging the server to check when it's done

3) Using web sockets

4) Whatever the hell else you can think of

Alternatively, you might want not want to expose your services publicly, and choose to have a single service that talks to the services on the clients behalf, a middleman. Your client speaks to this service, and the service sends of various requests to the other services. But the problem still stands. To block, or not to block?

AFAIK some big names like Amazon, Spotify, (Twitter?) have multiple public services. You may sometimes notice individual components on their [web] applications failing without bringing down the whole site, since the failures are isolated to the different services. Neat, huh?

Re:Why we ditched Django for Microservices by virmundi on Monday January 12, 2015 @11:02AM (#8874584)
One approach that makes sense in an enterprisy way is to use an ESB. BPEL can help here. Your ruby app calls the ESB on a service. Behind the scenes the ESB composes the calls efficiently into a final product for you. The enterprise system bus will aggregate the parts into a useable whole defined by your domain.

A benefit of this is that people get a unified view of the system. You can pull parts as needed. You can survive partial outages better than a monolithic app.

Of course you can still call each of the services independently. The ESB is just another tool in your box.

Re:Why we ditched Django for Microservices by valarauca1 on Monday January 12, 2015 @08:39AM (#8873777)
Upvoted.

Tried RabbitMQ, had huge issues that standard library barely functioning. Running direct code samples from support failed, finally supporting dev confessed, "I don't know java and the java guy is busy."

I was forced to move on.

Re:Why we ditched Django for Microservices by virmundi on Monday January 12, 2015 @07:50AM (#8873593)
This is not as terrifying as you might think. You can use this well for prototyping. You can make a simple endpoint fairly quickly in Go, Erlang, Clojure, Ruby. It could do some small task and pop out an answer. You can deploy this behind the wall of an named service.

If the service proves useful, you can migrate it to a more appropriate language. By appropriate, I mean a language that fits your companies culture. Java Shoppe? Java. C# Shoppe? F#.

You can also get a better match for the domain. For example Python has some great math libraries. They are easy to pickup, pleasant to use and reasonably performant. Say you need such features. Boom! Python service doing what it does best while the rest of your shop can use the tools that work well for the domain.

Re:Why we ditched Django for Microservices by Spearchucker on Monday January 12, 2015 @07:55AM (#8873611)
Micro-services force separation of concerns, theoretically making a system more maintainable. Micro-services do little for complexity though - they simply move complexity from a monolithic app to somewhere else and spread it out.
Re:Why we ditched Django for Microservices by endemic on Monday January 12, 2015 @08:57AM (#8873832)
Yeah, from my experiences with my current company, standard language/framework == good, one-off apps that now need to be maintained in production == bad.
Re:Why we ditched Django for Microservices by tmaly on Monday January 12, 2015 @07:55AM (#8873616)
what happens when those devs who chose some new language leave? Who gets stuck with all that code?
Re:Why we ditched Django for Microservices by Revell on Monday January 12, 2015 @08:01AM (#8873634)
That's a good reason to have shared responsibility of code. There is no one owner of a codebase, an entire team should own the code. An entire team leaving at once seems highly unlikely.
Re:Why we ditched Django for Microservices by davidw on Monday January 12, 2015 @09:31AM (#8874005)
Yeah, but that's harder when everyone knows Erlang, and one guy goes off and writes something with, say, Django for fun.
Re:Why we ditched Django for Microservices by Revell on Monday January 12, 2015 @11:25AM (#8874726)
But if someone goes "lone wolf" and writes an application in a language he or she chose without informing other members of the team/organisation something else might be going wrong in the chain.

I get the idea you're trying to convey here but in the case of a well-organised team/organisation that won't really fly as everyone will be involved at some point and choices are being made together.

Re:Why we ditched Django for Microservices by joevandyk on Monday January 12, 2015 @10:32AM (#8874350)
Pair programming comes in handy here.