The Life Cycle of an Event

Similar documents
Dataflow Processing with Events. Melvin E. Conway

Paradise Lost: Almost Nobody Knows What s Really Happening Inside a Modern Software Application

<Insert Picture Here> QCon: London 2009 Data Grid Design Patterns

Interaction Center Business Manager Supervisor Functions

Event-driven Programming: GUIs

Manage Workflows. Workflows and Workflow Actions

UNIT V. Computer Networks [10MCA32] 1

Data Structure using C++ Lecture 04. Data Structures and algorithm analysis in C++ Chapter , 3.2, 3.2.1

13/11/2017. Meltem Özturan misprivate.boun.edu.tr/ozturan/mis515

Unified CCX Outbound Dialer Configuration

Distributed minimum spanning tree problem

Interaction Supervisor Printed Help. PureConnect powered by Customer Interaction Center (CIC) 2018 R2. Abstract

Nonprogrammers Can Build Important Parts of Prototypes

Implement Spanning Tree Protocols-PART-I. LAN Switching and Wireless Chapter 5 Modified by Tony Chen 05/01/2008

Kernel Korner AEM: A Scalable and Native Event Mechanism for Linux

Introduction. If communication is lost, the following message may appear:

Linearizability CMPT 401. Sequential Consistency. Passive Replication

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi

ECE SPRING NOTE; This project has two parts which have different due dates.

PROCESS STATES AND TRANSITIONS:

Rules for the General Communication Process in ILSA Prepared by: Chris Miller Version:.01 Date: 19 February, 2002

Asynchronous Method Calls White Paper VERSION Copyright 2014 Jade Software Corporation Limited. All rights reserved.

(Refer Slide Time: 02.06)

Architectural Design. Topics covered. Architectural Design. Software architecture. Recall the design process

Last Lecture. Lecture 17: Design Patterns (part 2) Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 4448/ Spring Semester, 2005

B. Including the Event Structure within a loop. C. Configuring a Timeout case within the Event Structure

CSE 461. TCP and network congestion

CLAD Sample Exam 06. B. Panel Resize. C. Panel Close? D. Value Change

IP DECT Administrator Guide

Callback Assist InterOp with Avaya Aura Contact Center. Application Note

HP Data Protector Integration with Autonomy IDOL Server

Enterprise Edge Attendant Console User Guide

INTRODUCTION TO VISUAL BASIC 2010

Service Level Agreements

Bob Flegel (Utah) Lamar G. Farquar (Utah) June 1970

CS5412: TRANSACTIONS (I)

Java Concurrency in practice Chapter 9 GUI Applications

RedundancyMaster PTC Inc. All Rights Reserved.

Emerge from the Chaos and Disorder: Tips for Taking Control of

RSA Archer Advanced Workflow Overview & Troubleshooting

Different Ways of Writing Windows Programs

Administrator Guide 1

BasicScript 2.25 User s Guide. May 29, 1996

Technical Manual. KNX/DALI ACTUATOR 1x8 channels Art /70100

Project and Production Management Prof. Arun Kanda Department of Mechanical Engineering Indian Institute of Technology, Delhi

MDC TOUCH Media on Demand Control Controll Interface

Programming, Data Structures and Algorithms Prof. Hema A Murthy Department of Computer Science and Engineering Indian Institute of Technology, Madras

The following pages will detail these changes and allow you to get familiar with the new interface quickly.

Frequently Asked Questions

Database Management System Prof. D. Janakiram Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Technical Manual. DALI GATEWAY Art A

New Feature Highlights

iadt Discussions Socket basics; Socket lifetime issues; Service Responses; Sense a inconsistency IBM TotalStorage Submitted to T10

2012 Microsoft Corporation. All rights reserved. Microsoft, Active Directory, Excel, Lync, Outlook, SharePoint, Silverlight, SQL Server, Windows,

Scheduling Jobs. Activating Bulk Provisioning Service CHAPTER

Programmable Logic Controller Setup Guide

COURSE SYLLABUS ****************************************************************************** YEAR COURSE OFFERED: 2015

MAA3182SC, MAB3091SC INTELLIGENT DISK DRIVES OEM MANUAL

User Scripting April 14, 2018

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

Norstar PC Console 1.1 User Guide

