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

pipeable spaces setup #147

Open
sckott opened this issue Jan 9, 2018 · 8 comments
Open

pipeable spaces setup #147

sckott opened this issue Jan 9, 2018 · 8 comments
Labels

Comments

@sckott
Copy link
Collaborator

sckott commented Jan 9, 2018

Did we talk yet about making spaces functions follow droplet functions pattern of facilitating piping them together?

do we not want to do that? or do we?

@sckott sckott added the spaces label Jan 9, 2018
@amoeba
Copy link
Contributor

amoeba commented Jan 11, 2018

I don't think we've talked about this.

I like the idea generally, but worry about it due to some of the functions having side effects (that sometimes cost money). That said, I tend to like functions whose arg order naturally supports pipes anyway as they feel more consistent. The arg order I copied from aws.s3 might not be how I would've thought it de novo.

e.g. from aws.3s:

  • Less pipe-able: put_object(file, object, bucket, ...) (at least w/ bucket_create()
  • More pipe-able: put_object(bucket, file, object, ...)

I think a pipeable API like this would be nice:

space_create() %>% 
  spaces_object_put("some-file.txt") %>% 
  spaces_object_copy("another-space")

I'm totally down to swap things over in the code I've already written.

@sckott
Copy link
Collaborator Author

sckott commented Jan 15, 2018

Okay, I'm not wedded to the idea of pipeable functions, but it does seem good to do it since many of the droplet functions are that way. we have some waiting internal utilities that you may need, as I imagine there's a bit of a wait time for the space to be created

@amoeba
Copy link
Contributor

amoeba commented Jan 15, 2018

but it does seem good to do it since many of the droplet functions are that way

Consistency sounds good. I generally like the argument order that comes out of making a function work better in a pipeline. I'm curious: If the droplet/space comes first, would that be considered least-significant-first or most-significant-first order? I feel like there's gotta me some CS terminology here.

we have some waiting internal utilities that you may need, as I imagine there's a bit of a wait time for the space to be created

I'm not sure I fully understand what you mean here. Could you elaborate?

@sckott
Copy link
Collaborator Author

sckott commented Jan 18, 2018

Hmm, not sure of the CS terminology, no idea.

The waiting stuff .e.g, https://github.com/sckott/analogsea/blob/a2cc5c86e00e87106dd5066241fee9b650846e85/R/actions.R#L64-L95 is to be able to pipe together operations that depend on the previous operating finishing. spinning up a droplet takes a little while, so helper functions help make sure the operation has finished before the next thing happening in the pipe line

@amoeba
Copy link
Contributor

amoeba commented Jan 19, 2018

Ah, that's very useful.

@sckott
Copy link
Collaborator Author

sckott commented Jan 19, 2018

the do.wait_time option bit is so that users can set the wait time themselves - sometimes a user may want to spin up a ton of droplets - and when pinging the DO API to check if the droplet is up yet, that counts against the users rate limit

@sckott sckott added this to the v0.7 milestone May 19, 2018
@sckott sckott modified the milestones: v0.7, v0.8 Jun 11, 2018
@sckott
Copy link
Collaborator Author

sckott commented Jan 15, 2020

@amoeba should we bump this to the next milestone?

@amoeba
Copy link
Contributor

amoeba commented Jan 15, 2020

Also commented over on #140: I can do this this month. Is that fast enough?

@sckott sckott modified the milestones: v0.8, v0.9 Jan 27, 2020
@sckott sckott removed this from the v0.9 milestone Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants