-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Story: OpenFaaS SDKs for each language #1246
Comments
What would the SDK do? I'm thinking we would essentially copy the functionality in the CLI that interacts with already deployed functions: I don't think it would make much sense to include the Should the SDK enable users to interact with functions that are deployed, or would it also permit the users to alter the OpenFaaS deployment by deploying, building, etc? |
We could start with?
Another way of looking at it - what would a team in your org need to do in order to integrate with your OpenFaaS functions that were developed in your team? Alex |
|
So by SDK we want to have means to communicate with the API through code? I am asking as my first impression was SDK for developing providers, like we do with the faas-provider but on different languages. Otherwise I am interested in taking a part of this. |
Has anyone tried using Swagger to generate the API clients? |
@stefanprodan we use swagger and the code generator here at work and .... it leaves a lot to be desired, unfortunately. But, I think our spec is relatively simple and straightforward, so it might actually be good enough. |
Given how awful the generated SDK I saw for Java was, and how simple our API is, I would recommend a first class implementation in each language. |
I think these SDKs will be useful if we someone is building something and orchestrating openfaas system's API rather than using our CLI or UI. For invoking the deployed function the http client code will be relatively simple, do we need an SDK for that ? |
Hello, I want to ask about the progress of the SDK, I should be able to help in the code. |
As far as I am aware, nobody in the community - whether end-users, regular contributors or otherwise has worked on this. I would like to see some discussion and consensus on design and how we will keep the SDKs consistent across several languages. Your input is welcome on this issue. |
I've just started working on a Java client. I'm not a huge fan of the generated client either but it does cover a lot of the boiler plate so what I'm doing is providing what I think is a nicer API but it ultimately just wraps it. I'm expecting to start testing with it later next week. Open sourcing it won't be an issue either under Apache V2, BSD, MIT or similar. Our integration with OpenFaaS is in its infancy (migrating from internal FaaS impl.) but it's entirely programatic access so this is crucial for us. We're not the consumers of OpenFaaS our customers are so we will build, deploy and everything else programatically. I'll be interested in knowing what the community is thinking around this so we don't go off in a totally diff. direction on our own. |
Happy to help with a C SDK. |
Looking forward to seeing more @zcourts @briandowns are there any SDKs for the languages listed above that you'd like to help with? I'm not sure how widespread the production usage is of C + OpenFaaS at this point. |
Fair enough. :D I'd be happy to help with the Go client. |
I saw that Rich (@Miserlou) put this together -> https://github.com/Miserlou/Fashion |
Hey @alexellis We are working on building Go SDK for OpenFaaS API. I'd love your feedback and/or contributions on https://github.com/vitwit/go-faas when you get a moment |
Happy to help out with the .NET Core side of it. |
Sounds good @jammehcow - do you want to have a try at this and put up a repo that we can talk about / test? |
Hi @alexellis I am happy to help with either a JavaScript or Java/Kotlin SDK |
Story: OpenFaaS SDKs for each language
Since this will be a big piece of work and potentially involve multiple languages and features, I'm calling it a Story.
Use-case
We have been asked 4-5 times in as many months for an SDK for Java which can be used to integrate with the OpenFaaS API. This aligns well with the developers-first value of OpenFaaS and the mission: Serverless Functions Made Simple.
The official Java template also has code bundled for its entrypoint and function model, which need to be submitted to jCenter or similar so that enterprise developers can get a good experience in their IDEs.
Whilst invoking a function, or listing functions can be as simple as creating a HttpClient and then doing a GET / POST, this can and should be made easier. It may be that some developers within an organisation write OpenFaaS functions, other teams should be able to integrate with those easily and this story is part of that.
Coverage
I think this is my priority order:
Followed by PHP, Ruby, Perl and potentially some others.
Other concerns
I think we need a degree of similarity between each SDK and we also need to be idiomatic in each language as far as possible.
I wanted to highlight some prior work that may be useful for reference from the CNCF Serverless Working Group for CloudEvents; JavaScript, Java, Go - .NET also exists.
These packages should be distributed through the appropriate channels as Ruby Gems, NPM modules and jCenter for JARs.
The text was updated successfully, but these errors were encountered: