Comments (2)
Hi, Richard
1. Conditional sub-requests
I'm not sure that's something you should do in the api-gateway layer because it will add complexity and latency to a layer intended to be as reactive as possible. See the KrakenD rules for more.
But, it's up to you to build a proxy middleware able to parse some custom config and delegate to it the responsibility of blocking the response, triggering the related pipe(s) and merge the responses of every sub-request to the original response.
Following your example, you could define 2 endpoints (named github_search
and twitter_search
) and the custom proxy middleware described above. You could configure the github_search
endpoint to use the custom proxy middleware that blocks the response, triggers N http requests to the twitter_search
and mixes the results into the original ones.
Please, notice this will add a huge overload to the engine (in terms of memory, goroutines and filedescriptors consumed per request) and I see some hard decisions to make during the implementation like: how to deal with partial errors, what's the timeout to apply, and so on
2. backend/providers profiles
I'm not sure if I got your question right...
If you're talking about using something like the engines of the 'searx' project, I think it would be great to get some 'out-of-the-box' plugins for the most common backends. But I'm not sure if there are such things, since almost everyone is using KrakenD to consume its own api catalogue.
If your question was more about integrating RAML or swagger or any other API description language/module/whatever, that's something we have in the roadmap and I'd love to see what do you have in mind
cheers!
PS: it would be nice to have every question on a dedicated issue, so it would be easier for the community to search for a specific one.
from lura.
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.
from lura.
Related Issues (20)
- Requests sent to backend doesn't have the parameters replaced from the client URL HOT 2
- How do I add an element to the responses HOT 2
- Handler plugin injection aborted for configuration error of one plugin HOT 1
- Disable encoding of query parameters in the load balancing middleware HOT 9
- Generate config json from `ServiceConfig` struct HOT 2
- Control Plane/ Service Mesh Feature Request HOT 2
- GraphQL backend to support variables in the POST body for Queries HOT 2
- Probably me as newbie but I can't get the GraphQL proxy config to work HOT 3
- Race condition in shadowproxy HOT 1
- Default router behavior changing when the `router` configuration is present HOT 2
- Inconsistent interpolation behavior in various parts of the configuration HOT 1
- Metrics for HTTP-Client plugin not reported HOT 3
- Configurable SD protocol HOT 1
- Proposal: Ability to filter input_headers at the backend level HOT 1
- Log which endpoint failed to register HOT 2
- Remove restriction on multiple POSTS or other unsafe methods HOT 1
- Default router behavior changing when the router configuration is present HOT 1
- Where did the examples go? HOT 3
- Pass request `ctx` to modifier plugins HOT 1
- Gofiber Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lura.