1 / 8

CAN Implementation Sub-project: Content Manager

CAN Implementation Sub-project: Content Manager. Amol Bakshi abakshi@usc.edu CSCI 599 14 October 2002. Role of Content Manager in a CAN. All <key, value> pairs are ultimately stored in a database (such as Microsoft Access) Lookup, Add, and Delete operations access the “target” database

lahela
Download Presentation

CAN Implementation Sub-project: Content Manager

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. CAN Implementation Sub-project:Content Manager Amol Bakshi abakshi@usc.edu CSCI 599 14 October 2002

  2. Role of Content Manager in a CAN • All <key, value> pairs are ultimately stored in a database (such as Microsoft Access) • Lookup, Add, and Delete operations access the “target” database • Content Manager (CM) is a wrapper around the database that executes the operations on the target node

  3. CAN Implementation Proxy CLIENT Message Dispatcher next-node original Communication Engine Content Manager DB Routing Manager

  4. CM Pseudo-code • Invoked by Message Dispatcher with message format • ProcessMsg(byte[] message){ • Check if current node is target node • If it is, access the node database • Perform add/delete/lookup operation on database • Via Comm.Engine, send the result of operation to originating proxy • If not, forward message as-is to routing manager }

  5. Database Access in C#/.NET OleDbConnection cConn = new OleDbConnection(“Provider=Microsoft.Net.OLEDB.4.0;Data Source=c:\\can.mdb”); OleDbCommand cComm = new OleDbCommand(“Select * from can”, cConn); OleDbDataAdapter canDA = new OleDbDataAdapter(); canDA.SelectCommand = cComm; DataSet canDS = new DataSet(“CANdata”); canDA.Fill(canDS, “KeyValInfo”);

  6. CM and Other CAN Components (1) • CM and Proxy • No direct interaction between CM and Proxy • CM of the target node will indirectly contact the originating Proxy with the result of the operation • IP addr and channel ID of Proxy encapsulated in the Message • CM and Comm. Engine (CE) • All communication routed through CE • CM invokes SendMsg of CE to contact original Proxy (described above)

  7. CM and Other CAN Components (2) • CM and Message Dispatcher (MD) • CM provides ProcessMsg interface to MD • CM does not call any service of the MD • CM and Routing Manager (RM) • CM needs to know if the current node is the target node (esp. important for ‘add’ operation) • RM maintains virtual topology and maps to physical topology; hence can provide this information • CM invokes a TargetNode(key) function from RM with a boolean return value

  8. Design Issue: Blocking or Non-Blocking? • Blocking calls within components • Easy to implement • Eventually terminate (at CommEngine?) • e.g. MD -> CM -> RM -> CE • Non-blocking calls • greater throughput • harder to implement • overload CE(?)

More Related