Live data from Hacker News

The Way We Are Building Event-Driven Applications Is Misguided

gillesbarbier.medium.com

51–60 of 71 posts

Re: The Way We Are Building Event-Driven Applications Is Misguided

#51

Hmmm. I think this is interesting, but I’m not sure this is an “architecture”. A workflow or “orchestrator” as defined in this article looks like another service. Unless I’m missing something, it’s a state-machine where inputs/variables are the events of other services, and where transitions trigger “commands”. Don’t get me wrong, I see the value in pulling this logic into a central place/process in order to perform…

This 'orchestrator' pattern merely re-introduces tight-coupling via a one-way async interface. The producer writes commands destined for the executor of the command. It's basically async RPC with transparent host lookup and no return values.

I'm not saying it doesn't have its uses, but be wary of tight coupling. If you see development patterns like first updating the consumer to enable a change to a command, then releasing the upstream change to use the new capability, you'll know that you're not working with a decoupled system. Another likely red-flag is never documenting payload structures, so that behaviour is fully implementation-defined async-spaghetti.

Re: The Way We Are Building Event-Driven Applications Is Misguided

#52
post #45

Earlier quoted context omitted.

> it is totally valid to use orchestration and choreography. Same as Confluent pushes the case to use choreography, this post pushes to just use orchestration. What's the metaphor here? As far as I can see, orchestration is about coordinating the timing of several simultaneous and interdependent musical performances, while choreography is about coordinating the timing of several simultaneous and interdependent dance…

Orchestration needs an orchestrator, choreography does not.

Huh? If you don't have a choreographer, you don't have choreography. You have improvisation instead.

Re: The Way We Are Building Event-Driven Applications Is Misguided

#53
post #4

Earlier quoted context omitted.

Shame it’s on Medium, so I immediately get a paywall / ad, and don’t end up reading your post.

Can you access through this url? https://gillesbarbier.medium.com/the-way-we-are-building-eve...

You should publish on your own blog, and syndicate to other places (Medium, substack, hackernoon, etc).

This is better than:

a) Publishing only on your own blog

b) Publishing only on the most popular site.

After all, your goal is to spread your message as far as possible. Single-site publications don't make sense in that context.

Re: The Way We Are Building Event-Driven Applications Is Misguided

#54
post #23

Be aware of marketing blog posts like this (looking at you Confluent, Databricks and Camunda!). Another "forget this style, only use our new framework". What he forgets to mention, and what is probably not in the scope of "our new framework that does everything better", is that it is totally valid to use orchestration and choreography. Same as Confluent pushes the case to use choreography, this post pushes to just us…

Is medium-driven development an antipattern?

Re: The Way We Are Building Event-Driven Applications Is Misguided

#55
post #36

Earlier quoted context omitted.

Any code you didn't write today is legacy code!

> Any code you didn't write today is legacy code! Any code you didn't write is legacy code!

I worked with somebody whose brain just didn't brain with mine. anything she wrote was unreadable to me, and anything I wrote was not "simple" or "understandable" enough.

Re: The Way We Are Building Event-Driven Applications Is Misguided

#56
Here are a couple of talks about orchestration and choreography, workflows vs sagas, etc.

Both very technical, both with very little "sell" despite being given by a Camunda co-founder and a Temporal principal eng.

https://www.youtube.com/watch?v=zt9DFMkjkEA "Balancing Choreography and Orchestration" by Bernd Rücker

https://www.youtube.com/watch?v=EaBVzjtSK6A "Building event-driven, reactive applications with Temporal: Workflows vs Sagas" by Dominik Turnow

Re: The Way We Are Building Event-Driven Applications Is Misguided

#57
The author never describes any of the patterns he discusses. He just says "this is what it looks like" followed by a diagram that can't be enlarged on a mobile browser and is too small to read. If this is the level of communication I could expect from this company I'll give them a very wide berth.

Re: The Way We Are Building Event-Driven Applications Is Misguided

#58
Sounds very similar to "sagas" in the Domain Driven Design/Event Sourcing space.

The general advice I have here is to not use event-sourcing/event-driven architectures for everything.

Use it where the domain maps well to a process that happens over time. An order system is the canonical example. That doesn't mean your products, customers, accounts, etc all need to be event sourced/event driven as well. It will be fine leaving those managed by a CRUD architecture.

Keep things as simple as possible (but no more simple).

There are plenty of areas where an event-driven/event-sourced architecture will make things easier and others where it will make things way harder. I find if you need a lot of sagas/orchestration... you're delving into the latter.

(I make the distinction between event sourced and event driven as this: the former is about persisting and deriving state; the latter is about communicating changes to other systems).

Re: The Way We Are Building Event-Driven Applications Is Misguided

#59
Aw, it's an ad.

As with yesterday's "big data" article, the usual question is whether you have enough transaction volume to need all this stuff. If you can organize your web site so that most traffic is read-only files, and the heavy machinery only turns on when somebody does a "buy" or something important, the whole problem probably fits into a CRUD app.

There's a useful insight in there - fan-in and fan-out are hard. I hit this in a completely different context - asset handing for a game-type client. Events come in ordering the creation of object X using assets A, B, and C. It may take several asset fetches from the network to draw something. An asset may be used for multiple drawable objects. There's caching and concurrent asset fetching. A request to create X has to start fetches for A, B, and C (they might be in cache, though) and wait until those fetches complete. A request for Y might want B, C, and D. Items should be fetched from the network only once, of course. This is a messy coordination problem.

Problems like this, with fan-in, fan-out, and concurrency, map badly to the standard paradigms. Neither threads with blocking nor "async" help much. The problem can be visualized as set operations, but can't easily be implemented that way. A single thread event driven coordination loop works, but it's kind of clunky.

So I started reading the article hoping for a theoretical breakthrough on fan-in, fan-out problems. No such luck.

The set-theory approach is hard to do, but promising. Each object that wants something has a small set of the things it wants. There's a big pool of such sets. There's also a big pool of the items you have, which changes constantly. It's easy to express what you need to fetch and which objects are now ready to go as set intersection and difference operations. But you need representations for big sparse sets which can do set operations fast. Probably B-trees, or something in that space.

Microsoft Research fooled around with this concept years ago in a different context. The idea was to have a database which supported pending SQL queries. The query would return new results when the database changed such that the results of the query changed. The goal was to to support that for millions of pending queries. Financial traders would love to have that. It's a very hard scaling problem. Don't know how that came out.

Re: The Way We Are Building Event-Driven Applications Is Misguided

#60

Earlier quoted context omitted.

It is quite tedious when discussing kafka people are spouting just the contents of confluent blog posts, like you must use X serialisation, you must use X registry, when in a lot of cases you can just use protobuf.

Whether you use protobuf or avro/cap'n'proto/flatbuffers has little to no bearing on whether you need a registry for schemas.

Registry seems pretty pointless to me, and I can’t understand personally how anyone thought it was a good idea. What was the thought process? ‘oh yeah let’s write a service that our service has to query to work out how to understand the message it just received and which will crash everything if that schema service isn’t there’ - it’s microservices gone mad!

Why worry about what services talk what version of the schema when the service is guaranteed to be able to understand a message?

Reminds me of this: https://youtu.be/y8OnoxKotPQ?si=D3gBOpPtSqnhgL3b

Post reply on HN