News for hackers. Stuff that matters.
Re:Microservices? Please Don't by Retric on Tuesday December 13, 2016 @11:25AM (#13167984)
While breaking up a giant API is reasonable. Microservices are tiny, so you and the author may be talking about different things.

What % of your services consist of less than 100 lines of code? 1,000? 10,000?

PS: Nanoservices are often used as the negative extreme, but as Microservices have a rather fluid definition people are not always on the same page.

Re:Microservices? Please Don't by mabbo on Tuesday December 13, 2016 @11:41AM (#13168124)
The big advantage of microservices, imho, isn't that their code is small (though that can be true), it's that their domain is small. If it takes 100,000 lines to manage your user logins, then do so, but put it behind a simple API that the rest of the company can use.

Now you've freed yourself doubly- everyone else can just trust that logins work, and the team focusing on logins can focus on just that one thing.

Re:Microservices? Please Don't by awj on Tuesday December 13, 2016 @12:32PM (#13168632)
If it takes 100k LOC to manage your user logins, I doubt you can really put it behind a "simple" API. You're still going to have intricate details that everyone needs to know, but now you're adding all of the issues of networked communication and (often) allowing teams to use different languages/stacks/etc which prohibit inspection to understand the system they're calling.
Re:Microservices? Please Don't by mabbo on Tuesday December 13, 2016 @07:05PM (#13172585)
So break that logic up into smaller services yet, again splitting up the domain into smaller pieces. No one said a microservice can't call another microservice!

Logins are a bad example because it really shouldn't take 100k lines to handle it, but replace 'logins' with any business domain logic that you need.

And honestly, the biggest challenge often is building the simplest API possible without limiting your clients.

Re:Microservices? Please Don't by Retric on Tuesday December 13, 2016 @12:06PM (#13168367)
The problem is if you need 100,000 lines of code for your login you can probably break that up. EX: Employee login vs. contractor login.

So, where you might think microservices others may be thinking of your monolithic login service.

Re:Microservices? Please Don't by Jtsummers on Tuesday December 13, 2016 @12:19PM (#13168502)
Perhaps the focus should be on how people interact with the services.

If everyone interacts with the login service through the same interfaces, then they don't need to know how it breaks out internally or care.

If, however, you use it through one set of API features, and I use it through another very disconnected set, then perhaps it's time to break it down further.

At the end of the day, though, what does it contain? A list of users, their roles, and access control mechanisms. Does it make sense to have unified logins or multiple sets of logins across your company's services? If the latter, break it down to be run once per other application with specialised selection of features per application. If the former, let the login team handle control of the system and leave it a 100k monolith or break it down as they see fit.

Re:Microservices? Please Don't by falcolas on Tuesday December 13, 2016 @11:59AM (#13168315)
Each 100 LOC nanoservice is frequently backed by a 1,000+ LOC framework, so you're not really saving that much on code.