home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / p2p-ap.zip / P2P-AP.TXT
Text File  |  1994-03-27  |  18KB  |  367 lines

  1.  
  2.                IBM Person to Person: application programming
  3.                             interface overview
  4.  
  5. This document provides an overview of the Person-to-Person application
  6. programming interface architecture.  There is no implication that all of
  7. the features described in this architecture will be implemented in a future
  8. release.
  9.  
  10. Introduction
  11. ____________
  12.  
  13. Personal computers are now widespread throughout the business community and
  14. many are able to intercommunicate, either through fixed connections e.g.
  15. local area networks, or through dynamically established links e.g.  ISDN or
  16. async lines over the public switched telephone network.  Increasingly,
  17. these connected personal computers can be used to enhance collaborative
  18. working between remote individuals; a typical example being the use of desk
  19. top conferencing software.  Successful collaborative work generally
  20. requires more than a simple data link between the participants; voice
  21. capabilities are normally essential and video links are frequently
  22. required.  Thus remote collaborative working can often be regarded as an
  23. extension to the traditional telephone call - it being enhanced with the
  24. data and programs available at the desktop via the personal computer - and,
  25. on occasions, enriched with video services.
  26.  
  27. A broad spectrum of collaborative applications can be written, ranging from
  28. utilities taking advantage of the data and applications on a workstations,
  29. e.g.  sharing of application windows, through to new collaborative
  30. applications designed to meet the needs of specific classes of remote user
  31. e.g.  help desk.  The common requirements behind these examples are:
  32.  
  33. *       support of a wide variety of personal computer platforms - both
  34.         hardware and software.
  35.  
  36. *       operation over the existing communication networks.
  37.  
  38. *       group communications and multi-media data services.
  39.  
  40. Five important interfaces exist in the Person-to-Person (P2P) architecture:
  41.  
  42. *       The application programming interface allows applications to
  43.         request P2P services.
  44.  
  45. *       The device driver interface allows P2P to support an extensible
  46.         range of software and hardware communications sub-systems.
  47.  
  48. *       The resources interface through which P2P requests details of the
  49.         communications network, such as node addresses and directory data.
  50.  
  51. *       The P2P data stream, which is the information transmitted over the
  52.         physical network, as a consequence of application calls through the
  53.         API.
  54.  
  55. *       The command level interface, which gives access to call manager and
  56.         application functions.
  57.  
  58. The P2P architecture offers these capabilities:
  59.  
  60. *       applications can start the execution of other local and remote
  61.         applications, and then share their combined resources.
  62.  
  63. *       applications can define logical communications channels between
  64.         themselves, suitable for a broad range of multi-media traffic,
  65.         independently of the underlying physical communications network.
  66.  
  67. *       communications traffic may be:
  68.  
  69. *       serialised so that the same data sequence is received by all
  70.         applications.
  71.  
  72. *       synchronised with other communications traffic.
  73.  
  74. *       merged so that multiple sources of data can be combined.
  75.  
  76. *       copied to multiple destinations.
  77.  
  78. *       a range of attached workstation devices are supported to allow
  79.         the interception and redirection of data, both from devices and
  80.         from other applications.
  81.  
  82.  
  83. Major elements of the Person-to-Person API model
  84. ________________________________________________
  85.  
  86.  
  87. Network, nodes and applications
  88. ===============================
  89.  
  90. At the highest level, the architectural model is a communicating set of
  91. nodes.  A node is a computer, typically a workstation capable of
  92. communicating with its peers.  A P2P node is one where the P2P software
  93. support is being executed.  A collection of inter- communicating P2P nodes
  94. is a P2P network.  It is fundamental to the architecture that a node can
  95. dynamically join or leave the network.
  96.  
  97. Nodes can have associated devices.  A device is a piece of equipment, a
  98. computer or a program that is communicating with a P2P node but is not
  99. running the P2P software.  Devices are normally controlled by their P2P
  100. node and frequently supply or receive data to/from that node.  There is an
  101. extensive range of possible P2P devices including:  printers, disk drives,
  102. modems, codecs, multi-point control units and application programs.
  103.  
  104. Multiple applications can be executed at a P2P node, subject to the
  105. constraints imposed there by the operating system and windowing system.
  106. Applications are either aware or unaware; an aware application uses the
  107. services of the P2P API.
  108.  
  109. When P2P is active at a node one particular aware application must be
  110. running there.  This application plays a unique role at that node and is
  111. known as the call manager.  Many call managers may be available for
  112. execution at a particular node but only one can execute at a time.  The
  113. distinguishing feature of the call manager is that it handles resource
  114. management for the node and resolves any requests that are not directed
  115. specifically at an instance of an application.  Call manager responsibility
  116. can be passed from one call manager to another; also the role can be
  117. subsumed into an arbitrary P2P application if that is appropriate.
  118.  
  119. Aware applications can share data and resources with other aware
  120. applications at the same or different nodes.  The application initiates a
  121. share request, which is processed at the destination node.  The call
  122. manager there can accept, reject or transfer the request; accept means that
  123. the call manager will handle the sharing itself, eitheter directly or by
  124. launching an application, or by sharing with an existing instance of an
  125. application; transfer means that it will transfer the request to a remote
  126. call manager.  This sharing mechanism can be cascaded, such that if two
  127. applications are already sharing, one of them can initiate a share with a
  128. third application.  The consequence of this is that all three applications
  129. are then sharing with each other.  Applications may make share requests on
  130. behalf of other applications.  A named collection of applications sharing
  131. is called a sharing set.  Applications can cease sharing at any time.
  132.  
  133. Communications, channels and ports
  134. ==================================
  135.  
  136. Applications in a sharing set can establish data communication links with
  137. each other known as channels.  Channels are logically dedicated and
  138. uni-directional.  A channel is always defined by the sending application
  139. and it goes from the sending application to one or more receiving
  140. applications.  The ends of channels are known as ports.  A sending port
  141. sends data down the channel; a receiving port receives data from the
  142. channel.  There is no direct mapping between the logical channel structure
  143. seen by the aware applications and the physical communication network in
  144. existence between the nodes.
  145.  
  146. An application may establish many channels to another application as a
  147. convenient way to communicate different kinds of data.  P2P may map some or
  148. all of the logical channels on to a single physical link but this will be
  149. invisible to the application.  Channels have a number of quality of service
  150. characteristics which are negotiated during the creation process to allow
  151. data transmission capabilities to be tailored to the expected traffic;
  152. these include throughput, latency, jitter and other parameter.  These
  153. mechanisms allow suitable video channels, voice channels and other
  154. specialised data channels to be established.
  155.  
  156. Four types of channel are supported:  standard, merged, synchronous and
  157. serialised.  Standard channels are the default case; the other types
  158. describe the properties of collections of channels known as channel sets.
  159. Through a merged channel set data is combined from multiple channels and
  160. delivered to an application through a single port at each destination.
  161. Through a serialising channel set data is combined from different channels,
  162. serialised, and delivered to each application such that each receiving port
  163. sees the same sequence of data.  Through a synchronising channel set data
  164. is synchronised, so that data on separate channels is tied together in time
  165. (as is required for the synchronisation of voice and video), but delivered
  166. through the individual ports belonging to the channels.
  167.  
  168. Ports can be connected together to establish extended communication links,
  169. so that an application may route its inputs through to another application
  170. for processing.  When ports are connected in this way no further
  171. application involvement is required after the routing has been established.
  172. This allows the streaming of data between applications and devices.
  173. Connected ports can also be welded, so that the connection is permanent and
  174. persists even when the local application has terminated.
  175.  
  176. Event, command and null ports are provided; event ports generate an event
  177. when data is either available or is required; command ports read or write
  178. data to/from a buffer, and the application has the responsibility of
  179. filling or emptying this buffer; null ports are a special case reserved for
  180. ports that are unable to supply data.  Ports can be controlled through
  181. commands sent to the port event handler, for example, rewind or pause to a
  182. tape drive.
  183.  
  184. An alternative method of application inter-communication, avoiding the use
  185. of ports and channels, is provided for application control data.
  186.  
  187. One characteristic of ports is that they are associated with a data class
  188. and compression hints.  The data class describes the kind of data, e.g.
  189. voice, video, file, interactive, that is sent by a sending port down the
  190. channel, or to be received via a receiving port.  Compression hints allow
  191. data compression during transmission, without impacting applications.
  192.  
  193. Devices
  194. =======
  195.  
  196. Devices are supported by the P2P architecture; these include:  disk drive,
  197. system clipboard, telephone, audio, video, printer and window; further
  198. devices may be defined.  Devices can be opened by an application; the
  199. process of opening a device creates a port to or from that device.  A
  200. device may be opened more than once to have multiple ports if appropriate;
  201. thus a disk drive device can have both a sending and a receiving port.
  202.  
  203. Resource management
  204. ===================
  205.  
  206. Collaborative working frequently requires that resources owned by a node,
  207. for example a printer device, can be shared with other nodes.  Such
  208. resources are considered to be global resources and access is controlled
  209. through global tokens.  Other resources are owned by application, for
  210. example a shared pointer, and access to these is managed through
  211. application tokens.
  212.  
  213. Applications are expected to know the location of a globally available
  214. resource that they require, and therefore facilities for the broadcasting
  215. of availability information are not provided.  Instead, the call manager at
  216. the node with the global resource is responsible for resource management.
  217. Global tokens may be held by an application instance on an exclusive or
  218. shared basis; token ownership may not be transferred.  Requests for a
  219. global token may be queued, with the queue being held above the API and
  220. managed by the node call manager.  Access to global tokens is not
  221. restricted to a sharing application set.
  222.  
  223. Management of application resources may be performed by any application in
  224. the sharing set.  Application tokens may be held on an exclusive or shared
  225. basis and requests for tokens queued, with the queue being held above the
  226. API, and managed by the current application token owner.
  227.  
  228. Other networks
  229. ==============
  230.  
  231. Private analogue networks
  232. -------------------------
  233.  
  234. The P2P architecture supports analogue communications in a very similar way
  235. to digital communications, in those situations where:
  236.  
  237. *       analogue links exist between P2P nodes.
  238.  
  239. *       connectivity and routing at each node can be controlled by P2P at
  240.         that node.
  241.  
  242. *       a digital control channel exists between the nodes.
  243.  
  244. Analogue channels are logically dedicated uni-directional communication
  245. links established by the sending application, and they may terminate in
  246. more than one receiving application.  They may be distinguished from
  247. digital channels by their data class.  Only standard or merged channels may
  248. be established; serialising and synchronising channel sets are not
  249. permitted.
  250.  
  251. Devices can present analogue ports when opened; thus a video player device
  252. can be used as a source of analogue video and may be connected to an
  253. analogue channel through a P2P command.  The direct connection of analogue
  254. and digital channels is not permitted; however certain devices e.g.  a
  255. codec device provide both analogue and digital ports when opened and can be
  256. used to effect such a coupling.
  257.  
  258. Switched digital networks
  259. -------------------------
  260.  
  261. Switched digital networks can be used by P2P for inter-node communication
  262. without exposing the switched nature of the connection.
  263.  
  264. Equipment, such as digital telephones, attached to a switched network, are
  265. accessed by applications as P2P devices.  Thus an ISDN phone device may be
  266. opened to present receiving and sending ports, with an associated event or
  267. command connect type; dialling, and other control functions, are
  268. implemented through port commands.  Third party connection between digital
  269. telephone equipment is similarly affected through commands to an
  270. appropriate device; this may be physically implented through commands to
  271. the local switch.
  272.  
  273. Public switched analogue networks
  274. ---------------------------------
  275.  
  276. Analogue telephones and other equipment, attached to the public switched
  277. network, are controlled by applications through P2P devices.  A PSTN
  278. telephone can be opened to present a P2P port, with a null connect type
  279. i.e.  it cannot supply or receive data from a P2P application.  Port
  280. commands are used to control the device.  First party connection can be
  281. implemented through a modem injecting dialling tones into the local line;
  282. third party connection, and multi-way calls through commands to the local
  283. switch.  The functionality of the IBM CallPath services architecture will
  284. be made available, where appropriate, through P2P, for call centre and
  285. related applications
  286.  
  287. Interfacing to P2P-unaware applications
  288. =======================================
  289.  
  290. The P2P architecture provides facilities which allow unaware applications
  291. to be used for collaborative working.  A P2P-aware application supplies the
  292. user interface dialogue and interacts with the particular unaware
  293. application via Lakes devices.  This same aware application then
  294. communicates with a related aware application at the remote node to pass
  295. the information to the remote user.
  296.  
  297. Other facilities
  298. ================
  299.  
  300. User exits and function hooks are provided to ease programming and
  301. debugging.  All ports can be associated with a user exit to monitor data
  302. traffic or process data.  All functions, including calls and events, can be
  303. hooked and passed to an application supplied event handler.  Additionally,
  304. a full set of queries are provided, so that applications need not keep
  305. track of status at their node, nor of the applications being shared.
  306. Application program debugging is assisted through allowing collaborative
  307. applications to be shared at a single node; thus avoiding physical networks
  308. being involved during initial program development.
  309.  
  310. Application development
  311. =======================
  312.  
  313. The architecture helps collaborative application development and encourages
  314. inter- working through:
  315.  
  316. *       an application programming interface providing group
  317.         communications, data transmission and streaming, and application
  318.         sharing; independently of the underlying system platforms or
  319.         communication network.
  320.  
  321. *       pre-defined devices to allow easy access to data sources and
  322.         destinations; these also simplify interfacing to existing unaware
  323.         applications.
  324.  
  325. *       data stream support:
  326.  
  327. *       self-identifying, industry standard data streams.
  328.  
  329. *       new architected data streams for keystrokes, pointers, window
  330.         updates, DDE and clipboard.
  331.  
  332. Standards
  333. =========
  334.  
  335. The P2P architecture is designed to:
  336.  
  337. *       maximise inter-working between different computer platforms.
  338.  
  339. *       operate over varied communications networks.
  340.  
  341. *       support relevant communication and data standards.
  342.  
  343. The separation of data traffic into logical uni-directional flows of
  344. homogeneous data, simplifies the mapping on to a mixed network and allows
  345. the use of multiple physical links, of different capabilities, between the
  346. nodes.  Data multiplexing is handled below the application and can be
  347. implemented in different ways depending upon the underlying transport
  348. mechanism.
  349.  
  350. The separate logical data paths, with their associated data types, ease
  351. inter-application operation because the data components are presented
  352. individually, with their nature and format independently available.
  353. Through this mechanism, a wide range of existing standards for voice,
  354. video, image, file transfer, and coded data can be supported, with the
  355. potential for data conversions in the network.  P2P also provides a
  356. separate data class for the interactive objects commonly used in
  357. collaborative applications, such as remote pointers, cursors and gestures.
  358. These are architected so that shared chalkboards, editors and similar
  359. applications can inter-operate, even though provided by different
  360. manufacturers.
  361.  
  362. Further Information
  363. ===================
  364.  
  365. For further information on the P2P architecture, please post to the
  366. Person to Person section of IBM PSP Products A Forum (GO IBMP2P).
  367.