Presentation is loading. Please wait.

Presentation is loading. Please wait.

Johnson, Baismall, Andre

Similar presentations


Presentation on theme: "Johnson, Baismall, Andre"— Presentation transcript:

1 Johnson, Baismall, Andre
MAD Architecture Johnson, Baismall, Andre

2 Change log Date Version People Note 2014/05/07 V0.0.1 Johnson
First draft, Hub is a independence of host. 2014/05/14 V0.0.2 Hub combine with IS server.

3 MAD Architecture (Publisher & Hub) (Subscribers) Interface
Server (Publisher & Hub) Point of Service Servers (Subscribers) HTTP Request & Response Methods: GET & HEAD & POST

4 MAD Architecture in Discovery
Point of Service Servers (Subscribers) Interface Server (Publisher) HTTP Request GET or HEAD /discovery?parameters Query Parameters: address - The address of Point of Server. or latlng Geographic location of Point of Server. postype - The type of Point of Server Discovery HTTP Response Response headers: Link : < ; “rel=hub” , < ; “rel=self”

5

6 MAD Architecture in Subscription
Point of Service Servers (Subscribers) Interface Server (Hub) HTTP Request POST /subscription POST headers: Content-Type – application/x-www-form-urlencoded POST body: hub.callback & hub.mode & hub.topic & hub.lease_seconds(Optional) & Hub.secret(Optional) Subscriber Sends Subscription Request hub.callback REQUIRED. The subscriber's callback URL where notifications should be delivered. It is considered good practice to use a unique callback URL for each subscription. hub.mode REQUIRED. The literal string "subscribe" or "unsubscribe", depending on the goal of the request. hub.topic REQUIRED. The topic URL that the subscriber wishes to subscribe to or unsubscribe from. hub.lease_seconds OPTIONAL. Number of seconds for which the subscriber would like to have the subscription active. Hubs MAY choose to respect this value or not, depending on their own policies. This parameter MAY be present for unsubscription requests and MUST be ignored by the hub in that case. hub.secret OPTIONAL. A subscriber-provided secret string that will be used to compute an HMAC digest for authorized content distribution. If not supplied, the HMAC digest will not be present for content distribution requests. This parameter SHOULD only be specified when the request was made over HTTPS [RFC2818]. This parameter MUST be less than 200 bytes in length. HTTP Response Response : Subscription is accepted. or Subscription is denied.

7 Subscription is denied
Point of Service Servers (Subscribers) Interface Server (Hub) HTTP Request GET /callback?parameters Query Parameters: hub.mode & hub.topic & hub.reason(Optional) HTTP Response Subscription Validation hub.mode REQUIRED. The literal string "denied". hub.topic REQUIRED. The topic URL given in the corresponding subscription request. hub.reason OPTIONAL. The hub may include a reason for which the subscription has been denied. Response : Success

8 Subscription is accepted [Hub Verifies Intent of the Subscriber]
Point of Service Servers (Subscribers) Interface Server (Hub) HTTP Request GET /callback?parameters Query Parameters: hub.mode & hub.topic & Hub.challenge & hub.lease_second(Optional) HTTP Response Hub Verifies Intent of the Subscriber hub.mode REQUIRED. The literal string "subscribe" or "unsubscribe", which matches the original request to the hub from the subscriber. hub.topic REQUIRED. The topic URL given in the corresponding subscription request. hub.challenge REQUIRED. A hub-generated, random string that MUST be echoed by the subscriber to verify the subscription. hub.lease_seconds REQUIRED/OPTIONAL. The hub-determined number of seconds that the subscription will stay active before expiring, measured from the time the verification request was made from the hub to the subscriber. Hubs MUST supply this parameter for subscription requests. This parameter MAY be present for unsubscribe requests and MUST be ignored by subscribers during unsubscription. Response : Success. – The subscriber MUST confirm that the hub.topic and response body equal to the hub.callenage parameter. But if response body does not match the hub.callenage parameter, the hub MUST consider verification to have failed. Not Found. - The verification have failed.

9 Hub keep retry until successful.
Content Distribution Hub keep retry until successful. Point of Service Servers (Subscribers) Interface Server (Hub) HTTP Request POST /callback POST headers: Content-Type – application/x-www-form-urlencoded Link : < ; “rel=hub” , < ; “rel=self” POST body: Topic Content Content Distribution The hub MUST consider all other subscriber response codes as failures; that means subscribers MUST NOT use HTTP redirects for moving subscriptions. HTTP Response Response : Success – The response body from the subscriber MUST be ignored by the hub.


Download ppt "Johnson, Baismall, Andre"

Similar presentations


Ads by Google