1 / 34

How to Clean a Slate

How to Clean a Slate. John Day 2006. “There is something fascinating about science. One gets such wholesale returns on conjecture out of such a trifling investment of fact.” - Mark Twain “Life on the Mississippi”. Introduction.

doli
Télécharger la présentation

How to Clean a Slate

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to Clean a Slate John Day 2006 “There is something fascinating about science. One gets such wholesale returns on conjecture out of such a trifling investment of fact.” - Mark Twain “Life on the Mississippi”

  2. Introduction • A lot of talk about Clean Slates • But seems to be a lost technology, lets try to recover it. • Start simple and incrementally introduce new conditions. • Taking Imre Lakatos’ Proofs and Refutations as a model. • We are going to cover ground we all know. • Or at least we think we do. • As we do, think about what is required when • May be interesting: the order is not what you might expect. • But the implications are even more interesting.

  3. Getting Started • To understand why networks are the way they are, lets start with basics and build it up. • This is going to look very simple. • Like everything in CS: it gets more complicated • As we do simple things over and over • What do we need for communication? • Some minimal shared understanding • The applications have to understand each other’s messages. • A medium to carry messages between the two parties. • In operating systems, the mechanism to do this is referred as Interprocess Communication (IPC).

  4. Application Processes A B Application Flow Port Ids IPC Facility 1: Start with the Basics Two applications communicating in the same system. Communication within a Single Processing System

  5. InterProcess Communicationin a Single System • The Application invokes System Calls to talk to another Application • reason := Allocate (dest-appl-name, QoS, port-id) • reason := Read (port-id, buffer-ptr) • reason := Write(port-id, buffer-ptr) • reason := Deallocate (port-id) • IPC creates a channel between the two applications • identified by “port-ids” of local scope. • Port-ids are not only a short identifier for the end of the channel, but also allow an application to distinguish multiple IPC channels. • Serves the same purpose as a file descriptor. • IPC is generally constructed with a shared state mechanism. • Allocates buffers, if sender tries to send too much it is blocked. • A characteristic of IPC is it requires a “test and set” instruction or equivalent.

  6. Application Processes A B Application Flow Port Ids IPC Facility How Does It Work? 1) A invokes IPC to create a channel to B; Allocate (B, b, QoS); 2) IPC determines whether it has the resources to honor the request. 3) If so, IPC allocates port-id a and uses “search rules” to find B anddetermine whether A has access to B. 4) IPC may cause an instance of B to be created. B is notified of the IPC request from A and given a port-id, b. 5) If B responds positively, and IPC notifies A (the API could be blocking in which case the assignment of the port-id, a would be done now). 6) Thru n) Then using system calls A may send PDUs to B by calling Write(a, buf), which B receives by invoking Read(b, read_buffer) 7) When they are done one or both invoke Deallocate with the appropriate parameters

  7. Systems Application Processes IPC-Facility 2: Two Application Communicatingin Distinct Systems

  8. Application Processes Port Ids IAP IAP How Does It Work Now? 1) A invokes IPC to create a channel to B; Allocate (B, a, QoS); 2) IPC determines whether it has the resources to honor the request. 3) If so, IPC uses “search rules” to find B. and determine if A has access to B. • Management of name space is no longer under the control of a single system. • Each system no longer knows all available applications. • Local Access Control can no longer be relied on to provide adequate authorization and authentication. • Need a protocol to carry application names and access control information. • Lets call it the IPC Access Protocol

  9. Op Dest Appl Name Src Appl Name QoS & Policies Capability What Does IAP Look Like? • Simple Request/Response Protocol • IAP-Req(Dest-Appl-name, Src-Appl-name, QoS params, Src-Capability) • IAP-Resp(Dest-Appl-name, Src-Appl-name, QoS params, result) • A little explanation • Include the QoS parameters so that the destination can determine whether it has the resources and the policies to fulfill the request. • The capability is used to determine if A is allowed to access B, • just as it would in an Operating System. • How do we know when to use it? • If the application isn’t here, it must be there! • But we have a problem. How do we get it there?

  10. Getting from A to B • We knew this was going to be a problem sooner or later. • We need to be able to send information from A to B. • And we know: • Bad things can happen to messages in transit. Protection against lost or corrupted messages • This can be expensive • Receiver must be able to tell sender, it is going too fast. We need Flow Control, and • We have lost our means of synchronization: • No common test and set means shared memory can no longer be used • Must create shared state between two systems. An explicit synchronization mechanism is required. • We need some kind of Protocol for Error and Flow Control.

  11. CRC Data Seq # Op CRC Seq # Op Ack CRC Credit Seq # Op What Does an EFCP Look Like? • Symmetric Protocol to establish error and flow control • Transfer PDU • Ack and Flow Control PDU types

  12. Application Processes Port Ids IAP IAP EFCP EFCP How Does It Work Now? 1) A invokes IPC to create a channel to B; Allocate (B, a, QoS); 2) IPC determines whether it has the resources to honor the request. 3) Send IAP Request to access B, creating an EFCP connection and determines if A has access to B. 4) IPC may cause B to be instantiated. B is notified of the IPC request from A and given a port-id, b. 5) If B responds positively, and IPC notifies A with a different port-id, a. 6) Thru n) Then using system calls A may send PDUs to B by calling Write(a, buf), which B receives by invoking Read(b, read_buffer) over the EFCP connection 7) When they are done one or both invoke Deallocate with the appropriate parameters Distributed IPC Facility Just Like Before . . . .More or Less

  13. Summarizing the assumptions that no longer hold • Management of name space is no longer under the control of a single system. • Each system no longer knows all available applications. • Local Access Control can no longer be relied on to provide adequate authorization and authentication. • IPC and the Applications need to be explicitly told about the source. • All resources are no longer under the control of a single system • No common test and set means shared memory can no longer be used: • Must create shared state between two systems. • Explicit synchronization required • Receiver must be able to tell sender, it is going too fast. • We need Flow Control. • Bad things can happen to messages in transit. • Protection against lost or corrupted messages • Otherwise, not much has changed! • At least not for the applications.

  14. Invalidating these Assumptions Required Three New Concepts • An Application Name Space that spans both systems. (not really new) • Should be location-independent in general so that applications can move. • A Protocol to carry Application Names and access control info • Applications need to know with whom they are talking • IPC must know what Application is being requested to be able to find it. • For now, if the requested Application isn’t local, it must in the other system. • A Protocol that provides the IPC Mechanism and does Error and Flow Control. • To maintain shared state about the communication, i.e. synchronization • To detect errors and ensure order • To provide flow control • Resource allocation can be handled for now by either end refusing service.

  15. CRC Data Seq # Op EFCP EFCP EFCP EFCP EFCP EFCP Connection-id Src-port Dest-port 3: Simultaneous Communication Between Two Systemsi.e. multiple applications at the same time • To support this we have multiple instances of the EFCP. • Will have to add the ability in EFCP to distinguish one flow from another. • Typically use the port-ids of the source and destination. Also include the port-ids in the information sent in IAP to be used in EFCP synchronization (establishment).

  16. EFCP EFCP EFCP EFCP EFCP EFCP Mux Mux Simultaneous Communication Between Two Systemsi.e. multiple applications at the same time • In addition to multiple instances of the EFCP. • Will also need an application to manage multiple users of a single resource.

  17. Multiple Instances of IPC • New Concept: a multiplexing application to manage the single resource, the physical media. • The multiplexing application will need to be fast, its functionality should be minimized, i.e. just the scheduling of messages to send. • To provide QoS, we use the EFCP and scheduling by the Mux. • To do resource allocation, we will just let the other side refuse if it can’t satisfy the request. • Application naming gets a bit more complicated than just multiple application-names. • Must allow multiple instances of the same process

  18. Distributed IPC-Process EFCP IAP Mux Physical Media IPC to Support Simultaneous Communication between Two Systems

  19. 4: Communication with N Systems

  20. Replication Entails More Management • Separate Multiplexing Application for each physical media interface. • IPC can find the destination by choosing the appropriate interface. • If enough applications, create a Directory to remember what is where, i.e. what application names are at the other end of which interfaces. • Same local names can be used to keep track of which EFCP-instances (port-ids) are bound to which Multiplexing Application. • With many destinations, may need to coordinate resource allocation information within our distributed IPC Facility.

  21. IAP Dir EFCP EFCP EFCP Mux Mux Mux With Multiple Interfaces It Gets Messy Coordination with Peer Res Alloc • So a task to manage the use of the interfaces and mask any differences. • A little organizing will help. Physical Media

  22. IAP Dir EFCP Mux There is Some Common Structure Coordination with Peer Res Alloc • We can organize interface IPC into modules of similar elements. • Each one constitutes a Distributed IPC Facility of its own. • As required, consists of IAP, EFCP, Multiplexing Application, Directory, Per-Interface Resource Allocation • Then we just need an application to manage their use and moderate user requests. Physical Media

  23. Res Alloc Dir A Little Re-organizing IAP A Virtual IPC Facility? Mux So we have a Distributed IPC Facility for each Interface and an application over all of them to manage their use and to give the user a common interface, a Virtual IPC Facility?

  24. BUT • This fully connected graph approach isn’t going to scale very well and is going to get very expensive. • And not everyone needs to talk to everyone else all the time. • Need to do something better.

  25. 5: Communicating with N Systems(On the Cheap) By dedicating systems to IPC, reduce the number of lines required and even out usage by recognizing that not everyone talks to everyone else the same amount.

  26. Communications on the Cheap • We will need relaying and multiplexing. • That requires some new elements: • Globally accepted names for source and destination muxing apps. • And also for the relays. Relays require names for routing. Have to know where you are to determine where to go next. • Need routing applications too, which will need to exchange information on connectivity. • Will need a header on all PDUs to carry the names for relaying and multiplexing. • Interface IPC Facilities will need one too if they are multiple access. Dest Addr Src Addr Common Relaying and Multiplexing Application Header Relaying Application Routing Media-dependent IPC Processes

  27. EFCP EFCP Relaying Application Relaying PM Communications on the Cheap • But relaying systems create problems too. • Can’t avoid momentary congestion from time-to-time. • Annoying bit errors can occur in their memories. • Will have to have an EFCP operating over the relays to ensure required QoS reliability parameters. • Our virtual IPC Facility isn’t very virtual.

  28. The Big Picture But this is half way between a bead-on-a-string model and a layered model Application Layer Transport Layer Network Layer Data Link Layer Physical Layer This should look familiar.

  29. The IPC Model(A Purely CS View) Distributed IPC Facilities

  30. Conclusions I • “Networking is InterProcess Communication” • . . . . and only IPC. • The quote is Bob Metcalfe, 1972.(The rest is mine.) • A layer is a distributed application that provides IPC consisting of a collection of PDU protetion, muxing, EFCP, and their associated routing and resource management tasks. • And this Distributed IPC Facility repeats. • This constitutes a basis for a general theory of networking. • Starting with a truly clean slate yields some interesting results:

  31. Conclusions II • Notice that the first thing we needed was management. • Then we needed data transfer to do management before we could move user data. • It seems right to split TCP and IP. There are very different functions: • per instance IPC channel • Multiplexing and Relaying • But they aren’t in different layers. They are part of the same IPC Facility. • If it hadn’t been for the PTT wars, we might have realized it earlier. • But we aren’t done with this. Further insights will eliminate IP entirely.

  32. Conclusions III • Addresses are not the names of protocol machines, as application-names are names of applications. • Addresses are identifiers internal to the distributed IPC-Facility to facilitate its operation. • The IPC Processes of a DIF have external application-names. • Application-names and port-ids are the only externally visible identifiers. • Port-ids have only local significance. • The only information an application must and should know to establish communication is the destination application-name and eventually its own port-id. • What about IAP? This so-called IPC Access Protocol. • Never heard of it? In the Internet, it is mostly done by a kludge and a band aid. • Well-known ports and DNS. • Even solves some problems we haven’t considered: • Simpler EFCP and applications that move.

  33. Conclusions IV • Multihoming is accommodated with no special cases or special protocols. • Mobility is simply dynamic multihoming with expected failures. • No special cases or protocols, only somewhat different policies. • A DIF only trusts its lower facility to try to deliver something somewhere. • A repeating structure greatly simplifies management. • And many more “hard” problems are accommodated naturally.

  34. Not Bad for a Subject We All KnewA Nice Little Return on Investment • This is how to clean a slate. • Abstract out the specifics. • Only introduce what has to be introduced. • Initially, separate out each distinct function, and • The Moral of the StoryWe should Practice What We Preach! • Advice to every freshman engineer/scientist. • Never skip steps. You make mistakes when you skip steps. • Like dropping signs or not noticing common structures • Always reduce the algebra before doing the arithmetic. • It will reveal the fundamental structure of the problem.

More Related