Dragonfly icon indicating copy to clipboard operation
Dragonfly copied to clipboard

How to upload general files to dragonfly??

Open everpeace opened this issue 5 years ago • 7 comments

Thank you for sharing the cool project!

Question

I'm planning to use dragonfly for general contents distribution inside the kubernetes clusters.

How to upload generic files to dragonfly networks from some node?? I think dfget server is what I'm looking for. But, I can't find any API document of dfget server. Is there any document for that?? I would be happy if someone told me how to download the uploaded files from other peers.

everpeace avatar Dec 03 '19 08:12 everpeace

Thanks for your interest in Dragonfly project. Actually, the dfget can be used as a peer server in the p2p network. It isn't a file cache. If you want to distribute the file among kubernetes cluster with the help of Dragonfly, you can directly download it through dfget first time, the supernode will help you cache the file. After that if you want to distribute the same file, it can be transferred among several dfget server.

You can follow this doc: https://github.com/dragonflyoss/Dragonfly/blob/master/docs/user_guide/download_files.md

fengzixu avatar Dec 03 '19 09:12 fengzixu

@fengzixu Thanks for the quick reply!

you can directly download it through dfget first time, the supernode will help you cache the file.

So, does dragonfly currently support only http/https protocol to download the contents?? Am I correct??

everpeace avatar Dec 03 '19 09:12 everpeace

You also can detect this design doc to know how Dragonfly works: https://github.com/dragonflyoss/Dragonfly/blob/master/docs/design/design.md

fengzixu avatar Dec 03 '19 09:12 fengzixu

@fengzixu Thanks for the quick reply!

you can directly download it through dfget first time, the supernode will help you cache the file.

So, does dragonfly currently support only http/https protocol to download the contents?? Am I correct??

You are right.

fengzixu avatar Dec 03 '19 09:12 fengzixu

So, does dragonfly currently support only http/https protocol to download the contents?? Am I correct??

In fact, we have plans to support more protocols in the future. And could you please describe your needs in more detail? THX.

starnop avatar Dec 03 '19 09:12 starnop

we have plans to support more protocols in the future.

I'm glad to here that! In our expected use case, we would distribute the files mainly in two different locations:

  • in NFS volumes (file:// protocol)
  • in HDFS cluster (hdfs:// protocol)

as node-local contents cache.

I would be appreciated if Dragonfly supports more protocol. But, we have some workarounds. file:// protocol can be serviced with https protocol easilly. And hdfs:// can be served in https protocol with some tools like httpfs.

everpeace avatar Dec 03 '19 10:12 everpeace

FTP/SFTP ?

xq2248 avatar Jun 25 '20 12:06 xq2248