Live data from Hacker News

Some thoughts on microservices

filipnikolovski.com

121–130 of 139 posts

Re: Some thoughts on microservices

#121
post #87

Earlier quoted context omitted.

I'd be more worried with, "do you just have shared infrastructure for all data?" Hearing some places just have one giant database where all teams can add and remove columns is... Kind of scary to me.

Assuming people will need reports that cut across team/microservice boundaries, all that data has to end up in one common place, possibly a data warehouse. At which point, other teams can still add and remove columns and break your reports. Is there another way to do things?

Well, a data warehouse is one thing. I have heard of them just having a single live database that everyone hits. For all uses.

Edit: in contrast, I don't want anything about a user, except their id in a table for most features. Hearing of free for all's on data makes me question how they protect payment or just general private data.

Re: Some thoughts on microservices

#122
post #119

Earlier quoted context omitted.

> With a library. I don't know what that library is right now. Meanwhile I could set up the separate repos/microservices by the end of the day. > That sounds like you need at most two different services, not microservices It is unfortunate that the "micro" in "microservice" is often misunderstood to expect that these are very small and granular components. In practice by and large it ends up being separate services w…

> I don't know what that library is right now Are you serious? In which language do you program that you don't have to use multiple libraries daily? You just talked about NPM. In your example, the C# could output DLLs that have functions that can be called by the Java code. This can give the same encapsulation you get with your multiple services example, including separate deployments, different repo, different langu…

> Are you serious? In which language do you program that you don't have to use multiple libraries daily?

I said I don't know which library would let me make C# method calls from a Java Spring runtime, presumably in the same process. Do you? Feel free to share a link.

> That's because someone set it up for you, not because it's faster.

Yes, the whole point was to come up with a concrete example for the sake of argument, and see how we can accomplish it in practice. We're not writing academic papers here, the fact that this functionality is widely available is a good thing.

> It's not, you're using the term loosely

Yes, me and 95% of the industry. Again, it's unfortunate but here we are.

Re: Some thoughts on microservices

#123
post #119

Earlier quoted context omitted.

> I don't know what that library is right now Are you serious? In which language do you program that you don't have to use multiple libraries daily? You just talked about NPM. In your example, the C# could output DLLs that have functions that can be called by the Java code. This can give the same encapsulation you get with your multiple services example, including separate deployments, different repo, different langu…

> Are you serious? In which language do you program that you don't have to use multiple libraries daily? I said I don't know which library would let me make C# method calls from a Java Spring runtime, presumably in the same process. Do you? Feel free to share a link. > That's because someone set it up for you, not because it's faster. Yes, the whole point was to come up with a concrete example for the sake of argumen…

> I said I don't know which library would let me make C# method calls from a Java Spring runtime, presumably in the same process. Do you? Feel free to share a link.

You don't need a library for that, it's is part of the language. Java can call code from native libraries, C# can export native functions. It can also be another process. [1]

> Yes, the whole point was to come up with a concrete example for the sake of argument, and see how we can accomplish it in practice. We're not writing academic papers here, the fact that this functionality is widely available is a good thing.

The problem is that you moved the goalposts. "I need to interoperate with C# code" is very different from "I need to interoperate with C# code and my company uses microservices and that's the only thing I know".

You can't claim something is automatically worse just because you're ignorant about it.

> Yes, me and 95% of the industry. Again, it's unfortunate but here we are.

Nope. There are exactly zero companies claiming to use microservices when they have exact two services. And it's not about size, by the way, it's about different architectural patterns.

[1] https://www.baeldung.com/jni

Re: Some thoughts on microservices

#124
post #101

My thoughts on microservices... They're fine. But what's NOT fine are nano services. I did security on a project once where it seemed that every function was its own microservice. User registration, user login, and password resetting were each a separate microservice. It was an utter nightmare.

Reminds me of this classic: https://www.youtube.com/watch?v=y8OnoxKotPQ

How have I not seen this channel before?

I'm realizing that the YouTube algorithm has no idea I'm a software/security engineer. It thinks I'm only into gaming, face plants, and dash cam videos.

Re: Some thoughts on microservices

#125
post #123

Earlier quoted context omitted.

> Are you serious? In which language do you program that you don't have to use multiple libraries daily? I said I don't know which library would let me make C# method calls from a Java Spring runtime, presumably in the same process. Do you? Feel free to share a link. > That's because someone set it up for you, not because it's faster. Yes, the whole point was to come up with a concrete example for the sake of argumen…

