Questions tagged [event-driven]

The event-driven paradigm of programming centralizes all waiting for events to one generalized loop that delivers (dispatches) events to registered listeners (event handlers).

The event-driven paradigm of programming centralizes all waiting for events to one generalized loop that delivers (dispatches) events to registered listeners (event handlers). When triggered, the event handlers change the state of the program, sometimes even by de-registering event handlers.

418 questions
3
votes
1 answer

Cocoa's Event Driven System: where do background tasks run?

On Mac OS X, Cocoa is event driven. By this I mean each thing is driven by the UI - the user clicking something or moving over a certain area results in an event handler being called. Main simply calls NSApplicationMain () which creates an infinite…
fdh
  • 5,256
  • 13
  • 58
  • 101
3
votes
1 answer

Guarantying eventual consistency without a message broker (utilising an in memory message bus)

I am thinking if there could be an easy way to guarantee eventual consistency in an event driven modular monolith, which is utilising an in process message bus instead of an actual external message broker. All solutions out there seem to utilise…
3
votes
1 answer

Emulation of event-driven design in Cloud Run while developing locally?

I'm developing an application with microservice architecture running on Google Cloud Run (fully managed). I want to add communication over events to my services. As I know, the only option is to use Eventarc. I'm curious what is the best way to…
AntoineRNT
  • 151
  • 1
  • 6
3
votes
2 answers

Should I be using a Java "worker thread" for this CPU simulation app?

I'm writing an emulator of an old computer in Java/Swing, and I think I've identified the design problem that I'm having. As idiosyncratic as this application is, I suspect someone will find a "pattern" to this problem. I should add that I'm still…
Chap
  • 3,649
  • 2
  • 46
  • 84
3
votes
2 answers

Writing a console-based C++ IRC-client

I'm learning C++ and so I've decided to begin coding a IRC-Client. I basically want it to be consolebased, and I've looked in to libraries such as ncurses, but I don't really know whether or not this would be the best approach. I imagine the UI…
thomasvakili
  • 1,138
  • 2
  • 10
  • 17
3
votes
1 answer

How to boot up a Microservice from events

Say I have a shop application and I want to make some complicated validations for that operation. Events are the single source of truth in my system. Adding a product is represented by a ProductAdded message. The microservice responsible for…
Weiner Nir
  • 1,435
  • 1
  • 15
  • 19
3
votes
1 answer

C design pattern performing a list of actions without blocking?

Embedded C. I have a list of things I want to do, procedurally, mostly READ and WRITE and MODIFY actions, acting on the results of the last statement. They can take up to 2 seconds each, I can’t block. Each action can have states of COMPLETE and…
3
votes
2 answers

How to avoid a busy while loop in event-driven Java

I am currently developing my event driven Java software in the following fashion (this is the essence of my main method): while(true) { Event event = eventListener.poll(); if(event != null) { // do something } else { //…
ABC
  • 693
  • 1
  • 10
  • 22
3
votes
3 answers

How to handle publishing event when message broker is out?

I'm thinking how can I handle sending events when suddenly message broker go down. Please take a look at this code using (var uow = uowProvider.Create()) { ... ... var policy = offer.Buy(customer); uow.Policies.Add(policy); //…
3
votes
4 answers

AXON framework synchronous response

I am new to AXON framework and are using it for our development. We have a requirement where command (command side) is created for the persisting data, for the same event is triggered which is consumed at query side. Now we need to have a response…
Jaspal
  • 31
  • 2
3
votes
1 answer

AWS Event-Sourcing implementation

I'm quite a newbe in microservices and Event-Sourcing and I was trying to figure out a way to deploy a whole system on AWS. As far as I know there are two ways to implement an Event-Driven architecture: Using AWS Kinesis Data Stream Using AWS SNS +…
3
votes
1 answer

create restful apis with Event driven architecture node js?

Hi I'm a newbie in nodejs as far as I'm concerned nodejs is event-driven which is a powerful feature in it. I have been learning nodejs from last few days and try to build restful apis in it with mongodb, but I'm not able to use its event-driven…
ashwintastic
  • 2,262
  • 3
  • 22
  • 49
3
votes
1 answer

Event driven design in a multiple project solution

I try to do an iOS application with Xamarin.ios. I have a server where I can send events to my App using websockets. But the functions to handle this events are implemented in another project. So if the server sends a new event I want to tell the…
DerStarkeBaer
  • 669
  • 8
  • 28
3
votes
0 answers

Setting up kafka listener in nodejs microservice

I am wondering about how to proceed with the set up of kafka listener. Should I be running two separate processes node server.js and node kafka-listener.js for every micro service? I have some sample code of both of them: This is server.js which…
3
votes
1 answer

Microservices async operation HTTP response

We're building a microservice app where clients can create projects. The following diagram shows the technical flow of this process: My question: what HTTP response should the API gateway return to the client (step 1.)? My initial idea was to give…