Questions tagged [event-driven-design]

Event Driven Design is the implementation of requirements through a queue of events that are triggered by user input. Callback functions only create event objects and add them to the queue so state remains unchanged.

241 questions
9
votes
2 answers

How to create replay mechanism within event-drive microservice

We have 7 microservices communicated via eventbus. We have a real-time transaction sequence: Service 1->service2->service3 (and so on.) Until transactions considered as completed We must make sure all transactions happened. Ofcourse we can have…
rayman
  • 20,786
  • 45
  • 148
  • 246
9
votes
2 answers

EventSourcing race condition

Here is the nice article which describes what is ES and how to deal with it. Everything is fine there, but one image is bothering me. Here it is I understand that in distributed event-based systems we are able to achieve eventual consistency only.…
9
votes
5 answers

Design Patterns with Actors

The actor based paradigm is pretty cool. Its ability to scale effectively makes it a paradigm to must-evaluate for any concurrent system. I have done some reading about it, and have a decent idea about the core intent: drive your expensive operation…
vishr
  • 985
  • 10
  • 28
8
votes
2 answers

Coroutine vs Event driven programming

Regarding the example in wikipedia: http://en.wikipedia.org/wiki/Coroutine var q := new queue coroutine produce loop while q is not full create some new items add the items to q yield to…
Howard
  • 19,215
  • 35
  • 112
  • 184
8
votes
2 answers

Java and event driven programming

I am using javaeventing to write an even driven shell to access a database. So, my use case is: open up the shell in command line. Now, the shell connects to database and listens for the command coming in. when it gets a command, it executes it…
zengr
  • 38,346
  • 37
  • 130
  • 192
8
votes
3 answers

Are polling and event-driven programming different words for the same technique?

I studied interrupts vs cyclical polling and learnt the advantages of interrupts that don't have to wait for a poll. Polling seemed to me just like event-driven programming or at least similar to a listener and what the polling does is actually much…
Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
8
votes
2 answers

Why are threads so expensive, that event-driven non-blocking IO is better on benchmarks

I recently started learning about node.js, a javascript library on top of V8 known for its non-blocking IO and incredible speed. To my understanding, node does not wait for IO to respond, but runs an event loop (similar to a game loop) that keeps…
Aurelia
  • 1,052
  • 6
  • 28
7
votes
1 answer

Scaling Kafka for Microservices

Problem I want to understand how I need to design the message passing for microservices to be still elastic and scalable. Goal Microservices allow an elastic number of instances which are scaled up and down automatically based on the current load.…
7
votes
1 answer

What tools to use on documenting event schema

Our team is starting to implement event driven designs. We are now figuring what's the best tool/s and practices for documenting the schema of these events. What are the common tools used for this use case? Any links or suggestions is appreciated.
froi
  • 7,268
  • 5
  • 40
  • 78
7
votes
1 answer

How to read large binary files in node js without a blocking loop?

I am trying to learn some basics of event driven programming. So for an exercise I am trying to write a program that reads a large binary file and does something with it but without ever making a blocking call. I have come up with the following: var…
Muhammad Ali
  • 599
  • 1
  • 7
  • 15
7
votes
1 answer

Microservice Event driven Design with multiple Instances

At the Moment we design and plan to transform our system to a microservice architecture pattern. To loose coupling we think about an event driven design with an JMS Topic. This looks great. But i don't now how we can solve the problem with multiple…
Matthias
  • 1,378
  • 10
  • 23
6
votes
1 answer

Decoupling Spring MVC's Controller from the HTTPServlet

I have been working with Spring for a while now to realize that not all of the incoming requests I receive in my app are HTTP-based. Some requests are email-based, and need email-based responses, others are socket-based (receiving notifications when…
user802232
  • 2,541
  • 7
  • 34
  • 40
6
votes
1 answer

How can I assure consistency when using an event-carried state transfer approach in Kafka

Let's suppose a simplified scenario like this: There are two Kafka topics, users and orders and three microservices user-service, order-service and shipping-service. When an order is placed through the order service, an OrderCreated event is added…
6
votes
1 answer

ZeroMQ, can we use inproc: transport along with pub/sub messaging pattern

Scenario : We were evaluating ZeroMQ (specifically jeroMq) for an event driven mechanism. The application is distributed where multiple services (both publishers and subscribers are services) can exist either in the same jvm or in distinct nodes,…
arunvg
  • 1,209
  • 1
  • 20
  • 31
5
votes
2 answers

How can I create an "event-driven" background thread in Java?

I like the simplicity of invokeLater() for sending units of work to the AWT EDT. It would be nice to have a similar mechanism for sending work requests to a background thread (such as SwingWorker) but as I understand it, these do not have any sort…
Chap
  • 3,649
  • 2
  • 46
  • 84
1
2
3
16 17