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.

18 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
140 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 ...
4
votes
0answers
127 views

Sharing identical events, with differing scopes, between client and server libraries, in a micro-service architecture

I have a shared user repository (id, name, e-mail, password, etc.) exposed as a REST service - and multiple independent websites accessing this REST service (from the back-end) as a means of sharing a ...
4
votes
0answers
231 views

Web framework architecture with non-blocking I/O

There's been a lot of news in the enterprise world lately, specially in the web, and I've decided to build a small web framework on top of Netty to learn more about asynchronous programming and event-...
3
votes
0answers
40 views

Correct event managment architecture in web application

My team and I are working on a large web application, and I've noticed that we're working in a way which I believe is an incorrect usage of flux (probably from lack of understanding). We're using ...
3
votes
0answers
585 views

State Pattern Code for embedded device - Dependency Injection of Device Objects in Context and State Classes

I'm wrestling with some code and I think I've finally gotten some state pattern code working with my events. I've got a simplified system that will work like this: This is my first go with State ...
3
votes
1answer
2k views

Is it a bad practice to subscribe to an event with an Action

I use a third party library for speech recognition. This library give me access to some classes ( SpeechRecognitionEngine, SpeechRecognitionConfiguration etc) which give me access to some events (...
2
votes
2answers
200 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 ...
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 ...
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,...
1
vote
0answers
60 views

Event based architecture - multiple producers single consumer

I'm having a discussion at work that event-based architecture should not be used in a scenario that we have multiple producers and a single consumer. In our company, we have many external ...
1
vote
0answers
81 views

Capturing keyboard events for a limited time

I'm trying to code a kind of simple video game where there are two kind of players: Human Players: They enter an keyboard input CPU Players: A random input is calculated For Human Players there is a ...
1
vote
0answers
112 views

Sending events down a tunnel, and bubbling them back up

I am working on developing an HTML canvas application, where I need to be able to do my own UI event processing. That's where the stem of this question comes from, but I'd really like to understand ...
1
vote
0answers
350 views

Using events and event subscribers to create windows in a desktop application

I should probably open this by saying I do mostly Web applications at work, which obviously have some major differences from typical desktop stuff. I had a small Windows Forms program I'd made for ...
1
vote
0answers
3k views

Updating GUI in 'realtime' using events

My Plan Have a system that holds some objects Have a winforms-form that displays some key values of these objects When certain changes occur(object gets add / removed / datat change): Update GUI My ...
1
vote
0answers
48 views

Is there just one EventHandler class per application?

In a game I'm making I was about to add a MovementEventHandler, with events like "pre-character-movement" and "post-character-movement". But this class will do exactly the same as a future ...
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
0answers
150 views

Is the HTML / JavaScript event handling exactly the Chain of Responsibility design pattern?

Just except that Chain of Responsibility might go one straight line, but in the HTML event handling, it is first the "capture phase" (capturing), then the "at phase", and then the "bubble phase" (...
-1
votes
1answer
60 views

How to mimic an event system with a boolean system

In a boolean system, say you have a while loop going on. Then you might have this: if (just_did_x) { do_something() } To prevent it calling do_something() more than once, you might do: if (...