Questions tagged [event-programming]

Event-driven programming refers to the programming technique where the flow of the program is driven by recognition and handling of events such as mouse clicks, key presses, etc.

Filter by
Sorted by
Tagged with
1
vote
1answer
23 views

Can Domain Services publish Domain Events on multi-aggregate operations?

I'm in a scenario where, when a certain command is applied on an aggregate, I have to change the state of the aggregate itself if ALL related aggregates are in the same state, then notify the world ...
0
votes
2answers
69 views

Events for entity state changes

When an entity is changed, I want to raise an event to notify potential consumers about the state changes. My question is, should I have an xxxChanged event for each attribute, or a single ...
2
votes
2answers
204 views

Event Driven Architecture - Best Practice

I am trying to understand the best practice around the event-driven architectures. say I have 2 services order service and inventory service. An user wants to order product and sends a request to ...
-2
votes
1answer
43 views

Event loop for console input

I have a server application that runs in an infinite loop, only reacting to SIGINT. It is put inside a screen process. If I have to make any changes (reload configuration, add new plugins, etc) I ...
0
votes
1answer
34 views

What kind of bottlenecks are possible when implementing a distributed workflow using a central point of control?

I was going through https://docs.microsoft.com/en-us/azure/architecture/patterns/choreography, the document mentions in the drawbacks of having a central orchestrator that it can become a performance ...
0
votes
1answer
67 views

How can message queues improve scalability?

I have read in a DDD book that using message queues between communicating services can make the whole architecture more scalable, amazon's documentation mentions that queues provide granular ...
131
votes
11answers
29k views

How does an event listener work?

During one of my lectures today about Unity, we discussed updating our player position by checking every frame if the user has a button pushed down. Someone said this was inefficient and we should use ...
0
votes
2answers
50 views

Event Driver Microservice Can Storage Sent Message?

I have an event driven architecutre, with many microserver that publish a lot of message in my event bus. In some case i can't track why some process is blocked, maybe because my Service-A haven't ...
1
vote
2answers
181 views

How would an event driven architecture deal with agregating events over a time period?

Say I have a service that is producing events of the format type: SEND_MESSAGE, to: 'bob@foo.com', And I have another service, that is saying, "for the next four hours, I want to consume all ...
2
votes
1answer
124 views

Event Driven Architecture how should channels be used

I'm using event driven architecture, to perform realtime signal proccessing and to provide independent metrics. I decided to use a redis cluster to act a cache and a message bus. I'm a bit confused ...
0
votes
1answer
511 views

Querying in event driven microservices

I am trying to get my head around "event driven" microservices. I understood, there are several techniques and patterns, like event notification, event sourcing, CQRS, etc that can help us to achive ...
1
vote
0answers
21 views

Breadth first event synchronization based on a frequency or time series

I have an interesting and problem I'm facing. I'm trying to maintain a set of metrics independently based off of a time frequency. Note: This is a simplification of the problem I've omitted pieces of ...
0
votes
1answer
56 views

Designing Integration event application

We have a microservice that integrates with a third party system via REST API to handle appointment booking for our customer. It takes advantage of the event-driven model. Our microservice emits out ...
1
vote
2answers
63 views

Locking (reserve) related Aggregate Roots

Problem In my application a user can lock a set of related aggregate roots to work exclusively on them and to avoid the usage of an invalid set of objects later in the process (by other employees). ...
8
votes
3answers
2k views

What's the difference between reactive programming and event driven architecture?

What's the difference between reactive programming and event driven architecture? Is reactive programming a way of implementing event driven programming?
4
votes
1answer
144 views

Pub-Sub pattern and instance replication

I am porting an event-driven architecture to a container environment (Docker) and I wonder how to take advantage of replication while using pub-sub: if I just increment replicas I end up with many ...
0
votes
1answer
53 views

Communicating state from the backend to the frontend while the user is logged in

Please note: although this question mentions Angular and Spring Boot (Java), and it would be great to get an answer from someone with experience in that stack, I think this is more of an architectural ...
3
votes
1answer
82 views