> I said I don't know which library would let me make C# method calls from a Java Spring runtime, presumably in the same process. Do you? Feel free to share a link. You don't need a library for that, it's is part of the language. Java can call code from native libraries, C# can export native functions. It can also be another process. [1] > Yes, the whole point was to come up with a concrete example for the sake of ar…

> You don't need a library for that, it's is part of the language. Java can call code from native libraries, C# can export native functions. It can also be another process.

Having never done this, I believe you. I am still skeptical of how quickly/effectively you could set up a CI/CD system and the module repos to deploy to a monolith. I wonder how the type interop works there (equivalent of OpenAPI-based code generation).

> The problem is that you moved the goalposts. "I need to interoperate with C# code" is very different from "I need to interoperate with C# code and my company uses microservices and that's the only thing I know".

That's maybe a bit unfair. There are a lot of microservice shops, but I haven't heard many who do this Franken-monolith thing. Remember that infamous microservice dependency graph from Uber? I guess Facebook was famous for doing a monolith but I don't know if it was purely PHP or not.

> You can't claim something is automatically worse just because you're ignorant about it.

I can if the metric is availability/familiarity in the industry, but OK.

> Nope. There are exactly zero companies claiming to use microservices when they have exact two services. And it's not about size, by the way, it's about different architectural patterns.

I don't know, my experience is people like to say they use microservices but they just have a service-oriented architecture. Meanwhile I never ran across an organization that does something like npm modules and goes way crazy with granular services. I don't know, maybe they are out there.

Re: Some thoughts on microservices

#126
post #123

Earlier quoted context omitted.

> I said I don't know which library would let me make C# method calls from a Java Spring runtime, presumably in the same process. Do you? Feel free to share a link. You don't need a library for that, it's is part of the language. Java can call code from native libraries, C# can export native functions. It can also be another process. [1] > Yes, the whole point was to come up with a concrete example for the sake of ar…

> You don't need a library for that, it's is part of the language. Java can call code from native libraries, C# can export native functions. It can also be another process. Having never done this, I believe you. I am still skeptical of how quickly/effectively you could set up a CI/CD system and the module repos to deploy to a monolith. I wonder how the type interop works there (equivalent of OpenAPI-based code genera…

> That's maybe a bit unfair. There are a lot of microservice shops, but I haven't heard many who do this Franken-monolith thing. Remember that infamous microservice dependency graph from Uber? I guess Facebook was famous for doing a monolith but I don't know if it was purely PHP or not.

Your original example was that you "needed to let a remote team add some functionality to my, say, Spring backend but they really prefer to write C# and have their own CI/CD system". I am telling you the classical way of solving this problem. You don't get to change the constraints ("I already know how to setup X") after an answer just to say the answer is wrong/worse and expect not to be called out on it...

Also: It's not a Franken-monolith, dude... it's just a library. Have you ever used ImageMagick to resize images from your microservices? Maybe made a request using libcurl? Maybe had to use a SQL driver that was native, maybe Redis? A NPM package with native code? That's exactly the same thing... I literally don't know of a single language that doesn't use those things...

Plus, there is a HUGE difference between what you asked and a Uber/Facebook scenario. You seem to be under the impression that what I'm suggesting is a replacement for real microservices. No, it is simply a solution for the problem you described.

You described a problem and said you don't know how to solve other than with X. I'm giving you Y. I don't understand what's the issue here.

> I can if the metric is availability/familiarity in the industry, but OK.

Sure, but you can't use yourself as a benchmark for the industry if you're that unfamiliar with something that basic.

> I don't know, my experience is people like to say they use microservices but they just have a service-oriented architecture. Meanwhile I never ran across an organization that does something like npm modules and goes way crazy with granular services. I don't know, maybe they are out there.

Again, there is a humongous difference between "we're doing microservices" or even "we have a service oriented architecture" and your "I need two things to interoperate".

Re: Some thoughts on microservices

#127
post #93
post #89

Earlier quoted context omitted.

I could maybe see that for some specialized case, but for the general case it seems like the more independent, distributed things you're juggling, the more likely you are to end up with security holes in the first place. The time you have to spend on security would have to be spread too broad and thin.

The cost varies. Some of the code I work with is safety critical - people can die if it isn't working. If someone breaks into our system and gets private data that "only" costs us a lot of money, but if they break into our system and take over the safety critical parts people die.

I see, yeah sounds like "control plane" vs "data plane", which is a good place to split things.

Re: Some thoughts on microservices

#128
post #115

