Collaborative Peer-to-Peer Information Sharing

  • Published on

  • View

  • Download

Embed Size (px)


  • 1. Collaborative Peer-to-PeerInformation Sharing Content Query System Tom LendackyIBM Corporation

2. Overview Distributed Peer-to-Peer Information Sharing SystemCommunitiesCollection of related data (i.e. defect data, music, sales)Optional password authentication to control data provider(s)Content SourcesCollection of specific data (i.e. Linux defect data, rock, regional sales)XML MessagesClient Request Interface and Control Interface quot;Pluggablequot; Query EnginesAllows for any type of information to be returnedDefined API's and Input/Output formats (XML) Browser User InterfaceApache/PHP based UIXML results translated to HTMLXML allows for any type of UI 3. Background Initially developed to: Provide easier way to access Linux defect data Currently must go to each web site to query defect data Improve service and support Quicker response Reduce duplicate effort Problem could already be known with a patch in process Problem could already be fixed with patch available But it has many more uses than that... 4. Community CommunityCommunity quot;Aquot; Collection of related informationHost APassword authentication (optional) Host B Controls who can provide information Host CContent Sources (specific information)Multiple Content Sources supportedHost DCan specify the same Content Source multipletimes (i.e.. different information sources)Can specify multiple Content SourcesHost EHost GHost FCommunity quot;Bquot; 5. Community... Community...Uses TCP/IP Sockets for connections between HostsConfigurable maximum connections limitConfigurable AutoConnect capabilityExamines (Announce) messages to find new Hosts to connect toConfigurable Retry capabilityRepeated attempt to connect to quot;Startupquot; connections that are not connectedquot;Startupquot; connectionsAttempt to connect to specific Hosts during CQS startupConnection quot;Listenerquot;Listens for requests from Hosts to connect to the CommunityDedicated connectionsA connection is only used for the Community to which it connectedAccess controlBased upon IP address 6. Community... Community...Handshake used to join CommunityCommunity Name: Verify Community to JoinHost UUID: Verify connection to/from a unique HostOnly 1 Connection per Host allowedUses Host UUID (as opposed to IP address) to allow connections from multiple Hosts on asingle machineAuthentication: SHA-1 message digest value for newly generated UUIDand passwordPassword does not flow in the clearXML messages over connections4 byte header (length of message that follows)XML message 7. Content Source Content SourceCommunity quot;Aquot;Part of a CommunityCollection of specific informationQuery input is standardized Host AUses a Query Engine to interface ContentSources:Host B quot;Aquot;with the information ContentSources: quot;Bquot; and quot;Cquot; Host announces Content Host C Sources ContentSources: quot;Aquot; and quot;Bquot; ANNOUNCE message Host D ContentSources:Name and URI of input form quot;Bquot; Informs other Hosts of Content Sourcesin the Community 8. Content Source... Content SourceSupports multiple Content SourcesBoth identically or uniquely named Identically named Content Sources are processed sequentially 9. XML Messages XML MessagesDefined formatAttributes on tag identify message and purposeUUID: Identifies the message, used to avoid processing duplicate requestsTTL/HOPS: Indicates how many more times the message can be forwarded and how many times it already hasREPLY: Indicates whether this message is a reply (no=forward to all connected Hosts, yes=return to sender)Allows new messages to be created without having to upgrade the HostHost processes message that contain a message-name that is recognizedHost simply forwards/returns messages that are not recognized Three defined messages currentlyANNOUNCE, CONTENT-SOURCES, QUERY-CONTENTReply defined as message-name-REPLYDefined XML query language for QUERY-CONTENTBoth input and output 10. Request Interface Request InterfaceUsed by a Client User InterfaceObtain information from a Host and request a Host to perform an actionUses TCP/IP Sockets for request initiationOne request per socket connectionAccess controlBased upon IP addressFour defined requests currentlyGet Community namesGet Content Source name within a CommunityGet Content Source URI for Content Source within a CommunityStart a query for a Content Source within a CommunityQuery results returned in XML format 11. Control Interface Control Interface Provides some administration information and control Uses TCP/IP Sockets for control initiation One control request per socket connection Access control Based upon IP address Six defined controls currently Get Community names Get Community information Get Community connections (active connections) Get ContentSource names within a Community (locally defined only) Get ContentSource configuration information within a Community Shutdown CQS 12. Query Engines Query Enginesquot;Pluggablequot; interface between Host and informationSpecified on the Content Source configuration statementMODULE: the path/name of the module to load for this Content SourceDATA: Query Engine defined value - supplied to the Query Engine during initializationPossible use as configuration inputMAP: Query Engine defined value - supplied to the Query Engine during initializationPossible use as configuration input Must support define API setFive API'sStartup / Termination related (invoked only once):CQELoad: Invoked during CQS startup just after the Query Engine has been loadedCQEUnload: Invoked during CQS termination just before the Query Engine is unloadedQuery related (invoked as a series of calls each time a query request is received):CQECreate: Invoked to create a new instance of an object that will be responsible for performing the queryCQEQuery: Invoked to perform the queryCQEDestroy: Invoked to cleanup / destroy the instance of the object that performed the query Defined XML format for query languageInput and output 13. Browser User Interface Browser UIApache/PHP basedDefined set of URIs to access the CQS systemhttp://hostname/.../CQSURI to display the startup webpagehttp://hostname/.../CQS/CommunitiesURI to display a webpage of a list of Communities that the Host has joinedhttp://hostname/.../CQS/ContentSources/CommunityURI to display a webpage of a list of Content Sources within the specified Communityhttp://hostname/.../CQS/ContentSource/Community/ContentSource/InputURI to display a webpage of the input form page to submit the query (Refer to documentation on how the form must bedesignedhttp://hostname/.../CQS/ContentSource/Community/ContentSource/QueryURI to initiate the Query request.Results are displayed in table format as they are returned by the participating CQS systemsTranslates XML query results into HTML for presentation on browsers 14. Project Information Open SourceHosted on DeveloperWorks HomePage InformationBuild Information


View more >