Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Peer review, not yet finished.

...

Subscriptions do not have to have the same parent. For example, in the Forever application, the picos belonged to different people and represented their personal contact information. 
Subscriptions are established by a pico accepting a request from another pico. Subscriptions' details are listed below.

Well Known Rx

When the subscription ruleset is installed, a well known Rx channel is created. As a reminder, a channel contains three pieces of information: the long identifier (eci), a name, and a descriptive type. The well known channel name is wellKnown_Rx with Tx_Rx channel  as its channel type. This channel is used for subscription requeststo establish new subscriptions between picos, and is meant to be publicly shared with potential subscribers. In the future this channel will use policies to restrict events to only subscription requests, making your engine more secure.

...

To create a simple subscription request from pico A to pico B. Raise a wrangler subscription event to pico A with a wellKnown_Tx attribute containing an attribute named "wellKnown_Tx" , and the value set to pico B's wellKnown_Rx.

Directional Subscription

Directional A directional subscription are is a subscription that store stores roles, providing a an easier way to identifie direction of identify master slave relationships in a subscription.

To create a directional subscription request from pico A to pico B. Raise a wrangler subscription event to pico A with additional attributes, Rx_role, Tx_role.  Rx_role and Tx_role is role is pico A's and role in the subscription, leaving Tx_role to be pico B's role in the subscription 's relationship.

Cross Engine Subscription

It is easy to imagine a situation where you want to create a subscritption between picos hosted on different engines. Cross engine subscription are subscriptions that store a host, providing subscriptions to be used across engines or possibly with 3rd party services.  subscriptions allow us to do so by storing the host of the other pico in a subscription relationship.

To create a cross engine subscription request from between pico A to and pico B. Raise , raise a wrangler subscription event to pico A with additional event attribute Tx_host.  Tx_host is pico B's engines engine host url including protocol, for example, "http://localhost:8282".

Accepting Subscription Request

After you raise the initiating event wrangler subscription to pico A, the inner workings of the subscription ruleset will automatically make a subscription request to pico B. This subscription request must be accepted by the bequest pico B before the subscription is can be established. 

To accept an inbound subscription request from pico A to pico B, Raise raise a wrangler pending_subscription_approval event to pico B with a Rx attribute value set to the inbound pending subscription's Rx valueRx event attribute. The value of that event attribute will be the "Rx" attribute stored in the incoming request. You can find this value by looking at pico B's subscription ruleset entity variables on the UI, or by querying pico B's subscription ruleset inbound() function.

Auto Accepting Subscription Request

The Subscription rulset ruleset is configurable to auto accept subscriptions subscription requests with if given certain attributes.  A Subscription request with attributes that matches any configured attribute and corresponding value will be auto accepted.

...