Asynchrony (computer programming): Difference between revisions

Content deleted Content added
ref
See also: add portal
 
(48 intermediate revisions by 37 users not shown)
Line 1:
{{Short description|Computer programming technique}}
<!-- DO NOT ADD DISAMBIGUATION TAGS TO THIS PAGE (per [[WP:INCOMPDAB]] and [[WP:DABCONCEPT]]) -->
'''Asynchrony''', in [[computer programming]], refers to the occurrence of events independent of the main [[control flow|program flow]] and ways to deal with such events. These may be "outside" events such as the arrival of [[Unix signal|signals]], or actions instigated by a program that take place [[concurrent computing|concurrently]] with program execution, without the program [[hang (computing)|hanging]] to wait for results.<ref name="davies">{{cite book |title=Async in C# 5.0 |first=Alex |last=Davies |publisher=O'Reilly |year=2012 |pages=1–2 |isbn=9781449337124 |url=https://books.google.com/books?id=xT45qhFrVnUC}}</ref> [[Asynchronous I/O|Asynchronous input/output]] is an example of the latter case of asynchrony, and lets programs issue commands to storage or network devices that service these requests while the [[Central processing unit|processor]] continues executing the program. Doing so provides a degree of [[Concurrency_(computer_science)|concurrency]].{{r|davies}}
'''Asynchrony''', in [[computer programming]], is the occurrence of asynchronous events, which are those occurring independently of the main program flow. Asynchronous actions are actions executed in a [[Non-blocking algorithm|non-blocking]] scheme, allowing the main program flow to continue processing.<ref>[http://msdn2.microsoft.com/en-us/library/7ch3stsw.aspx Microsoft documentation describing ''asynchronous message processing''. Accessed on 09-09-2007.]</ref> Asynchrony in computing and computer programming occur in [[concurrent computing]], while asynchronous function calls occur in [[futures and promises]].
 
A common way for dealing with asynchrony in a [[application programming interface|programming interface]] is to provide [[subroutine]]s that return a [[futures and promises|future or promise]] that represents the ongoing operation, and a synchronizing operation that [[Blocking (computing)|blocks]] until the future or promise is completed. Some programming languages, such as [[Cilk]], have special syntax for expressing an asynchronous procedure call.<ref name="spp">{{cite book |first1=Michael |last1=McCool |first2=James |last2=Reinders |first3=Arch |last3=Robison |title=Structured Parallel Programming: Patterns for Efficient Computation |publisher=Elsevier |year=2013 |pages=30}}</ref>
Examples include:
 
* [[Asynchronous I/O]], a form of input/output processing that permits other processing to continue before the transmission has finished. "[[Ajax (programming)|Ajax]]", short for "asynchronous [[JavaScript]] and [[XML]]")<ref>http://shiflett.org/blog/2007/apr/ajax-is-not-an-acronym</ref><ref>https://blogs.oracle.com/arungupta/entry/ajax_vs_ajax_ajax_ofcourse</ref><ref name="garrett">{{cite web
Examples of asynchrony include the following:
| url=http://www.adaptivepath.com/ideas/essays/archives/000385.php
* [[Asynchronous procedure call]], a method to run a procedure concurrently, a lightweight alternative to [[Thread_(computing)|threads]].
| title=Ajax: A New Approach to Web Applications
|* archivedate=2[[Ajax July 2008}}</ref>(programming)|Ajax]] is a set of [[web developmentclient-side]] techniques utilizing many[[web development|web technologies]] used onby the [[client-side]] to create asynchronous I/O [[Webweb application]]s.
| publisher=AdaptivePath.com
* '''Asynchronous method dispatch''' (AMD), a [[data communication]] method used when there is a need for the server side to handle a large number of long lasting client requests.<ref>[https://web.archive.org/web/20130721031512/http://zeroc.com/doc/Ice-3.3.0/manual/Overview.3.2.html ICE usage of AMD].</ref> Using synchronous method dispatch (SMD), this scenario may turn the server into an unavailable busy state resulting in a connection failure response caused by a [[Computer network|network]] connection request [[Timeout (computing)|timeout]]. The servicing of a client request is immediately dispatched to an available [[thread (computer science)|thread]] from a [[Thread pool pattern|pool of threads]] and the client is put in a blocking state. Upon the completion of the task, the server is notified by a callback. The server unblocks the client and transmits the response back to the client. In case of thread [[Starvation_(computer_science)|starvation]], clients are blocked waiting for threads to become available.
| author=Jesse James Garrett
 
| date=18 February 2005
==See also==
| accessdate=19 June 2008
{{Portal|Computer programming}}
| archiveurl=https://web.archive.org/web/20080702075113/http://www.adaptivepath.com/ideas/essays/archives/000385.php
* [[Asynchronous system]]
| archivedate=2 July 2008}}</ref> is a set of [[web development]] techniques utilizing many web technologies used on the [[client-side]] to create asynchronous I/O [[Web application]]s.
* [[Asynchronous circuit]]
* [[Asynchronous method dispatch]] (AMD), a data communication method used when there is a need for the server side to handle a large number of long lasting client requests.<ref>[https://web.archive.org/web/20130721031512/http://zeroc.com/doc/Ice-3.3.0/manual/Overview.3.2.html ICE usage of AMD].</ref>
 
==References==
{{reflist}}
 
[[Category:Computer programming]]
[[Category:Inter-process communication]]
[[Category:Middleware]]
 
 
{{computingcomp-sci-stub}}
<!-- DO NOT ADD DISAMBIGUATION TAGS TO THIS PAGE (per [[WP:INCOMPDAB]] and [[WP:DABCONCEPT]]) -->