Skip to content
Free planNo credit card requiredStart writing

Search 250 million research papers

Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.

About 1,430 papers for “Event-driven programming”

An Introduction to Event-Driven Programming with Twisted

Mark Williams, Cory Benfield, Brian Warner et al. · Apress eBooks · 2018

Twisted is a powerful, well-tested, and mature concurrent networking library and framework. As we’ll see in this book, many projects and individuals have used it to great effect for more than a decade.

Cited by 0

Tasks: Language Support for Event-driven Programming ABSTRACT

Jeffrey Fischer, Rupak Majumdar, Todd Millstein · 2008

The event-driven programming style is pervasive as an efficient method for interacting with the environment. Unfortunately, the event-driven style severely complicates program maintenance and understanding, as it requires each logical flow of control to be fragmented across multiple independent callbacks. We propose tasks as a new programming model for organizing event-driven programs. Tasks are a variant of cooperative multi-threading and allow each logical control flow to be modularized in the traditional manner, including usage of standard control mechanisms like procedures and exceptions. At the same time, by using method annotations, task-based programs can be automatically and modularly translated into efficient event-based code, using a form of continuation passing style (CPS) translation. A linkable scheduler architecture permits tasks to be used in many different contexts. We have instantiated our model as a backward-compatible extension to Java, called TaskJava. We illustrate the benefits of our language through a formalization in an extension to Featherweight Java, and through a case study based on an open-source web server. 1.

Cited by 0

TinyGALS: A Programming Model for Event-Driven Embedded Systems

Elaine Cheong, Judy Liebman, Jie Liu et al. · 2003

Networked embedded systems such as wireless sensor networks are usually designed to be event-driven so that they are reactive and power efficient. Programming embedded systems with multiple reactive tasks is difficult due to the complex nature of managing the concurrency of execution threads and consistency of shared states. This paper describes a globally asynchronous and locally synchronous model (TinyGALS) for programming event-driven embedded systems. Software components are composed locally through synchronous method calls to form modules, and asynchronous message passing is used between modules to separate the flow of control. In addition, a guarded yet synchronous model (TinyGUYS) is designed to allow thread-safe sharing of global state by multiple modules without explicitly passing messages. This programming model is structured such that all asynchronous message passing code and module triggering mechanisms can be automatically generated from a high-level specification. We have implemented the programming model and code generation facilities on a wireless sensor network platform known as the Berkeley motes. As an example, we have redesigned a multi-hop ad hoc communication protocol using the TinyGALS model.

Cited by 0

A Unified Runtime for PGAS and Event-Driven Programming

Sri Raj Paul, Kun Chen, Akihiro Hayashi et al. · 2018

A well-recognized characteristic of extreme scale systems is that their computation bandwidths far exceed their communication bandwidths. PGAS runtimes have proven to be effective in enabling efficient use of communication bandwidth for many applications, due to their efficient support for short non- blocking one-sided messages. However, they were not designed for exploiting the massive levels of intra-node parallelism found in extreme scale systems. Thus, a key question in the use of PGAS runtimes on extreme scale platforms is: what kind of node-level runtime system should be integrated with PGAS runtimes? In this paper, we explore the premise that event-driven intra- node runtimes could be promising candidates for integration with PGAS runtimes, due to their ability to overlap useful computation with background long-latency operations. For this exploration, we use OpenSHMEM as an exemplar of PGAS runtimes, and Node.js as an exemplar of event-driven runtimes. While Node.js may seem an unusual choice for high-performance computing, its prominent role as an event-driven runtime for server-side Javascript is a good match for what we need for optimizing the use of communication bandwidth. At the same time, the availability of excess computation bandwidth in extreme scale systems can help mitigate the local computation overheads of Javascript relative to native languages such as C++. Further, since the Node.js environment is single-threaded, we get an automatic guarantee that no data races will occur on Javascript objects, a guarantee that we cannot get with C++. Our integration of Open- SHMEM and Node.js makes it possible to expose nonblocking PGAS operations as JavaScript constructs that can seamlessly be used with the JavaScript asynchronous mechanisms, such as those based on promises. We believe that the exploration and preliminary results in this paper offer a new direction for future research on building high productivity runtimes for extreme scale systems.

Cited by 3

Model-based, event-driven programming paradigm for interactive web applications

Aleksandar Milićević, Daniel Jackson, Milos Gligoric et al. · 2013

Applications are increasingly distributed and event-driven. Advances in web frameworks have made it easier to program standalone servers and their clients, but these applications remain hard to write. A model-based programming paradigm is proposed that allows a programmer to represent a distributed application as if it were a simple sequential program, with atomic actions updating a single, shared global state. A runtime environment executes the program on a collection of clients and servers, automatically handling (and hiding from the programmer) complications such as network communication (including server push), serialization, concurrency and races, persistent storage of data, and queuing and coordination of events.

