Laserfiche WebLink
<br />Paekets <br /> <br />The PC application, which allows Water Commissioners to enter and retrieve data <br />from the system, sends requests for data to the UNIX server application, receives the <br />data, and displays the data for the user. The PC application does not contain an in- <br />memory directed graph, but relies on tbe grapb managed by the UNIX server applica- <br />tion to perform operations that require knowledge of upstream-downstream relation- <br />ships. <br /> <br />UNIX Server Application <br /> <br />The UNIX server application is primarily a communications package, with the <br />SPWRMS DMIlibrary linked in to provide the functionality of the in-memory graph <br />and database queries. <br /> <br />The main {} loop of the UNIX server application contains an initialization <br />sequence, which builds the in-memory graph through queries to the database, and an <br />iterative loop, which waits for commands from the PC application. When a PC user <br />dials in to the UNIX workstation, an instance of the UNIX server application is initi- <br />ated, which idles waiting for commands from the Pc. <br /> <br />When the UNIX server application receives a command from the PC, it perfonns the <br />requested function and sends a reply. For example, if the command for loading a <br />Water Information Sheet is received, the application loads a sheet from the database <br />for the specified date and water district. The application then sends the contents of the <br />sheet to the Pc. <br /> <br />PC Application <br /> <br />The PC application is primarily a communications package attached to a set of <br />dialogs that manage user operations. The PC application looks much like the main <br />UNIX application and provides almost the same functionality. The PC application <br />retrieves data from SPWRMS via requests to the UNIX server application. <br /> <br />Communications <br /> <br />SPWRMS communicates via ASCII characters. A custom protocol ensures that data <br />is sent and received without missing characters. <br /> <br />After the UNIX server has completed its initialization sequence, all data sent between <br />the PC application and the UNIX workstation is encapsulated into packets and blocks. <br /> <br />A packet is a group of data that contains a single request or data that comprises the <br />response for a single request. For example, a packet would contain the command from <br />the PC to load a Water Information Sheet for a particular water district and date. The <br />sheet transmitted back to the PC would all be in a single packet. <br /> <br />A packet consists of a header and one or more blocks. The header describes the <br />command with which the packet is associated, indicates the number of bytes of data <br />to be transmitted in the packet, and contains a counter which is used when a number <br />of similar pieces of data are contained in the packet. When the receiving end of the <br />communicating pair has received the number of bytes specified in the packet header, a <br />verification string is sent indicating that all data was received successfully. Otherwise, <br /> <br />40 <br />