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
98
votes
5 answers

What's the difference between: Asynchronous, Non-Blocking, Event-Base architectures?

What's the difference between: Asynchronous, Non-Blocking, and Event-base architectures? Can something be both asynchronous and non-blocking (and event-based)? What's most important in programming, to have something: asynchronous, non-blocking…
66
votes
2 answers

What are the use cases of Node.js vs Twisted?

Assuming a team of developers are equally comfortable with writing Javascript on the server side as they are with Python & Twisted, when is Node.js going to be more appropriate than Twisted (and vice versa)?
pmn
  • 1,640
  • 2
  • 14
  • 15
64
votes
3 answers

Using Amazon SQS with multiple consumers

I have a service-based application that uses Amazon SQS with multiple queues and multiple consumers. I am doing this so that I can implement an event-based architecture and decouple all the services, where the different services react to changes in…
24
votes
2 answers

Why is the Apache Event MPM Performing Poorly?

The Event MPM is not exactly the same design as Nginx, but was clearly designed to make keepalives more tenable and sending static files faster. My understanding is that the Event MPM is a bit of a misnomer because: Although the connection is…
Jaimie Sirovich
  • 1,088
  • 2
  • 10
  • 14
21
votes
3 answers

How to restore state in an event based, message driven microservice architecture on failure scenario

In the context of a microservice architecture, a message driven, asynchronous, event based design seems to be gaining popularity (see here and here for some examples, as well as the Reactive Manifesto - Message Driven trait) as opposed to a…
15
votes
2 answers

Dataflow computing in python

I have n (typically n < 10 but it should scale) processes running on different machines and communicating through amqp using RabbitMQ. Processes are typically long running and may be implemented in any language (though most are java/python). Each…
dgorissen
  • 6,207
  • 3
  • 43
  • 52
15
votes
2 answers

vert.x Wait for reply on multiple messages

In vert.x I can send a message to another verticle and "wait asynchronously" for the reply. The problem is: I want to send messages to multiple verticles and make an async handler to be called when all verticles replied. Is this possible or is…
TiagoOliveira
  • 507
  • 6
  • 17
12
votes
2 answers

Using the Task Parallel Library on an event-based asynchronous pattern

I'm writing a networked application. Messages are sent over the transport as such: Network.SendMessage (new FirstMessage() ); I can register an event handler to be called when this message type arrives, like…
Jason
  • 6,878
  • 5
  • 41
  • 55
9
votes
1 answer

Are epoll events being watched when not epoll_waiting

I'm rather new to event based programming. I'm experimenting with epoll's edge-mode which apparently only signals files which have become ready for read/write (as opposed to level-mode which signals all ready files, regardless of whether there were…
Antoine
  • 13,494
  • 6
  • 40
  • 52
6
votes
4 answers

Is there a Java equivalent to libevent?

I've written a high-throughput server that handles each request in its own thread. For requests coming in it is occasionally necessary to do RPCs to one or more back-ends. These back-end RPCs are handled by a separate queue and thread-pool, which…
JoelPM
  • 1,752
  • 2
  • 11
  • 7
5
votes
2 answers

How would I go about implementing the event-based asynchronous pattern?

Hi I want to implement the event-based asynchronous pattern using c#. The Microsoft documentation below is really helpful but quite rightly it leaves out the implementation details. http://msdn.microsoft.com/en-us/library/ms228969.aspx What are my…
5
votes
1 answer

How does websockets maintain persistent connection and how stable it is to be used on live?

I am in need of a event based server where data is pushed to the client readily. As i have read in forums that websocket based servers are my best bet. Please explain it working and how stable is its usuage on production boxes ?
user1594484
4
votes
2 answers

How to make plugin-like web application with PHP?

StackOverflow! I'm looking for a way to make plugin-like (I didn't know how to call it) web application with PHP. With that I meant that I want to make system where user can add/remove plugins (extensions, if you like) via browser (not by adding…
daGrevis
  • 21,014
  • 37
  • 100
  • 139
4
votes
1 answer

Data-Context-Interaction (DCI) and evented programming in javascript

I recently saw the following presentation on DCI by Trygve Reenskaug : https://vimeo.com/43536416 It kinda blew my mind. Mmmh, seeing in code the interaction between different components of a software is an attractive idea. I tried to find…
4
votes
2 answers

Best way to integrate autonomous and reactive behaviour in a Scala actor?

I'm an experienced Java programmer and I'm starting developing actor-based Scala applications. In an application that I'm currently developing I have to deal with the implementation of a Sender actor exhibiting both an autonomous and reactive…
1
2 3 4