When components of an event-driven program require specific responses to specific events, is event-driven still the correct approach?

I'm working on a multi-threaded program that interfaces with external USB/serial devices via user-space device drivers. Early in the design stage, I made the decision to split the program into three ...
-1
votes
1answer
51 views

How to record the sequence of events effectively when there is a logical flow runs over various event notifications?

Let me explain what I mean there is a logical flow runs over various event notifications based on our web app, which is event-driven and it is quite common in my opinion. User clicks a button to ...
1
vote
1answer
41 views

Need advice on approach for IOT project

I need some advice on an IOT project I am working on. Here are some details about what I am trying to do: Use Case: Periodically receive data from the 3rd party vendor API in real time and allow users ...
4
votes
1answer
118 views

What is the right way of using event aggregator/message bus?

Recently I had a conversation with a colleague, who proposed that a whole app could rely on an event aggregator (or message bus). I think this is a really good pattern if someone wants to decouple ...
0
votes
2answers
56 views

Setting custom callbacks in a Javascript applet?

I'm designing a 3D visualisation applet in Javascript. When used, a Canvas will be created and placed inside an HTML element on a webpage, specified by the developer who is implementing the applet. ...
7
votes
1answer
2k views

Handling events and incoming Web API calls simultaneously

I'm working on a project where I got an architecture with multiple "Microservices" communicating with each other by using an event bus (RabbitMQ). I got an Web API-project set up for each service so ...
8
votes
1answer
380 views

Temporal logic as a programming language paradigm?

So I'm aware there's some degree of timing-based logic in existing programming languages, like threads and the sleep() function (and derivatives thereof), as well as events / delegates. However, I was ...
1
vote
0answers
132 views

RabbitMQ messages reliability for at-least-once delivery

I wanted to ask what are the possibilities of maintaining reliability when exchanging messages between microservices, when one of those message is rejected. As of today, we don't want to lose messages,...
0
votes
1answer
299 views

How to build a data pipeline through several microservices

We are building a microservice architecture. We have one service which imports a set of data (usually, ca. 10MB). Another service should do some analysing and manipulation stuff on these data. A third ...
1
vote
3answers
284 views

Event Carried State Transfer and initial state synchronization

I'm exploring Event Carried State Transfer patter, I understand how it works, but there is one problem I don't know how to solve. So, in ECST, a service can listen to events and then build a private ...
0
votes
1answer
83 views

Event sourcing: Update local data before posting an event?

We are introducing events to our system (I would hesitate to call it 'event sourcing', but we have started down this road). To do this we are still maintaining the same HTTP public 'CRUD' API's, but ...
1
vote
1answer
120 views

What is the name of this kind of (intra-process, inter-thread, queue-based) event system?

Context Espressif's embedded development libraries for the ESP32 microcontroller contain an event system based on FreeRTOS. The event system handles connectivity, interrupts and other IO activity, but ...
1
vote
1answer
66 views

Best approach to update the User Interface on consumed event(s)?

I am developing a microservice architecture where the API publishes a message through RabbitMQ. One or more consumers will read the message, preform its functions then if successful acknowledge the ...
0
votes
1answer
38 views

Move monolith to Event Streaming in one step or multiple steps?

I have been the sole developer on a project for the past eight years. Right now it's one big monolith, but at this point it's really three separate apps, and those really need to be broken down as ...
0
votes
0answers
37 views

How to deal with time-based conditions in an event-driven architecture?

The company I work for has a ticketing platform. The backend system consists of a few applications talking to each other via HTTP and through events in Kafka. A ticket has a sell_start_date field ...
0
votes
1answer
142 views

How do I not lose the “reactive” nature of my services, simply because one of the services isn't reactive?

I've lately been very interested in reactive microservice design with streaming and event-driven architectures. When one writes (i.e., manages) services, this paradigm works extremely well by simply ...
1
vote
1answer
114 views

