Questions tagged [event-based-programming]

Event-based-programming is a coding style which components born with high cohesion and communicate to each other by sending messages through Events and Delegates. Their behavior doesn't take other logics into account, they just provide services to them through the use of Events and Delegates.

Event-based-programming is a coding style which makes different coarse and fine grained components to communicate to each other sending messages through Events and Delegates.

Components in event-based-programming has a high level of cohesion because such style "ignores" who is using them in high level thinking (or process). The only interest is to provide services by signaling messages.

Normally you'll find structure like 3 classes, which one class A coordinate the work of the class B and class C. Class B and C doesn't know nothing about each other and nothing about the class A, but class A orchestrates the work and message direction of both class B and class C. The only runtime and buildtime coupling happens on A, which may need the existence of B and C.

Ted Faison, has a fantastic work in the book Event-Based programming - Taking events to the Limits is one of the good source about that. This programming style has is easily found embody in frameworks like Windows Workflow foundation and kind of.

This programming style is more used by Seniors developers, with more then 7 years working software services.

48 questions
3
votes
2 answers

Eventual Consistency in microservice-based architecture temporarily limits functionality

I'll illustrate my question with Twitter. For example, Twitter has microservice-based architecture which means that different processes are in different servers and have different databases. A new tweet appears, server A stored in its own database…
3
votes
1 answer

Implement logging functionality using events in C# class library - is it good practice?

I am facing the challenge of logging implementation in my C# class library, which is a domain model. My main goal is to keep logging functionality as canonical and decoupled as possible. Usually logging messages will be written to files, and perhaps…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
2
votes
0 answers

PyQtgraph - Plotting real-time data - Add "line labels" next to graph which move up and down in concert with real-time data (see illustration in post)

I'm plotting 2 lines on a pyqtgraph in real-time (simultaneously), and I'd like to add line labels on the right of the graph, that move up and down with the incoming real-time data, as if 'attached' to the end of the plotted line. It's a bit…
2
votes
2 answers

Event Based Kafka + Scheduling Design

In an event based e commerce system using kafka, how do you handle auto expiring of orders in pending_payment status? Typically, whenever there's a request from customer to create a new order there will be a message sent to topic so that inventory…
2
votes
0 answers

Using Pika with Django (Event-based microservice using django rest framework)

anyone here has experience implementing pika with Django? I am basically running an event-based microservice using django rest framework. And using RabbitMQ as the message bus. I know the default library to use in this case would be Celery, but I am…
2
votes
0 answers

Distribute Events by Topic on Android

I am new in the Android environment, and trying to publish topic events, currently using "EventBus" framework, but can not seem to find an option to do so. Example: Say I have a "ConversationUpdateEvent" but would like to fire the event by topic, or…
MCMatan
  • 8,623
  • 6
  • 46
  • 85
2
votes
3 answers

Does an asynchronous-event-based programing languages exists?

I had some time and thought about an event-based programming language. By that I mean a language where every variable is updated, when you change a dependent variable. For example consider the following pseudo-code for a terminal-application: int a…
2
votes
1 answer

Need recommendations to create an event-based messaging and badging system in Rails

I want to create an event-based notification and badging system that would award users when they accomplish certain goals. Goals might include: Posting 20 entries on a forum -> alert on homepage highlighting user, award of badge Logging in to the…
aressidi
  • 680
  • 1
  • 10
  • 26
1
vote
1 answer

In a SimPy simulation, how can I simulate a bus waiting to be entirely filled?

I'm trying to use SimPy to simulate a bus that stops periodically in a station and then waits until it gets filled by N passengers (assume that the bus is empty each time it arrives at the station), being N the total amount of spots that the bus…
Vile
  • 11
  • 2
1
vote
1 answer

Improve Authorization flow for common wallet belonging to multiple users

I have an implementation where I have one wallet (wallet per client/company) and a number of users belonging to one wallet. I have hundreds of API calls per second for Authorization from users. When I get authorization API calls from users and…
1
vote
1 answer

How to convert EventHandler parameter into async/await?

I have to consume the following API (bacically i have to subscribe for subject/channel/topic in Stan): IStanSubscription Subscribe(string subject, StanSubscriptionOptions options, EventHandler handler); And i would like to…
1
vote
1 answer

Event based integration with versioned events

I want to communicate my services using events. I gonna publish (internally) all my domain events and allow any other service to subscribe to them. But such approach couples those services togheter. I am not longer allowed to change my events. This…
ayeo
  • 482
  • 1
  • 4
  • 16
1
vote
1 answer

Can I use Python 3 'with open(filename, mode) as file:' and keep it in an object to send it events?

I'm writing a manager class that will allow creation of different types of log files (raw, CSV, custom data format), and I'd like to keep the log file open to write lines as they come in. The log file can also be started and stopped by events…
jddj
  • 83
  • 7
1
vote
2 answers

Wrap event based system with REST API

I'm designing a system that uses a microservices architecture with event-based communication (using Google Cloud Pub/Sub). Each of the services is listening and publishing messages so between the services everything is excellent. On top of that, I…
1
vote
1 answer

Microservice development with or without Akka.NET

We are trying to implement Microservice Architecture creating our new applications in our current environment using Asp.NET Core. The first generation of our Microservices will use Request/Reply communication pattern and there is no need for any…