GithubHelp home page GithubHelp logo

Comments (8)

lmammino avatar lmammino commented on June 9, 2024 1

I am still not fully sold on this, I fear that there's too much overread in trying to uniform everything.

Anyway, I totally admit my opinion is just based on feeling, so I suppose what @dkatavic is proposing here is the most reasonable approach to take: let's start with a list of platform we could aim to support; let's list what are the different signatures and other important technical details to keep in mind.

Once this is done, it will probably become much easier to have an informed conversation and come up with a better plan.

Anyone here wants to own this research? @coryodaniel are you still interested? If you would like to contribute to this that would be awesome!

from middy.

lmammino avatar lmammino commented on June 9, 2024

Hello @coryodaniel and thanks for the appreciation on the project.

Supporting other FaaS solutions is definitely an idea worth exploring. The current implementation is bound to the FaaS API exposed by AWS, where a lambda (a function) is essentially a function with the following signature:

const mylambda = (event, context, callback) => {
  // ... do stuff with `event` and `context`
  // ... invoke `callback(null, result)` or `callback(error)` when done
}

I have other FaaS have slightly different signatures. I think it's doable to create a slightly more sophisticated middy runtime that can be configured to respect the signature of different FaaS services, but this is not a priority for me at the moment. I would prefer to have something more stable and complete for AWS and release version 1.0.0, from there I would probably start to explore something like this.

This is not to say that possible PR that experiments with this idea will be rejected, it's definitely something worth exploring, so feel free to propose your solution if you have already something in mind.

from middy.

dkatavic avatar dkatavic commented on June 9, 2024

That is a great idea @coryodaniel . It would be valuable to document the behaviors of more popular FaaS providers so that we know how are they providing their equivalent of context and eventand how are they handling errors so that it is easier to abstract the behavior. I will keep an eye on this thread

from middy.

willfarrell avatar willfarrell commented on June 9, 2024

I think this will really grow our userbase, I think we should flag this for v2.

We'll need to do:

  • either add in logic for how each cloud wraps their handlers or have core-aws, core-google, core-azure
  • rename ssm, secretManger, dbManager, s3KeyNormailzer, http-event-normalizer middlewares to indicate aws only
  • Find someone that would interested owning all or part of this. Thumbs up this issue if you'd like to be considered for this.

from middy.

Rapol avatar Rapol commented on June 9, 2024

There's an obscure/abandoned(?) project under the serverless umbrella that provides an express like API, including middleware support, that is compatible with azure and aws. With one handler you can deploy to both clouds without any modifications. I found it months ago and there hasnt been any activity recently but wanted to share.

https://github.com/serverless/multicloud
https://github.com/wbreza/multicloud-demo

from middy.

willfarrell avatar willfarrell commented on June 9, 2024

Thanks for sharing.

from middy.

Rapol avatar Rapol commented on June 9, 2024

We wire up a quick prototype for azure since we are in dire need of a middleware library at work. It is heavily inspired by the middy API and others. I didn't fork middy since we didnt have time to completely revamp everything to work in Azure but I did stole some snippet from the readme (it is really good y'all). We just spent one day working on it and havent deployed it yet so it is not ready for production at all but it is a start.

https://github.com/Rapol/middizure

from middy.

willfarrell avatar willfarrell commented on June 9, 2024

As amazing as it would be to offer a multi-cloud serverless middleware, I don't see middy offering support outside of AWS anytime soon.

from middy.

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.