Jump to content

Talk:Event-driven programming

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

PL/1?!

[edit]

The section on "Exception handlers" talks about PL/1! Why PL/1? It is hardly the programming language to be cited, unless possibly for historical reasons. Todd (talk) 16:52, 13 May 2014 (UTC)[reply]

Proposal for a new subsection on event driven server architecture

[edit]

It would be helpful to discuss server architecture in more detail, given this subject will help ground some of the principles of event driven programming, perhaps drawing on the content from Benjamin Erb thesis, http://berb.github.io/diploma-thesis/community/042_serverarch.html#event

As an alternative to synchronous blocking I/O, the event-driven approach is also common in server architectures. Due to the asynchronous/non-blocking call semantics, other models than the previously outlined thread-per-connection model are needed. A common model is the mapping of a single thread to multiple connections. The thread then handles all occurring events from I/O operations of these connections and requests.

--Nigel V Thomas (talk) 14:49, 19 May 2013 (UTC)[reply]

Ugh

[edit]

This is the worst Wikipedia article I've ever seen. In light of the popularity of node.js, and the increasing importance of this concept, it would be really nice to see a proper article on the subject. Maybe asking too much. Alas.

I'd dispute that node.js is related to the increasing importance of Event-driven programming. At TIBCO software (Teknekron Software Systems at the time) we were we were changing how stock and similar trading systems worked in the early '90s by using combining messaging techniques and event-driven concepts.
As is typical in software engineering, ideas and concepts repeatedly emerge as new and revolutionary and it is wise to look back in history to find why they fell out of favor in the past. IBM probably discovered and experimented with almost all technologies we "discover" nowadays, even if they may not have been widely adopted in the past. In most cases, techniques like event-driven solve some problems that exist with the technology they replace, however, they bring a different set of problems that may not be obvious initially. As usage increases and time passes, folks will start using node.js for problems that are not well matched to event-driven architectures and complexity will increase... until somebody will find a new solution such as distributed work queues or agent pools or...
--Bwhateley (talk) 14:30, 10 February 2018 (UTC)[reply]

Merged all content from Event driven programming language

[edit]

