From b9305e5b67a41c2eff893aca498460e2666d1ed4 Mon Sep 17 00:00:00 2001 From: cathyhongzhang Date: Mon, 26 Mar 2018 17:14:22 -0700 Subject: [PATCH 1/5] Add correlation-field Signed-off-by: cathyhongzhang --- spec.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec.md b/spec.md index 6056065fa..f83262668 100644 --- a/spec.md +++ b/spec.md @@ -209,6 +209,17 @@ that contains both context and data). [RFC 2046](https://tools.ietf.org/html/rfc2046) * For Media Type examples see [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml) +### correlation-field +* Type: String +* Description: A path string pointing to a field in the event data + that can be used to correlate all the events associated with + the same application instance. +* Constraints: + * OPTIONAL + * If present, MUST be a non-empty string +* Examples: + * headers.body.cathy-house-number + ### extensions * Type: Map * Description: This is for additional metadata and this does not have a From df87f17c92fd1a792b40ce7d50d3a1c6ef0095db Mon Sep 17 00:00:00 2001 From: cathy Date: Wed, 6 Jun 2018 14:53:01 -0700 Subject: [PATCH 2/5] Update spec.md --- spec.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/spec.md b/spec.md index f83262668..96f686a98 100644 --- a/spec.md +++ b/spec.md @@ -209,17 +209,23 @@ that contains both context and data). [RFC 2046](https://tools.ietf.org/html/rfc2046) * For Media Type examples see [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml) -### correlation-field -* Type: String -* Description: A path string pointing to a field in the event data - that can be used to correlate all the events associated with - the same application instance. +### property-bucket +* Type: +* Description: A list of “key : value” pairs in flat strcuture that specify the properties of the event source. + The value could be a string or a JSON object. One example usage of the property-field is to + correlate multiple events involved with a serverless application. * Constraints: - * OPTIONAL - * If present, MUST be a non-empty string + * MANDATORY + * MUST be in the format of pair. * Examples: - * headers.body.cathy-house-number - + property-bucket + { + "building address": "12 Main Street, Copenhagen, Denmark, 123456" + "floor": "2" + "apartmentId": "345" + "sensor-location": "window" + } + ### extensions * Type: Map * Description: This is for additional metadata and this does not have a From 10c8f735980fabfe112ae4fe7773313ecc43240f Mon Sep 17 00:00:00 2001 From: cathy Date: Wed, 6 Jun 2018 15:25:28 -0700 Subject: [PATCH 3/5] Update spec.md --- spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.md b/spec.md index 96f686a98..886eb5480 100644 --- a/spec.md +++ b/spec.md @@ -212,8 +212,8 @@ that contains both context and data). ### property-bucket * Type: * Description: A list of “key : value” pairs in flat strcuture that specify the properties of the event source. - The value could be a string or a JSON object. One example usage of the property-field is to - correlate multiple events involved with a serverless application. + The value could be a string or a JSON object. There should be no duplication of field in this property-bucket. + One example usage of the property-field is to correlate multiple events involved with a serverless application. * Constraints: * MANDATORY * MUST be in the format of pair. From 0c50bc098dc9e6599271d05126f60ef5c1d15f57 Mon Sep 17 00:00:00 2001 From: cathy Date: Thu, 7 Jun 2018 14:44:43 -0700 Subject: [PATCH 4/5] Update spec.md --- spec.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec.md b/spec.md index 886eb5480..6e5e9d0d2 100644 --- a/spec.md +++ b/spec.md @@ -209,16 +209,16 @@ that contains both context and data). [RFC 2046](https://tools.ietf.org/html/rfc2046) * For Media Type examples see [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml) -### property-bucket +### properties * Type: -* Description: A list of “key : value” pairs in flat strcuture that specify the properties of the event source. +* Description: A list of “key : value” pairs in flat structure that specify the properties of the event source. The value could be a string or a JSON object. There should be no duplication of field in this property-bucket. One example usage of the property-field is to correlate multiple events involved with a serverless application. * Constraints: * MANDATORY * MUST be in the format of pair. * Examples: - property-bucket + properties { "building address": "12 Main Street, Copenhagen, Denmark, 123456" "floor": "2" From 04221186c1f3112b5ad847c56db774980e865c7e Mon Sep 17 00:00:00 2001 From: cathy Date: Mon, 18 Jun 2018 17:23:19 -0700 Subject: [PATCH 5/5] Update spec.md --- spec.md | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/spec.md b/spec.md index 6e5e9d0d2..aaeb146a7 100644 --- a/spec.md +++ b/spec.md @@ -209,36 +209,25 @@ that contains both context and data). [RFC 2046](https://tools.ietf.org/html/rfc2046) * For Media Type examples see [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml) -### properties +### application-properties * Type: -* Description: A list of “key : value” pairs in flat structure that specify the properties of the event source. - The value could be a string or a JSON object. There should be no duplication of field in this property-bucket. - One example usage of the property-field is to correlate multiple events involved with a serverless application. +* Description: A list of “key : value” pairs providing information about the event, which are + used by an event-based application. The “key : value” pairs should be in flat structure. + The value should be a string. There should be no duplication of keys. + One usage example: an application workflow can use a "key:value" to correlate multiple events + (from different event sources) asscociated with a serverless application workflow. * Constraints: * MANDATORY * MUST be in the format of pair. * Examples: - properties + application-properties { "building address": "12 Main Street, Copenhagen, Denmark, 123456" "floor": "2" "apartmentId": "345" - "sensor-location": "window" + "sensor-location": "room1.window2" } -### extensions -* Type: Map -* Description: This is for additional metadata and this does not have a - mandated structure. This enables a place for custom fields a producer or - middleware might want to include and provides a place to test metadata before - adding them to the CloudEvents specification. TBD - Determine a shorter - prefix for this (e.g. OpenAPI uses “x-”) -* Constraints: - * OPTIONAL - * If present, MUST contain at least one entry -* Examples: - * authorization data - ### data * Type: Arbitrary payload * Description: The event payload. The payload depends on the event-type,