Questions tagged [event-driven]

The event-driven paradigm of programming centralizes all waiting for events to one generalized loop that delivers (dispatches) events to registered listeners (event handlers).

The event-driven paradigm of programming centralizes all waiting for events to one generalized loop that delivers (dispatches) events to registered listeners (event handlers). When triggered, the event handlers change the state of the program, sometimes even by de-registering event handlers.

418 questions
8
votes
3 answers

Wait for blocking collection (queue) to decrease in size in C#

I'm working on project with the following workflow: Part One: Event arrives asynchronously and is queued in blocking queue, we'll call that Q1 Thread picks up next available item from that queue Item ends up running {N} number of tasks in…
John Humphreys
  • 37,047
  • 37
  • 155
  • 255
8
votes
2 answers

Why are threads so expensive, that event-driven non-blocking IO is better on benchmarks

I recently started learning about node.js, a javascript library on top of V8 known for its non-blocking IO and incredible speed. To my understanding, node does not wait for IO to respond, but runs an event loop (similar to a game loop) that keeps…
Aurelia
  • 1,052
  • 6
  • 28
7
votes
3 answers

where does node.js fit within the web development context?

I know that node.js is said to be "event-driven I/O" server-side javascript hosted on V8 Javascript engine. I visited the node.js website, and then read the wikipedia entry, but cant quite get the whole idea of where to use it and how it will be…
Benny Tjia
  • 4,853
  • 10
  • 39
  • 48
7
votes
3 answers

Differentiate microservice logic by config or a new service

We have a Data Processing Pipeline where we receive data from different sources. The entire pipeline is implemented by using Event Driven Architecture and microservices. One of the services has three separate tasks. Two of them are completely common…
Ali
  • 1,759
  • 2
  • 32
  • 69
7
votes
1 answer

What tools to use on documenting event schema

Our team is starting to implement event driven designs. We are now figuring what's the best tool/s and practices for documenting the schema of these events. What are the common tools used for this use case? Any links or suggestions is appreciated.
froi
  • 7,268
  • 5
  • 40
  • 78
7
votes
1 answer

How to read large binary files in node js without a blocking loop?

I am trying to learn some basics of event driven programming. So for an exercise I am trying to write a program that reads a large binary file and does something with it but without ever making a blocking call. I have come up with the following: var…
Muhammad Ali
  • 599
  • 1
  • 7
  • 15
6
votes
1 answer

Android smoothScrollTo not invoking onScrollStateChanged

I am using smoothScrollBy() to scroll to a specific position in a ListView. I would like to be notified when the ListView is done scrolling to integrate it with the current onScrollStateChanged() event that is fired off when the user scrolls with…
Tyler
  • 19,113
  • 19
  • 94
  • 151
6
votes
3 answers

are there any simple/example event-driven webservers in C?

There are many example thread based web servers online, but I haven't really seen anything that gives a good example of an event-loop based one (without being very complex, e.g. lighttp and nginx). Are there any? If not, what should I read/look at…
Aaron Yodaiken
  • 19,163
  • 32
  • 103
  • 184
6
votes
1 answer

Why not monolithic event driven architecture?

I have been building event driven micro services. Then, I was wondering, why not event driven monolithic applications. Now the down side would be scalability issues. I would not be able to make replicas for specific traffic intensive domains. But…
Sihoon Kim
  • 1,481
  • 2
  • 13
  • 32
6
votes
2 answers

AWS SNS — How generic should topics be and when should we reuse/create topics?

We are introducing SNS + SQS to handle event production and propagation in our micro services architecture, which has so far relied on HTTPS calls to communicate with each other. We are considering connecting multiple SQS queues onto one SNS topic.…
ragis
  • 93
  • 4
6
votes
1 answer

How can I assure consistency when using an event-carried state transfer approach in Kafka

Let's suppose a simplified scenario like this: There are two Kafka topics, users and orders and three microservices user-service, order-service and shipping-service. When an order is placed through the order service, an OrderCreated event is added…
6
votes
6 answers

Help with event driven TCP server

I'm working on an "application system" , where I also need to make a server application. I'm working in C# (.NET 4.0). The server will mainly collect data from different POS applications / clients (which should be around 50-100, but the server…
Ben
  • 2,435
  • 6
  • 43
  • 57
6
votes
4 answers

Event/Observer Driven Ruby on Rails

I have an application that lends itself to an event/listener model. Several different kinds of data get published (event), then many different things may or may not need to act on that data (listeners). There's no specific order the listeners need…
Drew
  • 15,158
  • 17
  • 68
  • 77
6
votes
2 answers

How is event driven programming implemented?

I was looking on how the twisted and node.js frameworks work and I am trying to understand exactly how the operating system supports I/O operations using callbacks. I understand it's good because we need less threads because we don't need to have…
simao
  • 14,491
  • 9
  • 55
  • 66
6
votes
1 answer

What exactly is the difference between event driven architecture and message driven architecture in The Reactive Manifesto?

I read the Reactive Manifesto . But I could not understand the core differences between event driven architectures and message driven architectures. And as a result, I also could not understand the exact reason behind why the reactive manifesto…
oblivion
  • 5,928
  • 3
  • 34
  • 55