These are chat archives for jdubray/sam

23rd
Oct 2017
Jean-Jacques Dubray
@jdubray
Oct 23 2017 02:31
@pfurini In the end I agree, you have to use the right tool for the job, but as point in the article you reference, developer productivity is a major component of the equation. For me, Node brings isomorphism (which was tried the other way around with GWT).
This is my reference application architecture, this is why I think Javascript is so important
image.png
JavaScript makes isomorphism possible which I believe is key to two important considerations:
  • consistency
  • scalability
Jean-Jacques Dubray
@jdubray
Oct 23 2017 02:38
Consistency is where the rubber meets the road in application architecture and pretty much everyone I have worked with or know of, has never considered "consistency" even a question. It looks like Uber is doing some great work on that front
(disclosure, I was invited expert at the W3C on the WS-CDL working group)
On the scalability question, how could you even consider scaling something if you cannot articulate building blocks that can be scales independently.
JavaScript + Node + SAM gave me something I only dreamed of in the past 20 years.
Jean-Jacques Dubray
@jdubray
Oct 23 2017 06:10
That probably will end the Java / Javascript debate (if true): http://kernelless.cloud/tryit.html
The same goes for golang, or .net core, or pretty much every mainstream server side tech
And most of the time they are more efficient than node itself in running ecmascript code
So isomorphic client code is achievable and even more efficient with whatever tech you choose
Paolo Furini
@pfurini
Oct 23 2017 07:05
Then speaking of distributed architecture, take a look at kontena. With it and a reference micro service architecture, like the one vert.x gives me OOB, I'm able to implement infinite scalable solutions without sticking with a single provider like AWS. I can simply put my nodes wherever I like in the globe, and create virtual distributed networks
My point is that most of the time node is pictured like an unique and magic runtime, but in the end it's only a reactor pattern runtime, with more weaknesses than strengths (but it's only me, and as pointed in the article, if you or your team are comfortable with it, the stick with it πŸ‘)
Jean-Jacques Dubray
@jdubray
Oct 23 2017 07:15

My point is that most of the time node is pictured like an unique and magic runtime, but in the end it's only a reactor pattern runtime, with more weaknesses than strengths

I don't disagree with you. It's just this stack works for me. Nothing seems hard to achieve (up to the 1k - 10kTPS range), but perhaps I have not worked on "things that are hard to achieve".

Paolo Furini
@pfurini
Oct 23 2017 07:51
The right tech is the one that works for you.. ;)
But 1k-10k TPS is achievable with every stack I mentioned: on the JVM, with the right tools (in that case I think I'll never go for Spring, but vert.x is a good choice), with Golang, well, it happens to be somewhat 10x faster than node, so... I mentioned that two, because they give from the start the right and tested tools for vertical and horizontal scalability, without the need to re-invent the weel
Paolo Furini
@pfurini
Oct 23 2017 08:04
BTW, WS-CDL is great way to solve orchestration and coordination problems in a micro services architecture.. I've always struggled with this, and the solutions out there seems to be all "home-made" ones, with a lack of standardizations
Paolo Furini
@pfurini
Oct 23 2017 08:10
This is the architecture that aligns best with my own vision on the matter, for the JVM world: http://eventuate.io
but TBH I only experimented with it, and never built something serious on that.. but at the end the catch is that an event-driven orchestration is the way to go
Jean-Jacques Dubray
@jdubray
Oct 23 2017 10:22

but at the end the catch is that an event-driven orchestration is the way to go

I'll beg to disagree. That does not scale (in scope), you can use the SAM pattern for that (since it is stateful) https://www.ebpml.org/blog15/2015/06/designing-a-reliable-api-call-component-with-sam/
https://www.ebpml.org/blog2/media/blogs/CarnetsdeBord/reliable-api-call.png?mtime=1446959651

You can use SAM either as a central coordinator, or as a event handler (I was the lead editor of ebXML Business Process, which was the precursor to WS-CDL). You cannot underestimate the difficulty in managing long running state. Talking about "events" is like talking about a car from a wheel perspective without ever mentioning you need an engine too.

You will notice that every type of solution is not STAR-complete. For instance an "event-based orchestration" is "state-based" since an event is the occurence of a state, but there is no "action", so you will constantly have to add semantics to map events to actions, that is killing productivity and error prone.
(eventual) consistency is the deal breaker for me, if you don't have a reasonable way to achieve consistency, your back-end implementation will fail, one way or another, sooner or later.
Paolo Furini
@pfurini
Oct 23 2017 10:43
I admit I haven't explored this too much.. I'd like to see a reference implementation of services orchestration, like the one presented in the Uber presentation. I'm the kind of person that wants to get the hands "dirty" in something, because β€œIn theory, theory and practice are the same. In practice, they are not.”
Jean-Jacques Dubray
@jdubray
Oct 23 2017 11:02
I have 20 years of hands-on trial and error experience in that field, so I can make a comment or two. I have also tried to talk to the "event-driven-architecture" camp, well, let's say that some people have made a great business at selling a vision that can be achieved in minimum 10 years (bounded context). The reality is that you cannot build an application architecture without a STAR foundation. That has been tried over and over. You either endup in the vertical slice architecture (duplicating your business logic over and over, in slices), or you enter consistency hell. Events will give you zero value in each case. They sound nice, decoupling, and whatever, but they bring nearly zero value in achieving consistency (they only help you with persistence).
Paolo Furini
@pfurini
Oct 23 2017 11:45
STAR is a good pattern, but I'd like to see the big picture, that is how to add orchestration with consistency in mind, using WS-CDL for example.. it seems a field where theory beats practice, at least for my limited experience/vision
Paolo Furini
@pfurini
Oct 23 2017 11:51
I don't mean that nobody has developed robust and scalable solutions on top of these smart ideas (like you or Uber for example), but from my POV a technology becomes really mainstream only when we develop a strong culture around it, reaching the majority of audiences (read: outside research papers, or bird's eye view videos)
Jean-Jacques Dubray
@jdubray
Oct 23 2017 12:08
STAR is just a conceptual foundation, it provides some basic structure to programming models, something equivalent to the M3 level of UMF (aka MOF), it just tells you that something is missing or on the other hand it's STAR complete, it does not impose any particular semantics to how you define State, Type, Action and Relation.

