Questions tagged [event]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
99 views

How to ensure persistence in an event-driven microservice architecture?

Right now we have a set of micro services with a client-facing gateway responsible for authentication and routing. MySQL database and RabbitMQ for the message queue. Internal services may queue up ...
3
votes
3answers
175 views

How to model User behaviour that can be shared between microservices in Event Driven architecture?

I have an Event Sourced system that has 3 micro services (simplified): User management - Registering a user, change password etc User account - manages debiting/crediting of the user account balance ...
40
votes
10answers
5k views

Applicability of Single Responsibility Principle

I recently came by a seemingly trivial architectural problem. I had a simple repository in my code that was called like this (code is in C#): var user = /* create user somehow */; _userRepository.Add(...
2
votes
1answer
46 views

Where does the responsibility for clearing higher-level caches lie in a pyrimidal calculation system with caching at multiple levels?

I'm working on system that analyses non-trivial amounts of data. The analysis is pyramidal, in that various combine to make intermediate values, which in turn combine with each other and more inputs ...
0
votes
0answers
27 views

How to provide an extension point for library that should authenticate asynchronously using WebClient?

I'm trying to design a library (nuget package) that would read data from a REST API and deserialize it to DTO objects. The API requires authentication which is usually done with Microsoft's ADAL ...
-3
votes
1answer
59 views

How does event.target return the DOM object?

I read through documentation and searched on google, but couldn't find a specific answer. Currently, I have an object that subscribes to a click event. I am trying to understand how a view that ...
0
votes
2answers
93 views

Microservice /Soa : how to fire notification depending on the caller?

I have this two use cases in a user registration process : Case 1 : the user register an account online and the system should send him an email notification in order to confirm that his account has ...
1
vote
2answers
352 views

How to deal with an event if the domain aggregate was not yet persisted?

When I call paid() on my aggregate it sets all the properties internally that need to be changed based on this action. But at this time the change has not been saved to the DB, so I can't reliably ...
1
vote
1answer
64 views

Publish / Subscribe Paradigm Implementation Problems

Reading the final chapter 6 of the paper "The Many Faces of Publish/Subscribe" I stumbled across: Decoupling is a desirable property because it enforces scalability at the abstraction level, by ...
5
votes
2answers
251 views

How can we keep sight of business flows in event driven architectures?

I am planning to set up an event driven architecture using Spring Boot apps that publish and read messages from a Kafka broker. Let's suppose it were an e-commerce application with the usual events (...
2
votes
3answers
126 views

How are new bounded contexts deployed, and bugs fixed, in message-driven “autonomous” microservice architectures?

I'm coming from the monolith background, using a single large relational database. From my research, many proponents of the microservice architecture favor the event-driven rather than REST driven ...
1
vote
1answer
103 views

Alarming on event driven systemev

How to define overall monitoring of event-driven architecture? Each component talk to other component via events. Consumer(s) react to events within minutes to days based on use case. Each component ...
0
votes
2answers
679 views

Designing events in an event-driven (event sourced) architecture and managing duplication

I have been creating a POC for a part of our system but I'm finding some trouble communicating some of the ideas behind it. This takes ideas from Event Sourcing and Event Driven Architecture but ...
1
vote
0answers
73 views

Unit testing EventArgs - will there be timing issues?

I am writing a small game library. I capsule the logic in my model named Block. My model Block communicates only via events to it's clients (Is this a good thing to do!?). I wrote a simple unit test ...
2
votes
3answers
486 views

What should a method which creates conditionally self-unsubscribing event-handlers be named?

I develop/maintain an in-house library in a growing company with about 12 other developers that write code. This library is mostly used for scripting game behavior and we have many different projects ...
1
vote
1answer
180 views

In microservices architecture, is it reasonable that service which emits event also listens to it?

We have a complex app which built by using multiple microservices. At a runtime, one of the microservices emits an event to initialize some maintenance process in another microservices, it's ok. But ...
1
vote
2answers
272 views

Was including a keyword for events a mistake in C#?

C# has events built in with a keyword. So if you want to declare an event, you write: public event MyEventHandler SomethingHappened; It is convenient, as it does allow you to add multiple event ...
1
vote
1answer
315 views

How to write integration tests for a distributed system highly dependant on current date and flow of time?

My team and I are trying to set up some integration tests of a distributed system that is highly dependant on the flow of time and events coming from external sources. Just to give you an idea about ...
1
vote
1answer
1k views

Event Sourcing and cross Aggregate validation

I am looking into Event Sourcing (ES) and having a play around with some code Greg Young put together (Greg Young Git Repo). I like what ES offers in terms of functionality, but I am trying to apply ...
3
votes
2answers
157 views

Is avoiding raising an event when it is not needed considered premature optimisation?

I have a custom TextBox that validates its input. Whenever the validity of the input changes, a ValidityChanged event is raised and the user is informed about the validation results. My question is ...
0
votes
1answer
140 views

For what reasons would you use AngularJS expression (&) binding instead of using events?

Like the title asks, for what reasons would you use the ampersand binding in AngularJS instead of utilizing an event system--especially in a case where your application already uses events for some ...
2
votes
2answers
547 views

WPF/C#: What is the accepted way for a lower level object to notify the UI?

Setting Let's take the following example: We have a series of entertaining events on the television with each lasting only an hour and this goes on for 3 weeks. We want to create a simple App that ...
0
votes
2answers
516 views

Events fired when widgets are updated programmatically

In the GUI application I'm working on I have a number of custom (composite) widgets that I've created, with each widget having an update_gui function where I access my SQLite database so I can fill in ...
1
vote
2answers
147 views

What is 'better' - An event that tells you that something happened or accepting a delegate to be called when the event triggers internally?

I am writing a collection that accepts a time parameter, the purpose is that after that specified amount of time have passed the element won't be present in the collection. I want the user of this ...
7
votes
3answers
5k views

Should I reduce event listeners by making functions more complex?

An example would be if you had multiple inputs, each of which effect a completely different process, (perhaps one changes a div's width, while another sends ajax request for predictive search), would ...
2
votes
2answers
752 views

How chose a design for an event system

I'm working on a Entity Component System for learning purpose. I made major changes with my design so I was wondering if I could pick a better design for my event system. The purpose of the event ...
3
votes
2answers
247 views

Domain Events Grouping/Buffering

Suppose I have 3 domain events, Event1 Event2 and Event3. When command arrives at my Service Layer, I can rise 2 commands at the same time - e.g. Event1 and Event2. One Class has event listener for ...
11
votes
3answers
7k views

DDD: Where to place domain event handlers?

Could you tell me your opinion that which layer is the right one to place domain event handlers in DDD? For example, I have application service to add a new contract and I'd like to send an email ...
2
votes
1answer
310 views

Event subscription in finally clause

Background My program communicates with a device that is usually asynchronous, but can sometimes behave synchronously. I have an event handler that I use for receiving the data asynchronously, then I ...
14
votes
3answers
4k views

API Gateway (REST) + Event-Driven Microservices

I have a bunch of microservices whose functionality I expose through a REST API according to the API Gateway pattern. As these microservices are Spring Boot applications, I am using Spring AMQP to ...
-2
votes
1answer
60 views

Name for object to re-order events received in arbitrary order?

I have a program which generates events. They are ordered with a Lamport clock and sent over the network. They may arrive in a different order. On the receiving end I have an object which re-orders ...
4
votes
1answer
80 views

Using domain events to express some reached state

In general, domain events are used to make a notification, when something has happened to entity, but is it okay - from perspective of ddd - to use domain events to make a notification, when entity ...
3
votes
2answers
2k views

What does “initialize event handler” mean in this context?

In file1.js I read: // NOTE: initialize your app event handlers here, see file2.js for a simple event handler example // TODO: configure following to work with both touch and click events (mouse + ...
0
votes
1answer
1k views

Handling multiple asynchronous events - Wait for pending offers to process on new offer?

I have a programming problem, that I don't know how to solve. And while I have provided a sample of my code, I am interested in a conceptual answer on how to resolve this problem. On a tradeOffers ...
1
vote
0answers
40 views

Push instead of pull on a list that might change due to a command in addition to events? [closed]

I need to show a refreshable/searchable list of items and update/add-to it whenever an event is published. How do I make sure no events are lost while refreshing/searching is happening? Some sort of ...
0
votes
2answers
1k views

Are hooks really subsumed by Slim Framework middleware?

I've been using the Slim Framework (v2) for a little while now to develop my user management system. They recently released Slim 3, and according to the upgrade guide, Slim v3 no longer has the ...
2
votes
0answers
46 views

How do you use Domain Events without obfuscating the control flow? [duplicate]

When we have a system which utilizes Domain Events, it can be quite hard to comprehend the whole workflow (sequence of events) of processing a particular command: how many active handlers we have, how ...
0
votes
2answers
415 views

Design pattern for canceling a long task in a sub-thread

Suppose we have a file copy program. It has two threads, a UI thread displaying the progress of the copy operation and a work thread copying the file. The UI has a button for canceling the process. ...
0
votes
4answers
291 views

How should nodes in a chain be connected?

Suppose you were building a system that receives data on one end and sends filtered data on the other end. The system is a chain of nodes, each receiving data from the node before and sending ...
2
votes
3answers
524 views

Performance increase by only attach onblur handler inside of onfocus handler?

Given a web page with input fields, does it have a performance difference whether or not you assign the onblur handler inside of the onfocus handler like so: var inputFields = document....
6
votes
2answers
2k views

Should I use events or abstract methods?

Lets say I create an abstract class that manages some network functionality for me. I want to be able to be notified when something changes. For example: OnConnect or OnDisconnect. Should I create ...
3
votes
2answers
7k views

How to write a custom EventHandler class

When I started using Java, I created a custom Event class to mimic C#'s implementation of Events. Since then, I've added some other features, like event listener priorities, and cascading events were ...
3
votes
3answers
25k views

Detect or Prevent Screen Capture Applications

I am building an app that displays very sensitive information and as such, I want to be able to either Disable the ability to capture the screen Redact the portion of my app that is on the screen ...
9
votes
2answers
3k views

Should the sender of an event always be a generic Object?

When programming events in C#, it is advised to create a delegate in form of: delegate XEventHandler(object sender, XEventArgs e); My question is on the first argument of the delegate, object sender....
1
vote
1answer
1k views

How is Nginx handling its requests in terms of tasks or threading?

Recently I read up on Wikipedia about Nginx. What puzzled me was this paragraph: Nginx uses an asynchronous event-driven approach to handling requests, instead of the Apache HTTP Server model that ...
0
votes
1answer
600 views

How does a clicked event work at a low level?

Specifically in regard to a drag and drop operation, how does a button, text box or whatever know that it has been clicked (or vice versa how does the display manager know what it clicked). I read ...
2
votes
1answer
1k views

will having an event with subscribers prevent an object from being GC'ed?

I have an object, which has an event which in turn has subscribers. I know that the subscribing objects won't get GC'ed since the delegate they stored for the event is connected to them, thus keeping ...
3
votes
2answers
2k views

Combining asynchronous and synchronous programming

I've got trouble wrapping my head around a certain problem: In my data-flow app (a visual editor), I have both autonomous objects which communicate though ports via unordered simultaneous messages ...
9
votes
2answers
2k views

Should event listeners be held in weak references?

Usually event listeners shouldn't outlive object that registered them. Does it mean that event listeners should be held by weak references by default (stored in weak collections by the object ...
6
votes
2answers
8k views

Testing C# Eventhandler Subscription

I want my unit tests to be able to verify that some events were subscribed or unsubscribed at specific points. Currently, I see two options. VerifiableEventHandler Each client subscribes using the ...