Replies: 6 comments 8 replies
-
From previous conversation: @leseb wrote:
@phlogistonjohn wrote:
Yes, so my standpoint is, that writing a binding for Rest APIs is nothing a human being should be punished to do. It's different for wrapping a C library, if it is not strictly specified. But for Rest APIs the quota of boilerplate code is very high. So I would instead spend less time in writing an OpenAPI spec for the Rest API instead, and from that you can generate SDKs (binding libraries to Rest APIs are often called SDKs @phlogistonjohn, don't ask me why) for every language, not just Go, and mock server, testing code and documentation. It would be easier for us (the go-ceph team) to maintain the library, if we don't have to follow what admin ops is doing, but we could convince them to update the OpenAPI spec accordingly. For the C part we never had a real chance to do that, and we are suffering from the lack of API documentation and minor-version-changes. But here I think we have a realistic chance to do it better. |
Beta Was this translation helpful? Give feedback.
-
@leseb wrote:
I still don't quite get it. If we have a thin wrapper for the admin ops API, wouldn't the user just pass in the credentials from the S3 library into the admin ops library? Or does the S3 library define some fancy authentication types, that the admin ops API would take as parameters? |
Beta Was this translation helpful? Give feedback.
-
Understood. I think it is probably worth taking inspiration from that implementation, and others, but not necessarily using the code.
Personally, I love this idea.
Agreed. There was never a rule that that everything in go-ceph has to be a binding to C APIs, its just that was the smoothest path forward for rados, rbd, and cephfs. The newer cephfs admin and (soon) rbd admin packages themselves are only based on the C libraries enough to use the rados mgr_command and mon_command (etc) functions. I even used interfaces in those sub-packages so in theory you could replace them with something that didn't use the C bindings - even if no such thing exists today.
I'm in favor of this idea. There are certainly details to work out but I want to help make this happen. I'd also like to see rook use some of the go-ceph functions for rbd & cephfs - where is makes sense of course. :-) |
Beta Was this translation helpful? Give feedback.
-
Ok, I think I'm done with my experiments with OpenAPI, on paper, it seems great but once you start digging it is really overwhelming, especially when trying to make it work with an existing API that might not use the API "standards". My summary:
In the end, I don't want perfect to be the enemy of good. So I'm going to proceed with my existing internal code and will submit a PR hopefully soon. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Someone has already implemented a lot of pretty good RGW code for Ceph. https://github.com/QuentinPerez/go-radosgw. Maybe we could include this in go-ceph easily without having to do much wrapping. Or see if @QuentinPerez would be interested in us including this in the go-ceph code tree. It's not clear to me if this lib uses the admin API or not, but I am pretty sure it doesn't use the |
Beta Was this translation helpful? Give feedback.
-
RGW admin APIs got implemented via #496 |
Beta Was this translation helpful? Give feedback.
-
Hi!
Rook is looking at removing its CLI calls of the
radosgw-admin
command to directly interact with RadosGW Admin Ops API.The current existing Go-binding for this API is not as appealing as I thought after looking deeply so I've started my own implementation.
I would like to add it to this repository as I believe go-ceph is the umbrella for all Ceph Go binding.
I realize that this addition will be different from what is being done with rados/rbd/cephfs by important C lib and binding them. However, I see benefit from fostering the go bindings to a single repository, especially under the Ceph organization.
RadosGW Admin Ops API, as its name implies is an API endpoint to do administrative tasks on RadosGW. I'm hoping to bring this new binding to a different maturity level and make it a first-class citizen in Go-Ceph. Hopefully gathering more contributors, primarily coming from both Ceph RGW and Rook teams.
Thanks for your consideration.
Beta Was this translation helpful? Give feedback.
All reactions