Microservices are not a solution, they're a capability. It's powerful for a team to be able to deploy a tiny service with the absolute minimum amount of explicit plumbing to meet operational requirements. Whether they should break their system up this way is a case by case judgment. Every place I've been, the costs of microservices get overlooked in favor of the illusion of decoupling. Microservices will absolutely m…

> Microservices, as a philosophy, is encoding your org design at the networking layer. Not always. One of the things where I desperately wish people would adopt the "microservices philosophy" is in applications which provide a scripting language. For example, if I want to "script" OpenOffice, I am stuck with the exact incarnation of Python shipped with OpenOffice. Nothing newer; nothing older; exactly binary compatib…

What you're wishing for is usually called an API. It allows third-party applications to interface programmatically.

Re: Some thoughts on microservices

#129
post #126

Earlier quoted context omitted.

> You don't need a library for that, it's is part of the language. Java can call code from native libraries, C# can export native functions. It can also be another process. Having never done this, I believe you. I am still skeptical of how quickly/effectively you could set up a CI/CD system and the module repos to deploy to a monolith. I wonder how the type interop works there (equivalent of OpenAPI-based code genera…

> That's maybe a bit unfair. There are a lot of microservice shops, but I haven't heard many who do this Franken-monolith thing. Remember that infamous microservice dependency graph from Uber? I guess Facebook was famous for doing a monolith but I don't know if it was purely PHP or not. Your original example was that you "needed to let a remote team add some functionality to my, say, Spring backend but they really pr…

> You don't get to change the constraints ("I already know how to setup X") after an answer just to say the answer is wrong/worse and expect not to be called out on it...

I don't see it as being called out, it's a constructive discussion. The purpose of my example is to see how practical it would be for me to set up a monolith-based CI/CD that could support multi-lingual, multi-repo teams. I have a better idea now, maybe have them publish to a local Maven style server, and kick off a monolith build when there is a new library version? The monolith can then bind them together and rebuild. I'm not sure how the host interfaces would get regenerated still.

Good examples re: libcurl, ImageMagick, etc. How would we deal with very frequent changes there? I know that upgrading a SQL driver is not a task we take lightly, and I would love to see how we could make this easy to do on a daily or hourly basis. Mainly we'd need auto-generated strong types somewhere on the interface, again, like OpenAPI but for libraries.

> You seem to be under the impression that what I'm suggesting is a replacement for real microservices.

This discussion started with several suggestions that monoliths could do just as well as most microservice setups, and I wanted to do an exercise to see how practical this would be.

> I don't understand what's the issue here.

There is no issue. Who said there is an issue? So far so good.

> Sure, but you can't use yourself as a benchmark for the industry if you're that unfamiliar with something that basic.

I know and/or interview enough people across the web-dev and game-dev industry that I feel I have a sizable sample of data points to form an opinion that is not purely a guess of a single person.

> Again, there is a humongous difference between "we're doing microservices" or even "we have a service oriented architecture" and your "I need two things to interoperate".

Sure. The two things example was just a distilled example for the purpose of a thought experiment. We can easily extrapolate to an org with tens of services where maybe most people like to use the default environment like Java/Spring but a few teams maybe prefer or their use case calls for something different like Python or C# or whatever. If anything it would be even more difficult to stand up a monolith there with more and more varied components.

Re: Some thoughts on microservices

#130
post #81

Yet another “based on my experience” opinion. Based on my experience our service would fail due to performance because we’ll , nodejs is still single thread. Given this we should either duplicate deployment of big service by roles that gives you same level of orchestrating complexity or rewrite in different languages, means hello microservices again :) ps our product was initially written by non tech cofounders that…

Node can run multi-process with the Cluster module. Node being written as a monolith but running it in 100 instances is also an option. Roles can be implemented in software. There's much less "orchestrating complexity" when you're deploying a single service. So Node being single-threaded is not itself a reason to use microservices. I tend toward writing a monolith for the core API of a service, but then break out mic…

If you deploy same binary under different roles, it's same issue with complexity.

With modern tooling deployment and managed storages is not a problem at all you use templates or buildbacks or even lambda combined with gitlab github CI abilities. Recent progress allows you to embrace zero-ops and microservices. In my team we don't have a dedicated ops person, and deployment from dev to prod is running via git by developer.

Node itself has a very bad profiling tooling compares to more "adult" languages. if you run a microservice it's much easier to spot a problem in CPU or especially memory leak. And vise versa if you doing something in scala, or java, microservices benefits are minor. It's also so much easier later to rewrite some of the services in a more performant language.

Post reply on HN