CloudEvents Expression Language
See original GitHub issueI want to propose to start a new effort to develop an expression language to filter CloudEvents.
Motivation
One of the main drivers is the ability to have more powerful filtering capabilities in the subscription API, where the existing filter dialect basic
is not powerful enough for most of production use cases. I foresee an eventual application of such language in the Discovery API and the Workflow spec.
Expected outcome
Our goal is to develop a spec for an expression language tailored for CloudEvents. Some goals of this language are, but not limited to, the following features:
- Total functional programming language, hence the termination of the evaluation of the expression is always guaranteed
- Type system conform to the CloudEvents type system
- Boolean operators (and/or/nor/xor)
- Comparison operators on the types provided by the type system
- Regex
- Function invocation semantics + basic built-ins (e.g. type assertions/casting,
It’s out of the scope of the effort to develop a generic expression language, hence the input of the expression will always be a CloudEvent
.
Notes
- We could help the implementers providing the antlr grammar for it.
- We should implement this language in our sdks (I’m willing to help for java, golang, rust).
- I would prefer to exclude payload filtering from the initial efforts, since I consider it a complex argument (It comes to my mind problems like payload too big, supporting different content types, …)
- We don’t want anything particularly fancy regarding the syntax, so my feeling is that we should a C-like syntax or similar, something familiar for cloud developers out there
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:15 (11 by maintainers)
Top Results From Across the Web
CloudEvents SQL Expression Language - HackMD
CloudEvents SQL expressions (also known as CESQL) allow matching of CloudEvent attributes against complex expressions that lean on the syntax of Structured ...
Read more >CloudEvents format - HTTP protocol binding | Eventarc
CloudEvents (cloudevents.io) is a specification for describing event data in a common way. The specification is under the Cloud Native Computing ...
Read more >[Eventing] CloudEvents SQL - Google Groups
I just want to let you know that in the CloudEvents community Lionel and I are working on a fancy new SQL-like expression...
Read more >Cloud Events - Object Partners
Exploring the CloudEvents Landscape. ... Cel defines an expression language for matching cloud events and operating on them.
Read more >Connecting Clusters - TriggerMesh
Broker is the temporary storage for CloudEvents. ... A PingSource produces periodic events based on a cron expression.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I managed to sketch some ideas and I wrote them down in a doc. It’s not a spec, it’s not formal, It’s more a braindump with all the ideas I have for this language: https://hackmd.io/@fcByUhAFQKOgNywKFruHOA/B18qKs59w
One of the concerns we heard in the past, was resources intensive filtering, it is pretty common on regexp. As you might not have control over who is calling your subscription API we need to find a way to limit its impact