Coder Social home page Coder Social logo

Comments (2)

kpacha avatar kpacha commented on May 4, 2024

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.

github-actions avatar github-actions commented on May 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.