Osrf msg life_cycle
Upcoming SlideShare
Loading in...5
×
 

Osrf msg life_cycle

on

  • 884 views

 

Statistics

Views

Total Views
884
Views on SlideShare
882
Embed Views
2

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Osrf msg life_cycle Osrf msg life_cycle Presentation Transcript

  • Life Cycle of an OSRF Message
    • OSRF: middleware for RPC
    • Defining “client” and “server”
    • Jabber as core of OSRF network
    • Message stanzas: XML with JSON payload
    • Routing through the router
    • Bypassing the router
  • Defining Terms: Server and Client Client: Server: A software process, or collection of closely related processes, running within an operating system. The same. A server performs services at the request of clients. Software, not hardware.
  • Client and Server as Defined by Socket Calls Client: send() sendto() write() recv() recvfrom() read() recv() recvfrom() read() send() sendto() write() listen() accept() Server:
  • Jabber server OSRF Network router Client
  • Jabber Message Stanza <message from=”...” to=”...”> <body> ... </body> </message> Jabber ID: username@domain/resource OSRF messages:
    • REQUEST
    • RESULT
    • STATUS
    • CONNECT
    • DISCONNECT
  • Use Case: srfsh Command srfsh# request open-ils.cstore open-ils.cstore.direct.actor.org_unit.retrieve 3 What srfsh knows:
    • How to connect to Jabber (from configuration file)
    • Name of router (from configuration file)
    • Name of service (from command line)
    • Name of method (from command line)
    • Parameters (from command line)
    What srfsh doesn't know:
    • IP address or Jabber ID of cstore server
    Construct Jabber ID, e.g.:
    • router@private.localhost/open-ils.cstore
  • Jabber cstore REQUEST client to router router srfsh
  • Router Processing Router knows:
    • How to connect to Jabber (from configuration file)
    • Service names (from server registrations)
    • Jabber IDS of servers (from server registrations)
    • Name of service requested (based on choice of socket)
    • Jabber ID of client (from Jabber server)
    Construct a message:
    • Copy the original
    • Change the destination address
    • Add a router_from attribute
  • Jabber cstore REQUEST/RESULT router srfsh
  • Jabber listener REQUEST/RESULT in greater detail router client drone
  • Jabber listener CONNECT router client drone
  • Jabber listener REQUEST/RESULT with a connection router client drone
  • Jabber listener DISCONNECT router client drone
  • Summary
    • Everybody but Jabber is a client, as defined by the socket calls
    • All messages go through Jabber
    • Jabber traffics in XML fragments (message stanzas)
    • Each OSRF message is JSON embedded in a message stanza
    • The router translates service names to Jabber IDs
    • CONNECT enables you to bypass the router
    • CONNECT monopolizes a server drone for the duration
    • CONNECT is necessary for a database transaction