Cited by 19Open access

Concurrent event-driven programming in occam-π for the Arduino

Christian L. Jacobsen, Matthew C. Jadud, Ömer Kılıç et al. · Research at the University of Copenhagen (University of Copenhagen) · 2011

The success of the Arduino platform has made embedded programming widely accessible. The Arduino has seen many uses, for example in rapid prototyping, hobby projects, and in art installations. Arduino users are often not experienced embedded programmers however, and writing correct software for embedded devices can be challenging. This is especially true if the software needs to use interrupts in order to interface with attached devices. Insight and careful discipline are required to avoid introducing race hazards when using interrupt routines. Instead of programming the Arduino in C or C++ as is the custom, we propose using occam-pi as a language as that can help the user manage the concurrency introduced when using interrupts and help in the creation of modular, well-designed programs. This paper will introduce the Arduino, the software that enables us to run occam-pi on it, and a case study of an environmental sensor used in an Environmental Science course.

Cited by 3

Event-driven Programming can be Simple Enough for CS 1

Kim B. Bruce, Andrea Danyluk, Thomas P. Murtagh · 2001

We have recently designed a CS 1 course that integrates event-driven programming from the very start. Our experience teaching this course runs counter to the prevailing sense that these techniques would add complexity to the content of CS 1. Instead, we found that they were simple to present and that they also simplified the presentation of other material in the course. In this paper, we explain the approach we used to introduce event-driven methods and discuss the factors underlying our success. 1 Introduction We recently implemented a major update of our CS 1 course. The new version of the course is based on Java (replacing Pascal), takes an objects-first approach, uses labs incorporating graphics, and introduces event-driven programming techniques including threads quite early in the course. Our decision to introduce our students to GUI programming and to use event-driven techniques was influenced by two arguments. The first, expressed by Culwin and others [2, 8, 10], is that "ou...

Cited by 3

Protothreads: Simplifying event-driven programming of memory-constrained embedded systems

Adam Dunkels, Oliver Schmidt, Thiemo Voigt et al. · 2006

Event-driven programming is a popular model for writing programs for tiny embedded systems and sensor network nodes. While event-driven programming can keep the memory overhead down, it enforces a state machine programming style which makes many programs difficult to write, maintain, and debug. We present a novel programming abstraction called protothreads that makes it possible to write eventdriven programs in a thread-like style, with a memory overhead of only two bytes per protothread. We show that protothreads significantly reduce the complexity of a number of widely used programs previously written with event-driven state machines. For the examined programs the majority of the state machines could be entirely removed. In the other cases the number of states and transitions was drastically decreased. With protothreads the number of lines of code was reduced by one third. The execution time overhead of protothreads is on the order of a few processor cycles.

Cited by 0

Implementation of autonomous vehicle navigation algorithms using event-driven programming

Abu Bakar Sayuti Saman, Patrick Sebastian, Nadhira Abdul Malek et al. · 2012

Autonomous navigation is an important feature in robotics as it provides mobile robot with the ability to traverse from one point to another point while avoiding any obstacles that lie within its path. One of the challenges is to reduce the complexity of the development of programs that can provide the pertaining artificial intelligence. The objective of this paper is to describe the implementation of autonomous navigation through the use of event-driven programming technique which was based on finite state machines (FSM). By using FSM to describe the behaviour of a navigating mobile robot, an equivalent algorithm can be developed. The algorithm can be relatively easy translated to a suitable program with event-driven programming technique. Two types of navigation, maze navigation and grid following; were implemented by persons with minimum to intermediate programming skill; exhibiting the flexibility and ease of implementation of this technique.

Cited by 2

Event-Driven Programming of FPGA-accelerated ROS 2 Robotics Applications

Christian Lienen, Marco Platzner · 2022 25th Euromicro Conference on Digital System Design (DSD) · 2022

Many applications from the robotics domain can benefit from FPGA acceleration. A corresponding key question is not only how to integrate hardware accelerators into software-centric robotics programming environments but also how to integrate more advanced approaches like dynamic partial reconfiguration. Recently, several approaches have demonstrated hardware acceleration for the robot operating system (ROS), the dominant programming environment in robotics. ROS is a middleware layer that features the composition of complex robotics applications as a set of nodes that communicate via mechanisms such as publish/subscribe, and distributes them over several compute platforms. In this paper, we present a novel approach for event-based programming of robotics applications that leverages dynamic partial reconfiguration and ReconROS, a framework for flexibly mapping ROS 2 nodes to either software or reconfigurable hardware. The approach bases on the ReconROS executor that schedules callbacks of ROS 2 nodes and utilizes a reconfigurable slot model and partial runtime reconfiguration to load hardware-based callbacks on demand. We describe the ReconROS executor approach, give design examples, and experimentally evaluate its functionality with examples.

Cited by 2