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
72
votes
4 answers

What so different about Node.js's event-driven? Can't we do that in ASP.Net's HttpAsyncHandler?

I'm not very experienced in web programming, and I haven't actually coded anything in Node.js yet, just curious about the event-driven approach. It does seems good. The article explains some bad things that could happen when we use a thread-based…
Hendry Ten
  • 1,042
  • 1
  • 9
  • 11
58
votes
10 answers

onclick event function in JavaScript

I have some JavaScript code in an HTML page with a button. I have a function called click() that handles the onClick event of the button. The code for the button is as follows: button text The…
Nate Koppenhaver
  • 1,576
  • 3
  • 19
  • 30
49
votes
7 answers

Writing Maintainable Event-Driven Code

I have just recently started playing with event-driven architectures, coming from a pretty standard object-oriented mindset. The first thing I noticed was that the difficulty in understanding and tracing through programs seems to increase…
47
votes
5 answers

How is reactive programming different than event-driven programming?

I am learning reactive programming and functional reactive programming in JavaScript. I am very confused. Wikipedia says that there are various ways to write reactive code such as imperative, OORP and functional. I want to know if event-driven is…
Narayan Prusty
  • 2,103
  • 3
  • 17
  • 35
43
votes
4 answers

What's the difference between event-driven and asynchronous? Between epoll and AIO?

Event-driven and asynchronous are often used as synonyms. Are there any differences between the two? Also, what is the difference between epoll and aio? How do they fit together? Lastly, I've read many times that AIO in Linux is horribly broken. How…
Continuation
  • 11,664
  • 19
  • 77
  • 102
35
votes
3 answers

What is SEDA (Staged Event Driven Architecture)?

SEDA: An Architecture for Well-Conditioned, Scalable Internet Services "SEDA is an acronym for staged event-driven architecture, and decomposes a complex, event-driven application into a set of stages connected by queues." I understand that it's an…
SEDA
  • 359
  • 1
  • 3
  • 3
30
votes
5 answers

EventMachine vs Node.js

I'm going to develop a collaborative site, and one of the features will be collaborative editing with realtime changes. i.e. when two or more users are editing the same doc, they can see each other changes as soon as they happen. I have some…
Pablo B.
  • 1,813
  • 1
  • 17
  • 27
30
votes
1 answer

What are the differences between event-driven and thread-based server system?

Node.js is an event driven I/O and It's a single threaded server that acts upon callbacks and never blocks on the main thread. But how does it manage to non-blocking I/O? if it does easy to manage, why don't thread-based system manage it? Does not…
erginduran
  • 1,497
  • 4
  • 23
  • 47
30
votes
6 answers

Non-blocking (async) DNS resolving in Java

Is there a clean way to resolve a DNS query (get IP by hostname) in Java asynchronously, in non-blocking way (i.e. state machine, not 1 query = 1 thread - I'd like to run tens of thousands queries simultaneously, but not run tens of thousands of…
GreyCat
  • 15,483
  • 17
  • 70
  • 107
29
votes
5 answers

Good resources to learn about Event Driven Architecture

Looking for books, blogs, web sites or videos. At the moment I am getting a lot of value from the blogs of Udi Dahan and Greg Young, but I was wondering if there are any other experts out there worth listening to?
Codebrain
  • 5,195
  • 4
  • 26
  • 21
27
votes
4 answers

Are there any module that works like django admin in Nodejs?

I am search an admin panel like django’s, why nodejs not have one? could you giveme links o a feedback of the benficts that use this kinds of admins. Is necesary by nodejs??
Dick Van Ocampo
  • 857
  • 2
  • 8
  • 9
21
votes
5 answers

Event-driven Model in C with Sockets

I am really interested in event-driven programming in C especially with sockets so I am going to dedicate some time doing my researches. Let's assume that I want to build a program with much File and Network I/O like a client/server app, basically,…
iNDicator
  • 514
  • 1
  • 6
  • 15
20
votes
4 answers

Pattern to manage views in backbone

Coming from GWT, Backbone seems to miss a built-in solution on how to handle the life-cycle of a view. In GWT, every activity, which is more or less the equivalent to a View in Backbone, is managed by an ActivityManager which calls onStart/onStop on…
Andreas Köberle
  • 88,409
  • 51
  • 246
  • 277
19
votes
8 answers

I want to wait on both a file descriptor and a mutex, what's the recommended way to do this?

I would like to spawn off threads to perform certain tasks, and use a thread-safe queue to communicate with them. I would also like to be doing IO to a variety of file descriptors while I'm waiting. What's the recommended way to accomplish this? Do…
Omnifarious
  • 50,447
  • 15
  • 117
  • 181
19
votes
2 answers

PHP: Am I mixing up event-driven programming with signals-aware interfaces (Signal and Slots / Observer Pattern)?

I've seen a lot of people saying that Symfony2, Zend Framework 2 and others are event-driven. On the desktop world, by event-driven programming I understand that the application will notify its observers whenever its state changes. Since PHP…
Keyne Viana
  • 6,094
  • 2
  • 21
  • 53
1
2 3
21 22