News for hackers. Stuff that matters.
Re:What I Wish I Had Known Before Scaling Uber [video] by threeseed on Wednesday September 28, 2016 @04:58PM (#12601320)
I have no idea why people keep thinking microservices is all about scalability. Almost like they've never worked on a problem with them before.

Microservices is all about taking a big problem and breaking it down into smaller components, defining the contracts between the components (which an API is), testing the components in isolation and most importantly deploying and running the components independently.

It's the fact that you can make a change to say the ShippingService and provided that you maintain the same API contract with the rest of your app you can deploy it as frequently as you wish knowing full well that you won't break anything else.

It also aligns better with the trend towards smaller container based deployment methods.

Re:What I Wish I Had Known Before Scaling Uber [video] by yummyfajitas on Wednesday September 28, 2016 @05:46PM (#12601610)
You don't need to build a distributed system for that. Just build the ShippingServiceLibrary, let others import the jar file (or whatever) and maintain a stable interface.

I wrote about this a couple of years ago in more detail, so I'll just reference that: https://www.chrisstucchio.com/blog/2014/microservices_for_th...

HN discussion: https://news.ycombinator.com/item?id=8227721

Re:What I Wish I Had Known Before Scaling Uber [video] by threeseed on Wednesday September 28, 2016 @06:24PM (#12601832)
The point is that unless you use JVM hot reloading (not recommended in Production) you will need to take down your whole app to upgrade that JAR. Now what if your microservice was something minor like a black word filter. Is adding a swear word worthy of a potential outage ?
Re:What I Wish I Had Known Before Scaling Uber [video] by nine_k on Thursday September 29, 2016 @11:42AM (#12606126)
If you run multiple instances of your server and follow certain reasonable practices, you can take down old-version instances one by one and replace them with new-version instances, until you have upgraded the entire fleet.

Alternatively, you can deploy the new version to many machines, test it, then make your load balancer direct the new traffic to the new instances, until all old instances are idle, and then take down these.

Re:What I Wish I Had Known Before Scaling Uber [video] by benx on Monday October 03, 2016 @03:58AM (#12625948)
And in microservices you can just pick whatever stack you feel is the best for just that task
Re:What I Wish I Had Known Before Scaling Uber [video] by rer on Wednesday September 28, 2016 @06:45PM (#12601965)
Is hot reloading that big of a problem?
Re:What I Wish I Had Known Before Scaling Uber [video] by betenoire on Wednesday September 28, 2016 @11:59PM (#12603196)
not for everyone
Re:What I Wish I Had Known Before Scaling Uber [video] by duaneb on Thursday September 29, 2016 @01:24AM (#12603438)
You certainly can do that. A little discussed benefit (or curse) of a microservice is maintaining an API (as opposed to ABI). Changes are slower and people put more thought into the interface as a discrete concern. I am curious if an ideal team would work better with a lib--I think so, but I'm not sure!
Re:What I Wish I Had Known Before Scaling Uber [video] by andrewchambers on Wednesday September 28, 2016 @06:08PM (#12601736)
I think people don't maintain discipline if it isn't forced. So its a round about way of forcing people to maintain boundaries, that wouldn't be needed much of the time if people had stricter development practices.
Re:What I Wish I Had Known Before Scaling Uber [video] by threeseed on Wednesday September 28, 2016 @06:26PM (#12601847)
Exactly. Every single monolithic application I've seen has a utilities package that has classes shared amongst components.

With micro services you could have different versions of those utilities in use which would not be possible in a monolithic app.

Re:What I Wish I Had Known Before Scaling Uber [video] by dahauns on Wednesday September 28, 2016 @07:03PM (#12602053)
> With micro services you could have different versions of those utilities in use which would not be possible in a monolithic app.

You have no idea...:)

Re:What I Wish I Had Known Before Scaling Uber [video] by agentultra on Wednesday September 28, 2016 @05:13PM (#12601408)
> I have no idea why people keep thinking microservices is all about scalability.

It's an aspect. It's often the beginning of a micro-service migration story in talks I've heard.

> Microservices is all about taking a big problem and breaking it down into smaller components

... and putting the network between them. It's all well and good but the tradeoffs are not obvious there either. Most engineers I know who claim to be experts in distributed systems don't even know how to formally model their systems. This is manageable at a certain small scale as some computations take 35 or more steps to reveal themselves. But even the AWS team has realized that this architecture comes with the added burden of complex failure modes[0]. Obscenely complex failure modes that aren't detectable without formal models.

Even the presenter mentioned... why even HTTP? Why not a typed, serialized format on a robust message bus? Even then... race conditions in a highly distributed environment are terrible beasts.

[0] http://research.microsoft.com/en-us/um/people/lamport/tla/am...

You just have to know your data. The architecture comes after... and will change over time.

Re:What I Wish I Had Known Before Scaling Uber [video] by threeseed on Wednesday September 28, 2016 @05:28PM (#12601517)
You seem to be repeating these weird myths that have no basis in reality.

You don't need to be an expert in distributed systems to use microservices. It's literally replacing a function call with an RPC call. That's it. If you want to make tracing easier you tag the user request with an ID and pass it through your API calls or use something like Zipkin. But needing formal verification in order to test your architecture ? Bizarre. And I've worked on 2 of the world's top 5 ecommerce sites which both use microservices.

And HTTP is used for many reasons namely that it is easy to inspect over the wire, is fully supported by all firewalls and API gateways e.g. Apigee. And nothing is stopping you using a typed, serialized format over HTTP. Likewise nothing is stopping you using an message bus with a microservices architecture.

Re:What I Wish I Had Known Before Scaling Uber [video] by agentultra on Wednesday September 28, 2016 @08:46PM (#12602537)
> You seem to be repeating these weird myths that have no basis in reality.

No basis at all? I knew I was unhinged...

> You don't need to be an expert in distributed systems to use microservices.

True. Hooray for abstractions. You don't need to understand how the V8 engine allocates and garbage collects memory either... well until you do.

> It's literally replacing a function call with an RPC call.

You're not wrong.

Which is the point. Whether for architectural or performance reasons I think you need to understand your domain and model your data first. For domains that map really well to the microservice architecture you're not going to have many problems.

And a formal specification is overkill for many, many scenarios. That doesn't mean they're useless. They're just not useful, perhaps, for e-commerce sites.

But anywhere you have an RPC call that depends on external state, ordering, consensus... the point is that the tradeoffs are not always immediately apparent unless you know your data really well.

> And I've worked on 2 of the world's top 5 ecommerce sites which both use microservices.

And I've worked on public and private clouds! Cool.

The point was and still is the same whether performance or architecture... think about your data! The rest falls out from that.

Re:What I Wish I Had Known Before Scaling Uber [video] by vkou on Wednesday September 28, 2016 @06:45PM (#12601966)
> It's literally replacing a function call with an RPC call.

Until you want to make five function calls, in a transactional manner.

Architecting correct transaction semantics in a monolithic application is often much easier then doing so across five microservices.

Re:What I Wish I Had Known Before Scaling Uber [video] by tmd83 on Monday October 03, 2016 @01:48AM (#12625669)
Yeah, that absolutely didn't compute for me either. If it really was the case with no thoughts needed for transactions or correctness I would have started to split my monolithic apps years ago. Its when your data model is complex enough to make consistency/correctness difficult without transactions you have a real trouble splitting things up.
Re:What I Wish I Had Known Before Scaling Uber [video] by barrkel on Thursday September 29, 2016 @04:56PM (#12608707)
RPC vs PC means introduces a greatly increased probability of random failure. If you're trying to do something transactional, you're in a different world of pain.
Re:What I Wish I Had Known Before Scaling Uber [video] by sokoloff on Wednesday September 28, 2016 @05:37PM (#12601569)
> [Scalability i]s an aspect. It's often the beginning of a micro-service migration story in talks I've heard.

It absolutely helps with people and org scalability. I haven't seen it help with technical load scalability (assuming you were already doing monolithic development relatively "right"; we ran a >$1BB company for the overwhelming majority on a single SQL server).

Re:What I Wish I Had Known Before Scaling Uber [video] by marcosdumay on Wednesday September 28, 2016 @05:53PM (#12601651)
Because what you described is "encapsulation", and microservices is a very heavyweight and expensive way to get it.
Re:What I Wish I Had Known Before Scaling Uber [video] by rhizome on Wednesday September 28, 2016 @06:05PM (#12601721)
I wonder if there's any writing out there about the evolutionary hierarchy of refactoring, like:

code > function/method > module > class > ... > microservice

Re:What I Wish I Had Known Before Scaling Uber [video] by threeseed on Wednesday September 28, 2016 @06:27PM (#12601864)
Exactly. And we have decades of experience with monolithic apps where encapsulation is not adhered to.

So yes it is heavyweight. But it also works.

Re:What I Wish I Had Known Before Scaling Uber [video] by marcosdumay on Thursday September 29, 2016 @01:29PM (#12607120)
Well, granted. It will take decades for we to have decades of experience with microservices that break clear encapsulation.