1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Rationale</title> 5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../overview.html" title="Overview"> 9<link rel="prev" href="../overview.html" title="Overview"> 10<link rel="next" href="core.html" title="Core Concepts and Functionality"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 15<td align="center"><a href="../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="../overview.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="core.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="boost_asio.overview.rationale"></a><a class="link" href="rationale.html" title="Rationale">Rationale</a> 28</h3></div></div></div> 29<p> 30 Most programs interact with the outside world in some way, whether it be 31 via a file, a network, a serial cable, or the console. Sometimes, as is the 32 case with networking, individual I/O operations can take a long time to complete. 33 This poses particular challenges to application development. 34 </p> 35<p> 36 Boost.Asio provides the tools to manage these long running operations, without 37 requiring programs to use concurrency models based on threads and explicit 38 locking. 39 </p> 40<p> 41 The Boost.Asio library is intended for programmers using C++ for systems 42 programming, where access to operating system functionality such as networking 43 is often required. In particular, Boost.Asio addresses the following goals: 44 </p> 45<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 46<li class="listitem"> 47 <span class="bold"><strong>Portability.</strong></span> The library should support 48 a range of commonly used operating systems, and provide consistent behaviour 49 across these operating systems. 50 </li> 51<li class="listitem"> 52 <span class="bold"><strong>Scalability.</strong></span> The library should facilitate 53 the development of network applications that scale to thousands of concurrent 54 connections. The library implementation for each operating system should 55 use the mechanism that best enables this scalability. 56 </li> 57<li class="listitem"> 58 <span class="bold"><strong>Efficiency.</strong></span> The library should support 59 techniques such as scatter-gather I/O, and allow programs to minimise 60 data copying. 61 </li> 62<li class="listitem"> 63 <span class="bold"><strong>Model concepts from established APIs, such as BSD 64 sockets.</strong></span> The BSD socket API is widely implemented and understood, 65 and is covered in much literature. Other programming languages often 66 use a similar interface for networking APIs. As far as is reasonable, 67 Boost.Asio should leverage existing practice. 68 </li> 69<li class="listitem"> 70 <span class="bold"><strong>Ease of use.</strong></span> The library should provide 71 a lower entry barrier for new users by taking a toolkit, rather than 72 framework, approach. That is, it should try to minimise the up-front 73 investment in time to just learning a few basic rules and guidelines. 74 After that, a library user should only need to understand the specific 75 functions that are being used. 76 </li> 77<li class="listitem"> 78 <span class="bold"><strong>Basis for further abstraction.</strong></span> The library 79 should permit the development of other libraries that provide higher 80 levels of abstraction. For example, implementations of commonly used 81 protocols such as HTTP. 82 </li> 83</ul></div> 84<p> 85 Although Boost.Asio started life focused primarily on networking, its concepts 86 of asynchronous I/O have been extended to include other operating system 87 resources such as serial ports, file descriptors, and so on. 88 </p> 89</div> 90<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 91<td align="left"></td> 92<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 93 Kohlhoff<p> 94 Distributed under the Boost Software License, Version 1.0. (See accompanying 95 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 96 </p> 97</div></td> 98</tr></table> 99<hr> 100<div class="spirit-nav"> 101<a accesskey="p" href="../overview.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="core.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 102</div> 103</body> 104</html> 105