when we develop a strong culture around it

This can only happen when there is enough insight to recognize what's broken and what's not. There is just too my hype and not enough thinking in the software industry.

Paolo Furini
@pfurini
Oct 23 2017 18:42

it does not impose any particular semantics to how you define State, Type, Action and Relation.

that's the main problem though.. we NEED to impose something at some point, and give it an altisonant name, and make that kind of artificial hype that is needed today to capture the attention

I've seen a lot of home baked solutions/framework, presented in such a way that leaves you with (more or less) this impression: this must be GREAT, see the effort they put on presenting it!
Paolo Furini
@pfurini
Oct 23 2017 18:47
the average lead architect NEEDS a reference implementation of some sort, he/she needs to be be guided from point A to Z, otherwise will look elsewhere (even if elsewhere means something with strong fallacies, but with good hype/reputation)
so in the end: if someone tells me, STAR is THE programming model, yes, and I recognize the need of proper consistency! Well, the next question will be: can you point me to a complete reference solution that solves all of these challenges? ...
Paolo Furini
@pfurini
Oct 23 2017 18:54
whatever language, does not matter, but that's the point.. I can sell a car before producing it, but at some point I need to deliver my orders ;)
Jean-Jacques Dubray
@jdubray
Oct 23 2017 23:06
SAM is one possible programming model, STAR is the conceptual foundation. You still need explain why a programming model is better than another, otherwise how can you even start addressing questions like "what is an action?" "Why in our industry we have five definition of what an action is?"
So there is a first level that is the common foundation to all computing, I claim that this is something like STAR, then from there once you agree on the foundation, then you can derive a programming model. I don't believe there is one single programming model that works for everything. Just like you can study Optics in physics without ever thinking about the other fundamental aspects of physics (Light, Matter, Energy, Force).
Jean-Jacques Dubray
@jdubray
Oct 23 2017 23:13
The problem in software engineering is that we think we can do everything with Types and Actions, no need to think about State and even Relation. We reify State and Relation as property of a Type. Just like in Optics you reify Matter as a transmission medium with the dielectric constant. In Optics there is no consideration for Energy or Forces. It's not wrong if you know what you are doing. You can do interesting things, but these things will be limited. The problem in software engineering is that we claim we can do everything with Actions and Types. FP starts from the point of view of Actions. OOP starts from the point of view of Types, but they are exactly dual.
once you have a programming model, then you can decide if you want to create a language, but that's secondary. Do you really need Elm to implement an RFP programming model? obviously no. Most languages take off from the problems they try to solve (Java, PHP, Go, Kotlyn...) not from their syntax or even programming model.
Jean-Jacques Dubray
@jdubray
Oct 23 2017 23:29
Just like in Physics there are many ways Light, Matter, Forces and Energy relate to each other and are combined to explain and predict some phenomena, the same thing is true for STAR to help us solve problems in the most efficient way, and it starts with programming model. If someone comes with a new programming model we should have a way to predict what kind of things we can do with it. It shouldn't be left to hype or the number of followers you can rake.