News for hackers. Stuff that matters.
Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Thursday March 02, 2023 @08:32AM (#34995420)
Genuine ignorant question: is this a language problem or a coding problem? I'm thinking of "sending a message" as a synchronous function call. Could you not code in a style that passes messages around?
Re:Don't let Event-Driven Architecture buzzwords fool you by motoboi on Thursday March 02, 2023 @11:16AM (#34997637)
Message passing has no response.

You can simulate request-response with it, using a channel to go one way and another the other way, but it can get pretty convoluted.

Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Thursday March 02, 2023 @11:29AM (#34997892)
Understood, but could you not do this by coding style? I.e. calling a method returns void?
Re:Don't let Event-Driven Architecture buzzwords fool you by namaria on Thursday March 02, 2023 @02:58PM (#35001099)
Whether something is already implemented in a language's core library, or a package you can use, or you build your own library, is immaterial. You can implement any patter with any turing complete language, and you can build your own language.
Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Friday March 03, 2023 @02:19AM (#35006772)
That's true, but I'm not really talking about that.
Re:Don't let Event-Driven Architecture buzzwords fool you by namaria on Friday March 03, 2023 @04:20AM (#35007467)
Correct me if I'm wrong, but you asked if message passing rests on language facilities or code style. Answer is neither. You can implement message passing patterns in Forth, in C, in Python, or you can use Erlang or Smalltalk and get it out of the box.
Re:Don't let Event-Driven Architecture buzzwords fool you by robertlagrant on Sunday March 05, 2023 @04:06AM (#35028046)
I wasn't making it exclusive. I think the answer is either, not neither.

The thing I wasn't asking was "can I implement a language that can do this in Java?" which is why I don't think the Turing completeness comment is particularly relevant.

Re:Don't let Event-Driven Architecture buzzwords fool you by namaria on Monday March 06, 2023 @02:24AM (#35038362)
Depends on neither is the same as 'you can do with either'. Just different ways to express the same answer.
Re:Don't let Event-Driven Architecture buzzwords fool you by st4lz on Friday March 03, 2023 @08:36AM (#35009390)
That's exactly what they want to avoid.

The true goal of event-driven is the separation of concenrns, so you don't call `execute_payment`, `send_confirmation_email`, `include_in_report_dashboard` etc inside a `complete_order`.

Instead, you emit "order_issued" event and all subscribers can act based on the event, completely unknown from `complete_order`.

At least that is how I understand it.