-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline #539
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MQTT staff cease to work
one typo:pkg/object/httpserver/mux.go#95
|
* fix: cannot start without specify initial cluster * Update pkg/option/option.go Co-authored-by: SU Chen <[email protected]> * fix typo Co-authored-by: SU Chen <[email protected]> Co-authored-by: chen <[email protected]>
If you'd like to try the new feature in this PR, please follow this script:
./egctl object create -f http-server.yaml
./egctl object create -f rss-pipeline.yaml
./egctl object create -f stock-pipeline.yaml
|
* optim code * optim string match
* update doc filters.md * fix typo * Update doc/reference/filters.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/filters.md Co-authored-by: Bomin Zhang <[email protected]> * fix typo * update requestbuilder and responsebuilder doc * fix responsebuilder doc * update filter.md * fix typos and grammar Co-authored-by: Bomin Zhang <[email protected]> Co-authored-by: Bomin Zhang <[email protected]>
* add mergeObject to support API aggregation * fix Github action warnings
* update controller.md * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * Update doc/reference/controllers.md Co-authored-by: Bomin Zhang <[email protected]> * update controller.md * update controller.md for circuit break resilience Co-authored-by: Bomin Zhang <[email protected]>
* update document * update policy name * Apply suggestions from code review Co-authored-by: SU Chen <[email protected]> * update according to comments Co-authored-by: SU Chen <[email protected]>
* update according to review comments * add version to spec * change status code to 503 when no response * add more debug log * fix typo * add comment for DefaultSpecVersion
* add more test
xxx7xxxx
approved these changes
Jun 28, 2022
zhao-kun
approved these changes
Jun 28, 2022
haoel
approved these changes
Jun 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you'd like to try the new feature in this PR, please follow this link.
Background
Initially, Easegress only supported the HTTP protocol, so many technical decisions only considered HTTP, and many implementation details were tightly bound to the HTTP protocol. In this way, when users request to support more protocols such as MQTT, TCP, etc., we have to re-implement a new PIPELINE for the protocol, which is not conducive to code maintenance and user use. Therefore, we hope to implement a general PIPELINE that supports all protocols, and we also hope instances of this PIPELINE can orchestrate filters of different protocols at the same time.
On the other hand, as the handler of request and response, filters should focus on the implementation of business logic, but the resilience filters, such as retryer and circuitbreaker, are for control logic. The mix of business logic and control logic results in that easegress must leverage the responsibility chain pattern to orchestrate filters, making the code difficult to understand and an ambiguous processing flow.
Finally, although one of the design goals of Easegress is traffic orchestration, and it achieves this goal well, it lacks the orchestration capabilities of complex APIs. For example, it can read a list of articles from an RSS feed, or send a message to Slack. But can't read a list of articles from an RSS feed and then post it to Slack.
Design
To solve the above problems, we redesigned the PIPELINE for the following goals:
RequestBuilder
andResponseBuilder
, they can create a new request or response based on the existing requests and responses in the context.The above goals are all for traffic orchestration. But with the enhanced orchestration capability, the ability of business logic extension has also been greatly improved. For example, Easegress can support the scenario we just mentioned via a pipeline, that's, get an RSS feed URL from the client request, read the RSS feed, then send the result to Kafka and post the article list to Slack.
And the pipeline definition would be (only the
flow
section is listed):Detailed Changes
filter
filter
tofilters
filters.Kind
for the filter meta informationDefaultSpec
,Description
, andResults
are moved tofilters.Kind
Spec
andName
are addedKind
fromstring
to*filters.Kind
Inherit
to state it should not handle the lifecycle of the previous generationfilters.Spec
to simplify the spec related logicRequestBuilder
andResponseBuilder
Retryer
,CircuitBreaker
andTimeLimiter
Proxy
filter is refactored, especially the filepool.go
pipeline
httppipeline
topipeline
END
namespace
context
protocol independent
protocols
package and interfaceRequest
,Response
easemonitormetrics
,trafficcontroller
are refactored to be protocol independentresilience
resilience
packagetracing
cluster
other changes
HTTPServer
is refactored, especially the filemux.go