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

FTP connector #4

Closed
ktoso opened this issue Oct 21, 2016 · 2 comments · Fixed by #3
Closed

FTP connector #4

ktoso opened this issue Oct 21, 2016 · 2 comments · Fixed by #3
Milestone

Comments

@ktoso
Copy link
Member

ktoso commented Oct 21, 2016

To track the in progress PR: #3

@juanjovazquez
Copy link

After the first steps implementing the FTP connector I'd need your help / opinion in order to come up with a decent API for end users and also to clarify what would be the scope of the component in terms of offered capabilities.

As I see it, we need to solve these four typical scenarios : browsing, retrieving, creating and deleting/moving, always following the reactive streams philosophy of course. The browsing part is what has been tackled so far, and it's in fact the default option via the FtpSource factory. This needs to be changed to accommodate the other features.

Having said that, I can think of a couple of alternatives. First, having an unique façade and different factory-like methods. Something like this:

Ftp.list(basePath: String, recursive: Bool, ....)
Ftp.retrieveFromPath(basePath: String, ....)
Ftp.putOnPath(targetPath: String, ....)
Ftp.removePath(targetPath: String, ...)
Ftp.moveFromToPath(origin: Path, destination: Path)

And the same for Ftps and SFtp. These factory methods would create different kinds of sources according to what needs to be done.

The other alternative could be to have different façades as FtpBrowser for browsing, FtpIO for retrieving and creation and so forth.

I've had a look at how Camel is dealing with this and it's hard to draw conclusions as Camel's semantics is quite different from Akka Streams. For instance, Camel let you retrieve all files on some directory whereas I feel more natural in Akka Streams to generate a stream of file descriptors and then retrieve them one by one asynchronously.

WDYT?

/cc @2m @ktoso @patriknw

@patriknw
Copy link
Member

patriknw commented Nov 1, 2016

I like the factory methods as you show in the example

juanjovazquez pushed a commit to Tecsisa/alpakka that referenced this issue Nov 22, 2016
juanjovazquez pushed a commit to Tecsisa/alpakka that referenced this issue Nov 25, 2016
juanjovazquez pushed a commit to Tecsisa/alpakka that referenced this issue Nov 25, 2016
juanjovazquez pushed a commit to Tecsisa/alpakka that referenced this issue Nov 25, 2016
juanjovazquez pushed a commit to Tecsisa/alpakka that referenced this issue Nov 25, 2016
juanjovazquez pushed a commit to Tecsisa/alpakka that referenced this issue Nov 25, 2016
johanandren pushed a commit that referenced this issue Nov 29, 2016
@johanandren johanandren modified the milestones: 0.2, 0.3 Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants