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.

324 questions
8
votes
6 answers

Event-driven approach in React?

I'd like to "fire an event" in one component, and let other components "subscribe" to that event and do some work in React. For example, here is a typical React project. I have a model, fetch data from server and several components are rendered with…
glinda93
  • 3,643
  • 2
  • 16
  • 39
8
votes
2 answers

Mediate and share data between different modules

I am just trying to get my head around event driven JS, so please bear with me. There are different kinds of modules within my app. Some just encapsulate data, others manage a part of the DOM. Some modules depend on others, sometimes one module…
Đinh Carabus
  • 2,443
  • 3
  • 17
  • 34
8
votes
1 answer

What a use case for Akka persistent actor?

I'm in mess about the applicability of Akka Persistence, and the persistent actors, when I should use a persistent Actor? Taking for example from a Cart module of a given Shopping Application, will be every user's Cart Session a persistent actor…
8
votes
2 answers

Parallel dispatch of `groupBy` groups in Reactor

I'm learning Reactor, and I'm wondering how to achieve a certain behavior. Let's say I have a stream of incoming messages. Each message is associated with a certain entity and contains some data. interface Message { String getEntityId(); …
Viktor Dahl
  • 1,804
  • 2
  • 23
  • 35
8
votes
4 answers

Stream reasoning / Reactive programming in prolog?

I was wondering if you know of any way to use prolog for stream processing, that is, some kind of reactive programming, or at least to let a query run on a knowledge base that is continuously updated (effectively a stream), and continuously output…
Samuel Lampa
  • 4,146
  • 4
  • 37
  • 62
8
votes
2 answers

What is Event Driven Concurrency?

I am starting to learn Scala and functional programming. I was reading the book !Programming scala: Tackle Multi-Core Complexity on the Java Virtual Machine". Upon the first chapter I've seen the word Event-Driven concurrency and Actor model. Before…
user962206
  • 13,699
  • 56
  • 164
  • 259
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,132
  • 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,872
  • 10
  • 36
  • 47
7
votes
2 answers

Microservices Saga pattern consumer awaits response

I would like to clarify what'd be the best way of organizing architecture. I've got rest api and microservices architecture. I have applied the Database per Service pattern. So let's imagine that the user wants to create an order(an e-commerce…
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,447
  • 1
  • 19
  • 47
7
votes
2 answers

why Redis is single threaded(event driven)

I am trying to understanding basics of Redis. One that that keep coming everywhere is, Redis is single threaded that makes things atomic.But I am unable to imagine how this is working internally.I have below doubt. Don't we design a server Single…
Nishat
  • 711
  • 12
  • 28
7
votes
2 answers

Data Driven vs Event Driven model/architecture?

I heard the terms Data Driven and Event Driven model from different folks in past. I did google but these terms are still vague to me as both of them looks similar to me Data driven programming is a programming model where the data itself controls…
emilly
  • 8,688
  • 25
  • 78
  • 148
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…
tango whiskey double
  • 17,662
  • 15
  • 86
  • 132
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
  • 17,660
  • 30
  • 95
  • 176
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,395
  • 5
  • 41
  • 56
1 2
3
21 22