120 likes | 356 Views
BEEP. Framework for supporting application protocols Restricted to those that are connection-oriented e.g. in Java, streams on a URLConnection use Request/Response model allow asynchronous message exchange. Asynchrony.
E N D
BEEP • Framework for supporting application protocols • Restricted to those that • are connection-oriented • e.g. in Java, streams on a URLConnection • use Request/Response model • allow asynchronous message exchange
Asynchrony • Messages and message pieces do not have to be sent, received or replied to in order • Requires multi-threading support at least in the server • Roles of server and client can be frequently interchanged. BEEP uses notion of Initiator and Listener instead.
Tasks of an application protocol • Specification of • framing • encoding • status reporting • asynchrony: how independent exchanges are handled; • authentication, • privacy
Beep channels and messages • Asynchrony is via channels • data sources/sinks with a specified profile • Messages get <channel msgno> pair in header • Four message type • MSG a request • RPY positive reply • ERR • ANS for multiple replies
Beep channels and messages • Frame: <MSGTYPE> <channelNum> <msgNum><more><seqNum><count> Channel 0 is exclusively for channel management. MSG 0 0 . 34 188 Content-Type: application/BXXP+xml <start number='1'> ;start channel 1 <profile uri=http://xml.wrok.com/profiles/DATE/> ;using DATE profile </start> END • seqNum: where the payload occurs in the sliding window (per session? per channel?)
Profile • The http://xml.wrox.org/profiles/DATE is (implicitly): • empty message payload: return remote date • pair of integers: return sum
Wrox Date exchange: Initiator MSG 0 0 . 34 188 Content-Type: application/BXXP+xml <start number='1'> ;start channel 1 <profile uri=http://xml.wrok.com/profiles/DATE/> ;using DATE profile </start> END MSG 1 1 . 0 38 Content-Type: application/BXXP+xml END MSG 1 2 . 38 41 Content-Type: application/BXXP+xml 3 4 END MSG 0 1 . 197 38 Content-Type: application/BXXP+xml 3 4 END
Wrox Date exchange: Listener RPY 0 0 . 34 188 Content-Type: application/BXXP+xml <greeting localize = 'en-us'> <profile uri=http://xml.wrok.com/profiles/DATE/> ;using DATE profile END RPY 1 1 . 0 38 Content-Type: application/BXXP+xml Thu Nov 29 15:58:49 EST 2001 END RPY 1 2 . 38 41 Content-Type: application/BXXP+xml 3 4 END RPY 0 1 . 197 38 Content-Type: application/BXXP+xml <ok /> END