Resolving SMS issues within Pastoral Care

ERX System Overview. The ERX System. This chapter provides information about the system.

CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL

CPS221 Lecture: Threads

Practical 1 Review. ECE Rick

10. Replication. CSEP 545 Transaction Processing Philip A. Bernstein. Copyright 2003 Philip A. Bernstein. Outline

Objectives. 1. Introduction:

PacTracs 2.0 Quick Start Guide

ManifoldCF- End-user Documentation

Compatibility Report. Comtrol IO-Link Master. Microsonic sks-15/cf Proximity Sensor

Module 2, Add on lesson Introduction to the NXT and Mindstorms software. Teacher. 45 minutes

Extending xcom. Chapter Overview of xcom

Distributed Systems Fault Tolerance

Internet Engineering Task Force

Activities Radovan Cervenka

SCSI is often the best choice of bus for high-specification systems. It has many advantages over IDE, these include:

Winford Engineering ETH32 Protocol Reference

Allen-Bradley Replacement

Switch and Status LEDs for System Controller 2

Cisco Unified Communications Domain Manager manual configuration

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

RITIS Training Module 10 Script. To return to the Florida Analytics main page, select Florida Analytics Tools in the upper left corner of the page.

Supplement #56 RSE EXTENSIONS FOR WDSC 5.X

Failure Tolerance. Distributed Systems Santa Clara University

(Refer Slide Time: 06:01)

A Study of the Performance Tradeoffs of a Tape Archive

Allworx User s Guide. (Release 7.3)

ID Features Tested Case Title Description Call Component Flow Status Defects UC802CL.ACE.001 Basic Call Flow Integrate Cisco Application Control

Virtual Communications Express Admin Guide: Configure Call Center

Telepo for Mobile. Copyright Mitel Communications AB

FIRMWARE DOWNLOAD AND ON-BOARD FLASH PROM PROGRAMMING

Presented By: Devarsh Patel

LXM32. Explanation for detected error E 733F. Expert Support Machine Solution

PHY 351/651 LABORATORY 1 Introduction to LabVIEW

Administrative Stuff

Microservice Splitting the Monolith. Software Engineering II Sharif University of Technology MohammadAmin Fazli

Full Website Audit. Conducted by Mathew McCorry. Digimush.co.uk

CS 10, Fall 2015, Professor Prasad Jayanti

Topic 4b: QoS Principles. Chapter 9 Multimedia Networking. Computer Networking: A Top Down Approach

Transcription:

The Life Cycle of an Event The topic here is the behavior of event-driven GUI applications built on the flow object model 1. This paper describes the behavior of these applications in response to user-interface events. What s important to keep in mind is that an eventdriven GUI application is either sitting still doing nothing (that is, every event-aware user-interface projector component is listening for an event) or else the application is busy responding to one user-interface event. The application alternates between these quiescent/busy states, spending almost all of its time in the quiescent state. This paper describes the entire behavior of these applications in terms of the response to one event by one projector component. It combines material from two preceding papers. 2,3 I am treating it as a topic unto itself for these reasons: 1. I find it interesting that the flow object model partitions the application so that its whole activity can be described simply in terms of the event response of a single user-interface component. 2. This paper presents a subsystem communication model that appears to be distinct from Model- View-Controller and could therefore be of general interest. 3. The algorithms described here look more like the solution of a physical constraint network 4 in the presence of a disturbance than objectoriented software. 4. This paper describes the overall eventprocessing design of every event-aware userinterface projector component in terms of a simple state machine. 1 http://melconway.com/home/pdf/pattern.pdf 2 ibid, Update Protocol, p. 13. 3 http://melconway.com/working/wp_9.pdf component computation scheduling algorithm, p. 13-14. 4 I am indebted to the work of Alan Borning on ThingLab. See https://en.wikipedia.org/wiki/thinglab 2018 Melvin E. Conway - 1 - January 2, 2018

