rationale.qbk 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [/
  2. / Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  3. /
  4. / Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. /]
  7. [section:rationale Rationale]
  8. Most programs interact with the outside world in some way, whether it be via a
  9. file, a network, a serial cable, or the console. Sometimes, as is the case with
  10. networking, individual I/O operations can take a long time to complete. This
  11. poses particular challenges to application development.
  12. Boost.Asio provides the tools to manage these long running operations, without
  13. requiring programs to use concurrency models based on threads and explicit
  14. locking.
  15. The Boost.Asio library is intended for programmers using C++ for systems programming,
  16. where access to operating system functionality such as networking is often
  17. required. In particular, Boost.Asio addresses the following goals:
  18. * [*Portability.] The library should support a range of commonly used operating
  19. systems, and provide consistent behaviour across these operating systems.
  20. * [*Scalability.] The library should facilitate the development of network
  21. applications that scale to thousands of concurrent connections. The library
  22. implementation for each operating system should use the mechanism that best
  23. enables this scalability.
  24. * [*Efficiency.] The library should support techniques such as scatter-gather
  25. I/O, and allow programs to minimise data copying.
  26. * [*Model concepts from established APIs, such as BSD sockets.] The
  27. BSD socket API is widely implemented and understood, and is covered in much
  28. literature. Other programming languages often use a similar interface for
  29. networking APIs. As far as is reasonable, Boost.Asio should leverage existing
  30. practice.
  31. * [*Ease of use.] The library should provide a lower entry barrier for new
  32. users by taking a toolkit, rather than framework, approach. That is, it should
  33. try to minimise the up-front investment in time to just learning a few basic
  34. rules and guidelines. After that, a library user should only need to understand
  35. the specific functions that are being used.
  36. * [*Basis for further abstraction.] The library should permit the development
  37. of other libraries that provide higher levels of abstraction. For example,
  38. implementations of commonly used protocols such as HTTP.
  39. Although Boost.Asio started life focused primarily on networking, its concepts of
  40. asynchronous I/O have been extended to include other operating system resources
  41. such as serial ports, file descriptors, and so on.
  42. [endsect]