120 likes | 261 Views
CS775 Fall 2003 Douglas Moore. National Retail Chain Distributed Computing Project Design. National Retail Chain. National HQ. Regional HQ. Regional HQ. Zone HQ. Zone HQ. Retail Store. Retail Store. Retail Store. Retail Store. Information Requirements. Change Price Add Item
E N D
CS775 Fall 2003 Douglas Moore National Retail Chain Distributed Computing Project Design
National Retail Chain National HQ Regional HQ Regional HQ Zone HQ Zone HQ Retail Store Retail Store Retail Store Retail Store
Information Requirements • Change Price • Add Item • Add Inventory • Sales • Remove Item From Inventory • Transfer Items Between Stores • Add Employee • Remove Employee • Query Item • Display Number of Employee • Total Monthly Payroll • Employee Information
Information Flow • National / Regional / Zone • Change Price • Add Item • Remove Item • Item Transfers (Same Zone) • Query Item • Number of Employees • Monthly Payroll • Employee Information
Information Flow • Store • All actions except between store transfers
Data Requirements • Stores must manage: • Item Data (ItemID, ItemDesc, ItemPrice, ItemInStock) • Sales price • Current stock level • Sales for the Current Day, Week, and Month • Employee Data (EmpID, SSN, Name, Sex, Title, EmpBeginDate, Salary) • Employee ID • SSN • Name • Sex (M/F) • Job Title • Employment Begin Date • Annual Salary
System Must Manage • Hierarchical Relationship • National HQ / Regional HQs / Zones / Stores • Add Regions / Zones / Stores • Reassign reporting responsibility for Zones / Stores • System Date (implied by ability to set effective date of price changes)
Proposed System Architecture • Maximize flexibility • All clients send / receive message to / from a message server.. • Each client originating request sends message to message server indicating: • Sender + Sender message # • Intended Recipient • Type of Message (What action / info is requested including args) • Clients poll message server for messages intended for them • Retrieve message • Answer message or redirect as new message from self to next HQ in chain for reply (or action)
Implementation Picture Send Messages Msg Server National Headquarters Retrieve Messages Send Messages Regional Headquarters Retrieve Messages Send Messages Zone Headquarters Retrieve Messages Send Messages Stores (including replicas) Retrieve Messages
Implementation Description • At each business echelon: • An Application that Builds Messages: • All Updates and Queries that the headquarter would send • An Application that Retrieves and Acts upon Messages: • Parse and forward to others (subordinates) for action • or • Perform necessary action and return reply
Message Sever Implementation Interaces include: boolean sendMessage(Message) Insert message in storage container Message getMessage(receiverID) Retrieve message for receiverID boolean setReceived(receiverID, msgNumber) Mark message as received by receiverID Internal functions include: monitoring interval between subsequent queries from receivers
Sample Message Flow National HQ generate query Addressed to Regional HQs Message Server Regional HQ retrieves msg readdresses to its Zone HQs Zone HQ retrieves msg readdresses to its Stores Including replicas Stores retrieve msg And supply answer Sends answer back to Zone HQ Stores retrieve msg And supply answer Sends answer back to Zone HQ