It was on the same subject, but improperly titled. The EDPL page was (IMO) much more informative, so its content is now dominant. This page could be improved by

  1. Better real-world examples of ways to use EDP (I suspect the socket example may be one, but I am not at all versed in the subject.
  2. Linking the description of EDP to the references.

Nate 16:24, 6 December 2006 (UTC)[reply]

Events vs. Threading

[edit]

I think a paragraph in event-driven programming vs. threading would be good, since they are often confused. Anyone? 72.140.200.178 17:56, 16 December 2006 (UTC)[reply]

Event-driven or Event-based?

[edit]

Many people use the term 'event-based', there are also three books which use 'event-based'. Any idea? —Preceding unsigned comment added by 64.62.138.33 (talk) 08:43, August 25, 2007 (UTC)

merger proposal

[edit]

Event in Computing should not be merged with Event Notification (or Event Driven Architecture) as the latter is used only in the enterprise application integration(EAI). A keyboard or mouse event (as given in the Wikipedia example) should not be compared with event that criss cross enterprise systems. (L.Sukumaran - 27-Aug-08).

--- —Preceding unsigned comment added by 203.158.94.82 (talk) 06:45, 27 August 2008 (UTC)[reply]

I don't think that Event Driven Architecture should be the same as event-driven programming.


Absolutely Event Driven Architacture is *not* the same as Event Driven Programming. Event Driven Architacture is a term coined by Gartner to describe enterprise systems where asynchronous business events are a key element of the IT infrastructure. Business events initiate business processes or change the state of currently running processes. EDA is seen as loosely-coupled fine-grained asynchronous events which is complementary to the largely synchronous, request-reply semantics that are common in SOA.


I don't think Event Driven Programming is necessarily the same as Event Driven Architecture - unless you believe that IT architecture is not a valid discipline. Architecture defines the framework and concepts, while programming realises and implements them, but this article does need a rewrite. It needs to be much clearer about what EDA is and cite references Peter Campbell Talk! 00:03, 3 August 2006 (UTC)[reply]


There are various disconnected merger proposals relating to articles in the Category:Event (computing). I think it would be better to focus on tidying up the whole category. --RichardVeryard 08:27, 27 August 2007 (UTC)[reply]

batch programming vs. event-driven

[edit]

Hmm, I wouldn't say event-driven is opposite to batch (although they are mutually exclusive). The not batch is interactive, and not every interactive program is event-driven. For example,

 #include <stdio.h>
 int main() {
    char buf[512];
    printf("What's your name? ");
    if(!fgets(buf, sizeof(buf), stdin)) return 1;
    printf("I'm pleased to meet you, dear %s!\n", buf);
    return 0;
 }

is obviously interactive, but in no way event-driven. DrCroco (talk) 17:28, 29 January 2008 (UTC)[reply]

I concur. This section confuses batch programming with other interactive programming techniques that aren't event driven. I've adjusted the batch sample to no longer be interactive (It no longer reads the keyboard.), but I'm uncertain of the value of the entire section. Perhaps explaining the process order of event driven programming would be better? Mrfelis (talk) 21:31, 19 July 2010 (UTC)[reply]


Actually, I think your example is an excellent illustration of the murkiness of the concept. For instance, user input is collected and the program blocks until an enter keystroke is registered. At the hardware level, what is going on? It's unlikely that the program is polling repeatedly for keystrokes. I'm guessing the hardware is raising an interrupt. This would make the concept of a user pressing the enter key very close to what we mean by "event driven". The key is pressed and an interrupt, which is clearly an event, notifies the process that input is waiting in some sort of buffer. The process receives this message and continues execution. You seem to think of it in terms of a programming paradigm, but I think any program that blocks for user input and doesn't have a polling loop will be event driven at some level. --Morticae (talk) 04:20, 3 November 2009 (UTC)[reply]
Regardless of what the hardware and/or OS is doing, the programmer writing a batch program is still writing a batch program even if the OS is capable of multitasking. When a batch program asks to read data from a device, that program blocks. In an early 90's era PC some devices would notify the Programmable Interrupt Controller (PIC) that data is available. The PIC then generated an interrupt that forced the CPU to jump to an address (probably some place in BIOS unless the device was more exotic - like a sound card or mouse) for handling that would read the data from the device. At this point the OS would unblock the batch program and provide the data from the device.
Some devices were not considered important enough to justify using a hardware interrupt (there were only 15 available) and had to be polled. The joystick that plugged into back of the sound blaster card is an example.
Event driven programs don't block, and the program is free to do other useful work while waiting for some event. Batch programs stop running. This difference is significant. This article needs a lot of clarification before attempting to explain how the multiple levels of a computer system's architecture blur the lines. At this point, explaining this would do more than just further confuse the subject of an already weak article. Mrfelis (talk) 21:31, 19 July 2010 (UTC)[reply]

What do hardware languages have to do?

[edit]

I find this assertion highly dubious:

Hardware description language (like Verilog and VHDL) are essentially multi-threaded programming languages based on an event-driven paradigm

HDLs are not anywhere near to "threaded" programming languages (threads run on a processor connected to a memory stack, while HDLs are directly translated to hardware), and their paradigm is more "continuous" than "event-driven". I think this should be explained with much more clarity for it to stay in the article, otherwise I can't see how event-driven relates to this kind of languages. Diego (talk) 20:51, 16 June 2008 (UTC)[reply]

I have just finished a blog entry, that explains how HDLs outperform the conventional, serial, programming in reaction to state change and would like to defend the assertion. At first, though the programming threads are much "heavier" than the HDL processes, they are known as lightweight process. Secondly, the HDLs, VHDL for sure, do heavily rely on the notion of "event" to drive the processes: one signal change causes change of other signals that depend on it and so on. The simulation goes on as long as there are any events scheduled to simulate. --Javalenok (talk) 10:46, 5 June 2010 (UTC)[reply]
The link in the above comment is now dead. GeneCallahan (talk) 06:01, 9 September 2015 (UTC)[reply]

I would agree that hardware description languages resemble dataflow programming or signal programming (especially in the synchronous sense), but the concept of event-driven programming is less close. Even-driven programming is based on an event queue, which is served asyncronously in a first-come first-severed fasion rather than by parallel processes.Mange01 (talk) 19:45, 5 June 2010 (UTC)[reply]

Take a major HDL, the VHDL. Its semantics is defined for (delta-cycle) simulation. Literally, "The simulation philosophy of VHDL is based on the ordering of events in time: new events are generated as result of actions taken in response to other events scheduled for previous simulation times." The simulation runs until there is at least one event in the queue. This is literal meaning of 'event-driven'. So, the HDL is true (asynchronous) event-driven by nature. Any synchronization is implemented 'on top'. So, despite most of HW might be synchronous, it does not mean that HDLs are. Neither organizing the boolean operators and larger processors into a dataflow network (VHDL "programming" is description of HW circuit indeed rather than explicit event specification) implies the circuit model is evaluated in fashion different from event driven. The article definition requires only program behaviour to be determined by events rather than the programming style. In Java or Delphi, you register the event handlers explicitly. As I mentioned above, this is 'syntactic salt'. Got rid of it, you'll get the sugar, the event-driven friendly HDL dataflow style. --Javalenok (talk) 14:36, 12 October 2010 (UTC)[reply]

"Fertile Ground For Bugs" edit

[edit]

Edits from December 2010 have replaced criticism of Event-driver programming with something that appears rather dubious, or at least extremely unclear.

I'm most bothered by the line "doesn't try to have shared memory problems that can be solved with fancy algorithms," which sounds like pure snark. But I don't know a thing about this subject, so maybe I'm just misunderstanding what it tries to do (or what's being snarked at).

Can somebody please examine the edit, and clarify or revert as necessary? Standback (talk) 07:53, 21 February 2011 (UTC)[reply]

Looking at the edit, I also agree it looks snark. I would suggest moving it back to its original form. Anonymous

It says that "Event-driven programming, widely used in GUI, is bug-prone since (1) It is not thread safe." There are many threads and one GUI (structure) in the program. I have once realized that the threads send messages (events) to a dedicated gui thread instead of modifying the GUI objects directly exactly to make the GUI thread safe. The dubious critics promotes antisense. --Javalenok (talk) 12:14, 19 August 2011 (UTC)[reply]

Poor References with regard to Ripple Effects

[edit]

In the Criticism and best practice section, the links for ripple effects are not helpful. The wikipedia link provides no useful description beyond the barest summary and the article linked to in the reference note only refers to the subject indirectly and implicitly (and never by this name). User:itsbruce —Preceding undated comment added 19:37, 24 September 2012 (UTC)[reply]

Event-Driven Programming and Agents, chapter

[edit]

This link leads me to a general page on the Eiffel language. GeneCallahan (talk) 05:41, 9 September 2015 (UTC)[reply]

[edit]

Hello fellow Wikipedians,

I have just modified one external link on Event-driven programming. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 16:35, 25 September 2017 (UTC)[reply]

Broken Reference

[edit]

This reference appears to be broken: https://wiki.riteme.site/wiki/Event-driven_programming#cite_note-Samek-2

This external source has the same title and author, but the content appears largely redundant with another reference ("State Machines for Event-Driven Systems"): https://www.state-machine.com/doc/Samek0304.pdf — Preceding unsigned comment added by Joee92 (talkcontribs) 20:31, 23 September 2019 (UTC)[reply]

Reference to Petri nets

[edit]

The criticism section of the article presents the use of Petri nets as a solution for problems with event-driven programming.

A solution for this is to use Petri nets.

Reading this section it is not clear to me which of the problems mentioned in the paragraph are solved by Petri nets and how. There is also no source for the claim and the linked Wikipedia article focuses on Petri nets as a mathematical modeling language while the Event-driven programming article is focused on computer programming.

2A02:8388:8C40:800:6CBB:8583:3317:FBB5 (talk) 11:40, 31 May 2021 (UTC)[reply]

That's why I removed the whole paragraph. RolandIllig (talk) 19:25, 15 April 2024 (UTC)[reply]

Missing out on the scientific foundations

[edit]

The article is lacking the foundation on which event-driven programming rests. A History section would be useful. Applicable citations are e.g. the works of Leslie Lamport (Time, Clocks, and the ordering of Events ...), Edward Moore (The Moore state machine), Alan Kay (Message passing) and, ultimately, Albert Einstein. (Einstein is maybe overkill).