Live data from Hacker News

Ask HN: Has anyone fully embraced an event-driven architecture?

news.ycombinator.com

151–160 of 173 posts

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#151
post #66

Like others have said, it is just one tool in the tool box. We used Kafka for event-driven micro services quite a bit at Uber. I lead the team that owned schemas on Kafka there for a while. We just did not accept breaking schema changes within the topic. Same as you would expect from any other public-facing API. We also didnt allow multiplexing the topic with multiple schemas. This wasn’t just because it made my life…

Thanks for your detailed answer, really appreciate it. Two follow up questions if you don't mind me asking, even though I understand you were not on the publishing side: 1. Do you know if changes in the org structure (e.g. when uber was growing fast and - I guess - new teams/product were created and existing teams/products were split) had significant effect on the schemas that had been published since then? For examp…

For 1, no example really comes to mind, but i guess there could be cases where a service went from publishing an event with all of its related data, then split into a service where that becomes more expensive to do (like that data is no longer in memory its behind the api of the old service). In some cases you can have very simple services that consume a message, make a few calls to services or databases to hydrate it with more information, then produce that message to another topic that the original consumers could switch to. More commonly though if the data model is making a drastic change where the database is being split and owned by two new services, you will have to get consumers in on the change to make sure everyone knows the semantics of the new changes.

For 2, it completely depends on the source of the trigger. The first event in a chain probably only has enough information to know that it should produce an event, usually as quickly possible, so no additional db or api fetches. So you might get something in the driver status topic that contains {driver_uuid, new_status, old_status}, then based on what downstream consumers may want to do in response to that event, you may need more info, so you may get more entity information in derived topics. Even pure-entity-based messages would have needed a trigger, so in our topics that tail databases, you may have the full row as a message along with the action that occurred like {op: insert, msg: {entity data… }}.

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#152
post #55

Earlier quoted context omitted.

As someone that worked at the company that taught Pete Hunt, and other early contributors to react this trick, I wouldn't call it a benefit, but the only workable solution to acceptable single page web application performance in an otherwise terrible development environment (browser javascript). Proper concurrency support and real mutexes would be way better than having a single execution thread for all your computat…

I find Clojurescript to have a superb async support and ecosystem.

Like everyone getting frustrated with the buggy core.async and just using JS promises directly?

In Clojure/JVM core.async has less problems though.

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#153
post #66

Earlier quoted context omitted.

Thanks for your detailed answer, really appreciate it. Two follow up questions if you don't mind me asking, even though I understand you were not on the publishing side: 1. Do you know if changes in the org structure (e.g. when uber was growing fast and - I guess - new teams/product were created and existing teams/products were split) had significant effect on the schemas that had been published since then? For examp…

For 1, no example really comes to mind, but i guess there could be cases where a service went from publishing an event with all of its related data, then split into a service where that becomes more expensive to do (like that data is no longer in memory its behind the api of the old service). In some cases you can have very simple services that consume a message, make a few calls to services or databases to hydrate i…

Thank you so much for your input on this topic, very informative answers!

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#154
post #77
post #66

Earlier quoted context omitted.

Thanks for your detailed answer, really appreciate it. Two follow up questions if you don't mind me asking, even though I understand you were not on the publishing side: 1. Do you know if changes in the org structure (e.g. when uber was growing fast and - I guess - new teams/product were created and existing teams/products were split) had significant effect on the schemas that had been published since then? For examp…

I am not the author of the original message, however, I also recommend "Building microservices 2nd edition" if you are trying to answer such questions

Thanks for your recommendation, I pre-ordered it =)

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#155
post #59

Earlier quoted context omitted.

Unless something has changed with web assembly since I last did browser development, doesn't it still compile down to javascript in the same execution environment with those limitations?

I'm not very familiar with concurrency at a lower level, so I can't comment on your complaints. What Clojurescript provides is considerably better abstractions that in turn get you correct implementations with much less incidental complexity or hassle.

Not sure why my sincere question about the state of browser execution environment got downvoted, but the general concerns I raised in my first comment weren't about incidental complexity or hassle. They matter and it's great that clojurescript helps with those two. The concern I voiced was about maintaining realtime performance of a responsive user interface. The key issue is that you have a single event loop that all visual and human interactions need to be handled by because that's the only thread that can interact with the DOM. It's just way too easy to block that thread and cause the app to become unresponsive.

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#156
Some teams parallel to mine have an event based contract with their upstream, vs my team has a service contract.

We've been doing some refractors to combine common systems, so now the same team is upstream for both.

Talking to the sister teams, theyrepretty unhappy about their relationship with the upstream and are trying to avoid and replace them internally, vs we quite enjoy them.

I think the big difference is in mental model. When you're passed an event stream, the producer doesn't care about the events going out, and it's on you to handle all of them, and for failures, you have to reach out to whoever made failures in the upstream system, rather than the upstream team doing it. Otoh, for a service call, you only need to throw an exception for a bad event, and the upstream team is responsible for communicating the failure.

The more event based interfaces you have between your team and the folks making the change, the harder it gets to tell them that they're doing something wrong, and the less you even know about what they're doing or how to find them.

Mind you, immediately after the service call, we put messages on a queue. Distributing the message between systems we own works just fine

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#157
post #41

You're not going to like the answer, but I think it captures some of what you're getting at. Windows 95. Old style gui programming meant sitting in a loop, waiting for the next event, then handling it. You type a letter, there's a case switch, and the next character is rendered on the screen. Being able to copy a file and type at the same time was a big deal. You'd experience the dead letter queue when you moved a wi…

I agree mostly to this answer. I also want to point out that we use sharding as a technique.

Micro-services is just sharding across a different axis (TM)

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#158
post #55

Earlier quoted context omitted.

I find Clojurescript to have a superb async support and ecosystem.

Like everyone getting frustrated with the buggy core.async and just using JS promises directly? In Clojure/JVM core.async has less problems though.

Never ran into problems when I was using it ~5 years ago.

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#159
post #41

You're not going to like the answer, but I think it captures some of what you're getting at. Windows 95. Old style gui programming meant sitting in a loop, waiting for the next event, then handling it. You type a letter, there's a case switch, and the next character is rendered on the screen. Being able to copy a file and type at the same time was a big deal. You'd experience the dead letter queue when you moved a wi…

I fully agree with this, also that's still quite common in the embedded world. The user presses a button which sets a hardware event flag. CPU wakes up from sleep, checks all event flags, handles them, clears the interrupt bits and goes back to sleep. But using events like this requires a very tight integration between event producer and consumer, so I don't think this will translate well to distributed systems or mi…

It's good to hear from an embedded dev. Embedded is so under-represented that people love to argue about things like low level devs don't use them every day.

Re: Ask HN: Has anyone fully embraced an event-driven architecture?

#160
post #61

Earlier quoted context omitted.

There is an example where highly distributed, event-driven systems are used. Everyday we are using them. It the cars. In a car there are many distributed ECUs(1) that communicate in an event driven system. It was tried to use cyclic communication. But all those attempts failed in the long run. Because cyclic communication would required that all the independent ECUs are synced to each other, which is a very hard prob…

Electronics can be more trouble than they're worth in cars. If they made modern cars with no electronics in the engine or controls, maybe I'd buy new cars. It's frustrating when my old Cherokee won't start because the antitheft system is having some kind of conniption for example, and I have to go through this ritual of locking and unlocking the doors, reconnecting the battery with the key in the ignition, flipping t…

Or you could just get your car fixed
Post reply on HN