Skip to content
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

A love letter to Plumber ... and a request to find out more about its roadmap moving fowards. #920

Closed
slodge opened this issue Nov 13, 2023 · 4 comments
Labels
difficulty: intermediate Enterprising community members could help effort: high 4+ days of work theme: OpenAPI pertains to OpenAPI theme: plumb() ✨ `plumbBlock()` enhancements type: enhancement Adds a new, backwards-compatible feature

Comments

@slodge
Copy link

slodge commented Nov 13, 2023

I love Plumber.

  • It makes it so quick and easy to turn existing R functions into REST endpoints
  • It enables our R users to publish APIs - even though some of them haven't even got an idea what REST or an API actually is!
  • It provides mechanisms for users to publish charts directly into our "proper" internal products
  • We've got plans for using it - along with a version of the lovely RapiClient to allow ShinyLive applications to interact with live server-based content.

Really, it's magical - especially when used with RapiClient. e.g. we find we can quickly setup a service like

library(plumber)

#* @apiTitle Plumber Document API
#* @apiDescription REST API for access to the document library

#* Search Document History
#* @param keyword:[string] Keyword(s) to search for
#* @param from:Date Earliest date to search
#* @param to:Date Latest date to search
#* @post /search
function(keyword, from = NULL, to = NULL) {
  # our R logic
}

This provides a "swagger" debug screen for manual testing:
image

And using our internal wrapper around rapiclient - so we can then connect to the Plumber APIs in using simple R code like:

library(R.ApiClient)
library(tidyverse)

api <- R.ApiClient::api_get_plumber_api("http://127.0.0.1:4885")

This gives us functions to call in R:
image

And this even includes simple automagic documentation like:
image

And when we're happy with the functionality we've written, it can all be quickly and easily deployed to our Connect server where it benefits from our continuous deployment, from Posit's authentication and authorization; and from the logging and monitoring services there (Connect is integrated with our in-house AWS Cloudwatch and Splunk tooling),

... and it's not just data APIs ...

Our users are also now publishing charts via Plumber... and these charts are easy to integrate into Shiny apps (using a slightly modified renderImage), into RMarkdown reports (with a little extra file caching code) and into our "proper" software apps - apps with front ends built in Angular and React.

Really, all this is magical, delightful to use and absolutely fabulous for enabling our users to do awesome work. I love it <3


However... there is a concern...

Starting 12 months ago, I've been pushing forward PRs, I've been watching issues, and I've been looking at the API output from the Posit team... and it feels like Plumber is frozen. I've asked our business manager and product manager contacts in Posit about this every few months; and each time I've heard replies that Posit are excited about working on Plumber, and that they'll be working on it again "soon" ... but each time there's been no sign of any followup action: I've not seen any active branches, and the only PRs I've seen approved have been about RStudio->Posit name changes...

As the person who recommends technology routes internally, I'm a little concerned that in choosing Plumber I perhaps should instead have chosen a more actively developed platform... Should we instead be looking at alternative approaches like Python's Flask and FastAPI instead? I've seen both of those getting new features and fixes, including attention from the Posit team...


Is there anything the Plumber project maintainers can do to provide information about the future of Plumber?

  • Can we perhaps get a project roadmap published indicating when/if new features and fixes might be planned and published?
  • Can we perhaps get more maintainers (perhaps even from outside Posit) onboard to help move Plumber forwards?
  • Or if Plumber is a frozen project, can we perhaps get a statement about that - as I think if we do know this is frozen, then it'll help new R API projects come into life to help replace and/or augment it 👍

Sorry if this sounds like a complaint... I didn't want it to sound like a complaint. I love Plumber - this is a love letter - I really do <3 the opportunities that Plumber gives us.

Thanks for reading - sorry for this being so long!

@meztez
Copy link
Collaborator

meztez commented Nov 16, 2023

@slodge I have a similar opinion. But at the same time, it is always possible to fork the project to add whatever you need for your business.

I think we have to understand plumber position in the API deployment space. I won't ever be a throughput monster, but it sure is useful for certain tasks. FAST Api has probably 10 times or more the user count and contributors, so it has 10 times the velocity.

Maybe we could get together as plumber user community, do our own road map and then collaborate on it. This is, after all, an open source project that Posit pick up after the original author moved on.

Similar to leaflet I think.

@meztez
Copy link
Collaborator

meztez commented Nov 16, 2023

@slodge I went over your PR, it is quite extensive. It does not seem like each of them were fully cooked? Maintainer time is limited so having an easily mergeable PR would be your best bet. That means doc, test, etc...

How can I help you push those PR forward? Would it be possible resplit them into individual feature PR? What do you mean , too hard to maintain, you mean internally on your own fork?

The less work you put on the maintainers, the more likely your PRs will be merged. Lets collaborate.

@slodge
Copy link
Author

slodge commented Nov 16, 2023

The closed PRs are all on https://github.com/rstudio/plumber/pulls?q=is%3Apr+is%3Aclosed and can be reopened. It's not easy to untangle/merge them, but I'm sure it's doable.

I think #889 was the first functional PR to consider. The blocking point on that (I believe) was that someone needed to add "editions" to plumber first - based on https://testthat.r-lib.org/articles/third-edition.html - see discussions in the PR.

If someone wants to create an editions PR, then that's a good next step? Probably best to get at least a nod from the maintainers before investing too much in that effort though.

@meztez meztez added theme: plumb() ✨ `plumbBlock()` enhancements type: enhancement Adds a new, backwards-compatible feature difficulty: intermediate Enterprising community members could help effort: high 4+ days of work theme: OpenAPI pertains to OpenAPI labels Nov 24, 2023
@meztez meztez added this to the should address milestone Nov 24, 2023
@slodge
Copy link
Author

slodge commented Nov 25, 2023

Work and a release is now planned for plumber.

Apologising if this love letter came over as "emotional" - respectfully closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: intermediate Enterprising community members could help effort: high 4+ days of work theme: OpenAPI pertains to OpenAPI theme: plumb() ✨ `plumbBlock()` enhancements type: enhancement Adds a new, backwards-compatible feature
Projects
None yet
Development

No branches or pull requests

2 participants