News for hackers. Stuff that matters.
Re:Give me back my monolith (2019) by a4isms on Tuesday May 10, 2022 @01:17PM (#31329652)
> Fundamentally, microservices allow you to isolate state. I can take two services and split them up - and now I've split their state spaces. I can put a queue service between them and now I've sliced out the state of their communication.

Dr. Alan Kay would like a word. This is literally the premise behind OO:

> "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things."—Dr. Alan Kay

Outside of "extreme late-binding," which is a fascinating topic in its own right, isolating state is exactly the point of OOP. If we need microservices to accomplish isolation of state, that suggests we got OOP wrong, very wrong.

Re:Give me back my monolith (2019) by staticassertion on Tuesday May 10, 2022 @03:02PM (#31331156)
I'm extremely aware of Alan Kay's statement, as well as the foundations of the actor model. The reality is that today that is not what OOP has become, and Alan Kay would agree.

> that suggests we got OOP wrong, very wrong.

Alan Kay very clearly states that people "got it wrong" and that OOP was supposed to be about messaging. ie: He intended for it to be one thing, but it isn't that thing.

> I'm sorry that I long ago coined the term "objects" for this topic because it gets many people to focus on the lesser idea. The big idea is "messaging"

> The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. [..]

http://wiki.c2.com/?AlanKayOnMessaging

https://computinged.wordpress.com/2010/09/11/moti-asks-objec...

Re:Give me back my monolith (2019) by geoffjentry on Tuesday May 10, 2022 @04:25PM (#31332201)
> and that OOP was supposed to be about messaging

I agree that these are Kay's thoughts and also agree with his take on what it should be. But I think the reality is more complicated than it simply being something that evolved away from his grand dream. It's more that there was a soup of ideas floating around during that time that came together as OOP and the combination that became dominant was something else. For instance Simula was already using inheritance prior to Kay's message passing proposal.

Re:Give me back my monolith (2019) by staticassertion on Tuesday May 10, 2022 @04:35PM (#31332329)
I can agree with all of that, I wasn't trying to imply otherwise, more just explaining that stating that OOP means what Kay wanted it to mean is ignoring history, consensus, and Kay himself.
Re:Give me back my monolith (2019) by a4isms on Tuesday May 10, 2022 @05:10PM (#31332781)
I’m very aware that we evolved things Kay may not have intended, and that doesn’t make it wrong.

He may have coined the term, but he doesn’t own it, nor should we feel beholden to his vision dating back to 1972.

What I said was if the primary reason for micro services is hiding of state, then we got OO wrong, because OO, even the much maligned J2EE style of OO, can do that for us if we want hiding of state and message passing.

Another possibility is that microservices do much more for us than hiding of state and limiting communication to message-passing.

At my 9-5, we use Elixir to write our services and have a few Actor-based Scala services too, so my feeling is that we actually are doing OO fine, and that there’s something else that makes microservices compelling at scale.

Re:Give me back my monolith (2019) by staticassertion on Tuesday May 10, 2022 @05:24PM (#31332932)
What you said was that Kay would disagree, and that we must have gotten OO wrong otherwise. Kay wouldn't disagree and Kay would say we got OO wrong.
Re:Give me back my monolith (2019) by a4isms on Tuesday May 10, 2022 @05:42PM (#31333108)
What I said was:

> If we need microservices to accomplish isolation of state, that suggests we got OOP wrong, very wrong.

That’s the last sentence, which summarizes my point.

As for Dr. Kay, his exact words were saying that to him at the time OO was certain concepts and nothing more.

I have never interpreted that to mean that languages or systems that do more than hiding state and message passing are wrong, just that if we say something like “OO requires inheritance,” he would disagree with our definition of OO.

After all… Smalltalk itself has a lot more than hiding of state and message passing. Would anyone claim that Dr. Alan Kay would say Dr. Alan Kay was doing OO wrong?

I think there are good reasons to design microservice architectures, but if the argument is “Let’s break up our monolith so we can hide state,” I’d say that we can go ahead and just use our existing OO tools to achieve that.

Re:Give me back my monolith (2019) by geoffjentry on Tuesday May 10, 2022 @02:25PM (#31330606)
> that suggests we got OOP wrong, very wrong.

It does, but that's because there are different flavors of OOP. Alan Kay's original take on OO was closer to the actor model than what grew into the mainstream spin on OOP with inheritance and the rest.

If you take 10 steps back and squint, microservices & the actor model start to look pretty similar.

Re:Give me back my monolith (2019) by dimitrios1 on Tuesday May 10, 2022 @04:20PM (#31332151)
So more like Erlang/OTP rather than Spring Boot Microservices?
Re:Give me back my monolith (2019) by jimbokun on Tuesday May 10, 2022 @03:27PM (#31331482)
> If we need microservices to accomplish isolation of state, that suggests we got OOP wrong, very wrong.

I don't think there's any question about that.

The only language that really seems to get this right is Erlang (and Elixir).

And I suppose Smalltalk, but I don't think even Smalltalk takes it as far as the Erlang VM.

Re:Give me back my monolith (2019) by seti0Cha on Tuesday May 10, 2022 @01:45PM (#31330018)
Arguably, we did. In large codebases worked on by multiple teams it's not unusual to see teams drilling holes in OO walls because they "just want to get their work done" and view the abstractions as barriers. Taken along with the unfortunate fact that the majority of engineers suck at decomposing things into objects and the result is people preferring to move stuff out of process to keep the code simple and make the encapsulation more effective. I don't really think that's a good thing, but that's been my observation.
Re:Give me back my monolith (2019) by a4isms on Tuesday May 10, 2022 @02:25PM (#31330598)
Erlang/Elixir feels like it strikes a middle ground, where every process behaves like one of Kay's objects, including the emphasis on message-passing rather than methods that behave like procedure calls.
Re:Give me back my monolith (2019) by pixl97 on Tuesday May 10, 2022 @01:36PM (#31329893)
Then I'll have to say that most get OOP very wrong, for example any time an application crashes for any reason.
Re:Give me back my monolith (2019) by mbrodersen on Wednesday May 11, 2022 @11:24PM (#31348939)
The Erlang programming language is AFAIK the only programming language used in production that does what Alan Kay is talking about. So it is probably the only Object Oriented programming language used in production today.
Re:Give me back my monolith (2019) by arunix on Wednesday May 11, 2022 @07:04AM (#31338215)
What did he mean by "extreme late-binding of all things"?
Re:Give me back my monolith (2019) by lolinder on Wednesday May 11, 2022 @08:31AM (#31338959)
Re:Give me back my monolith (2019) by arunix on Wednesday May 11, 2022 @09:11AM (#31339436)
That seems to be equating it with message passing, but messaging is already the first item mentioned by Alan (messaging, local retention ...) so I thought it might mean something else.