Designing Kafka topics for secured event driven job scheduling system

Consider the following Group A Job A { Depends on Job B of Group A Run User -> User1 } Job B { Depends on Job C and Job D of Group A Run User -> User2 } Job C { Depends ...
4
votes
1answer
492 views

How should AWS Lambda functions subscribe to domain events?

I'm doing my first Domain Driven Design (DDD) implementation. My architecture is comprised of .Net Core for defining my domain model, services, and building AWS Lambda functions. I am using Lambda ...
-4
votes
1answer
40 views

What do you store first in a CQRS + ES architecture

I've recently started reading about CQRS, DDD and EventSourcing. From what I've read one of the best ways to do ES is to have an event store and then a regular DB or cache for easier querying. However,...
0
votes
1answer
92 views

Notify user in a event driven architecture

We have put in place an account service management : its reponsability is to let a user register is account, confirm his email, etc... We have put also in place a process layer that is reponsible to ...
2
votes
1answer
58 views

Remove unwanted parameter from event

I've run into a common annoyance where I'll have an event that sends a parameter, but some consumers of the event don't need the parameter at all. So I wrap it in another function that decouples the ...
1
vote
1answer
3k views

How does jQuery's mechanism of event handlers work

I'm in the need of widen my perspective on the framework libraries, to be able to make well aware choices of if/which/when to add a framework to a website. One thing that got my attention was event ...
1
vote
2answers
2k views

Microservice architecture pattern for Batch based system

I have been exploring the microservice architecture for the batch-based system. Here is our current setup: Code: We have 5 systems that are internally connected and they pass data from one system ...
-1
votes
4answers
248 views

Is opening a new thread for each event you want to handle the best way to handle events?

I know 100% that there already is a solution out there for what I am asking but with all the research I have done, I can't seem to find it. Problem: Currently, a CS student trying to do independent ...
2
votes
1answer
134 views

What is a good technique to process an event stream to ensure sequential or transactional consistency

I am trying to improve an event-driven processing system, which is having a few problems because the events are not guaranteed to arrive in the correct chronological sequence. This is due to batching ...
2
votes
2answers
368 views

Error handling in an event driven system

The context I have two components A & B, which communicate through events . Components B is responsible for long running background processes and it listens to the following event: ...
2
votes
1answer
83 views

Sharing data between services in events based architecture

We currently have a monolithic application. Currently an API end-point will look something like: public async Task<IActionResult> Post([FromBody]ContactViewModel model) { //... update the ...
0
votes
1answer
119 views

How to identify rules satisfying a certain condition based on events

I am working on a microservice, in an event driven world, where I have tens of 1000s of rules configured which depend on data type A, B, C, D and so on. As soon as an event arrives I want to be able ...
1
vote
1answer
288 views

Whats a proper way to design a GUI event system?

I'm trying to write a GUI library for a project (also for learning purposes) from scratch (in C++), and it's working pretty well, but since this is my first attempt i feel that the design of the event ...
1
vote
1answer
126 views

Question on MVP Pattern, Events and saving complex objects

I'm working on a winforms project that involves 3d models, Opengl graphics, hierarchical project files and uses an MVP approach. Currently i have things setup such that when the user manipulates ...
1
vote
2answers
650 views

How can I emulate Signals and Slots found in Qt, to Javascript / Typescript Classes?

Ive brought this up with other developers, and they say while there is no obvious way forward, it seems that they all have an idea of how to go about it. Is there any way I can implement signals and ...
7
votes
2answers
1k views

Event driven programming in Haskell

I'm new to Haskell, so this is more a high-level conceptual question. I've read this: https://wiki.haskell.org/Real_World_Applications/Event_Driven_Applications and it has this: run :: Domain -> [...
3
votes
2answers
386 views

How to make cross-service transactions in a microservice architecture? [duplicate]

One question im struggling with is how to make linear, cross-service operations/transactions in a distributed system. For example, I have two services: Orders and Payments. How would the Orders ...

1
2 3 4 5