The Constraint-resolution View of the Network The figure below shows that every component can be in one of two conditions with respect to whether its output is consistent with its inputs. If the output is consistent with its inputs the component s constraint is said to be satisfied; otherwise it is said to be broken. The environment of the executing application contains the network of connected components; it also contains a callback queue. In this queue is one callback for each component with a broken constraint, and no callback for any component with a satisfied constraint. 5 When all constraints are satisfied, that is, when the output of every component is consistent with its transfer function applied to its inputs, the application is quiescent and the queue is empty. (Part A on the left shows a component with a satisfied constraint and no entry in the queue.) Every component with a broken constraint is matched by one callback in the queue that can cause execution of the component s transfer function. (Part B on the right shows the broken constraint as a dotted arrow and the callback for this component pointing to the transfer function.) Receipt of an event from the User Interface Management System (UIMS) will introduce at least one broken constraint into the quiescent network. This can happen in the projector component that receives the event, or it can happen as the result of executing the Update Protocol, which is triggered by the component receiving the event (see the next section). Upon termination of the Update Protocol the environment will work through the callback queue(s) 5 There are actually three queues; this is an optimization to minimize redundant display refreshes. See http://melconway.com/working/wp_9.pdf page 14. 2018 Melvin E. Conway - 2 - January 2, 2018

from the front, applying each callback (that is, computing its component s transfer functions), and then removing the callback from the queue. After computing its transfer function each component will typically have a new output value. The consequences of this value must immediately be reflected downstream. 6 (I know of two cases that require a push at this point: adding a wire in the tool and changing the selection in a Selector component. 7 Otherwise, the network of dependent endpoints is already in place and all that is required is the notify dependents part of the Update Protocol.) When a downstream component s sink connector receives notice that its value has changed, the component s constraint is then by definition broken, so a new callback might have to be added to the queue. If the component s constraint was previously satisfied 8 its callback is added to the rear of the queue. Its transfer function is not computed at this time. If the component already has a broken constraint, it already has a callback in the queue and nothing is added to the queue. (In one approach the callback is moved to the rear of the queue.) 6 The exception is if there has been no change to the output; whether there is actually a test for that is a component-specific optimization. 7 Whether any other cases exist is an open question. 8 This can be determined either by searching the queue or by keeping a satisfied/broken flag in each component. 2018 Melvin E. Conway - 3 - January 2, 2018

The State-machine Projector Model The life cycle of an event begins and ends with the user-interface projector component that receives the event. The accompanying figure describes the behavior of every event-aware user-interface projector component as a state machine. When it is not busy (this is State 1) the projector is listening for a particular event from the UIMS. Note that Transition 2 3 is the only place where the component s activity is specific to that component s functional definition. State 1. The projector is quietly listening for its particular event from the UIMS. Transition 1 2. The event arrives, moving the projector to state 2. State 2. The beginning of event processing. Transition 2 3. What happens here is specific to the particular projector component. At most, the component will modify data visible to it via one of its connectors. For example, a click in a list box changes its selection index. This causes the projector to obtain the index from the UIMS and assign a corresponding value to the selection instance variable of the SelectedOrderedCollection object at the projector s sink. Or, the enter key in an editable text line sends an event signaling the completion of editing; the projector obtains the new string value from the UIMS and assigns it to the string object at its sink. Note that at the end of this step the user-interface appearance is consistent with the input to the projector. State 3. Standardized behavior begins. The projector inititates the Update Protocol by sending the beginupdate message to the sink connector carrying the object being projected (call it the seed object). 2018 Melvin E. Conway - 4 - January 2, 2018

Transition 3 4. This is the Update Protocol; see reference [9]. From the constraint-network perspective, the equilibrium has been disturbed because a constraint is now broken: the component that owns the seed object has an output that doesn t conform to applying its transfer function to its input because its output was directly modified in transition 2 3. Transition 4 1 will restore the equilibrium. State 4. The projector initiates the Resolution Protocol by sending the resolve message to the environment. Transition 4 1. This is the Resolution Protocol; see reference[10]. Each component in the network with a broken constraint has a callback in a queue whose execution will compute the correct outputs and push them down any connected wires. This might break the constraints of one or more other components, causing one or more callbacks to be queued. Eventually 11 the process will terminate with all queues empty, and the program returns to a quiescent state. 9 http://melconway.com/home/pdf/pattern.pdf page 13. 10 http://melconway.com/working/wp_9.pdf page 13. 11 Absent an illegal cycle in the wiring, which must be checked, probably at the time each wire is added. 2018 Melvin E. Conway - 5 - January 2, 2018