Field sets

Events that start a transaction - notify and solicit events - create an initial field set. Other data events can add fields to it. SPARKL uses a field set to satisfy outstanding goals with it.

A field set is:

  • A bunch of fields created by a transaction start event - a notify or a solicit
  • Carried by data events through the Sequencing Graph
  • Possibly supplied with other fields by reply events
  • Used to satisfy goal - consume or response - events
  • Discarded when SPARKL cannot do anything else with the field set it has

Events therefore can:

  • Create field sets
  • Add fields to existing field sets
  • Wait for field sets
Table 1. Event roles regarding field sets
Event type Creates new field set Adds fields to existing field set Waits for field set Description
Notify Yes No No A notify creates a new field set and starts a transaction.
Consume No No Yes A consume is invoked when a field set includes all the fields the consume expects to receive.
Solicit Yes No No A solicit creates a new field set and starts a new transaction. It waits for a corresponding response event.
Response No No Yes A response is sent when a field set includes all the fields the response expects to receive.
Request No No Yes A request is invoked when a field set includes all the fields the request expects to receive.
Reply Maybe Yes No A reply adds fields to a field set (received by the reply's corresponding request).

If a reply corresponds to a consume/reply operation, the reply event generates a new field set that can satisfy other goal events. A consume/reply thus creates a parallel thread of execution.

Take a look at Figure 1 to see how fields are added to the field set until SPARKL can use it to satisfy the response to the initial solicit.

Figure: The Sequencing Graph - Sample graph


  • The transaction starts with the ORDER field, sent by the starting solicit
  • The replies to the AddTonic and AddGin requests supply the fields tonic and gin
  • The response to the solicit expects the gin and tonic fields. Since the field set now contains both, the response is sent concluding the transaction
    Note: Though not needed by the response, the ORDER field is also present in the field set.
  • Since the field set cannot be used to satisfy other goals, it is discarded