plik icon indicating copy to clipboard operation
plik copied to clipboard

streaming to multiple clients

Open oupala opened this issue 2 years ago • 4 comments

Is it possible with plik to stream a file to multiple clients? If yes, I did not manage to do this...

This could be useful when trying to distribute a file to all attendees of a training.

oupala avatar Sep 14 '22 16:09 oupala

It is by design impossible to achieve this. The best is to upload the file and to delete it once everybody downloaded the file.

On Wed, Sep 14, 2022 at 6:20 PM oupala @.***> wrote:

Is it possible with plik to stream a file to multiple clients? If yes, I did not manage to do this...

This could be useful when trying to distribute a file to all attendees of a training.

— Reply to this email directly, view it on GitHub https://github.com/root-gg/plik/issues/456, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ5XPQC6G3D3KTJOYYL3DDV6H3OFANCNFSM6AAAAAAQMSQ4EU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

camathieu avatar Sep 14 '22 16:09 camathieu

You say it is impossible, but it appears that another tool is achieving this: Just drop it.

You can have a look at the third screenshot and see that the file is currently being distributed to two clients.

Is there any particular (design?) reason that make multiple streaming impossible to achieve for Plik, but possible for Just drop it?

oupala avatar Sep 14 '22 21:09 oupala

The current client / server architecture is not designed to achieve this without heavy modifications. It would need to be able to upload the same file several times in parallel and to serve it under the same URL.

On Wed, Sep 14, 2022, 23:20 oupala @.***> wrote:

You say it is impossible, but it appears that another tool is achieving this: Just drop it https://github.com/Orange-OpenSource/just-drop-it.

You can have a look at the third screenshot and see that the file is currently being distributed to two clients.

Is there any particular (design?) reason that make multiple streaming impossible to achieve for Plik, but possible for Just drop it?

— Reply to this email directly, view it on GitHub https://github.com/root-gg/plik/issues/456#issuecomment-1247314550, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ5XPVVJP6ELE3EVC3CW4DV6I6SJANCNFSM6AAAAAAQMSQ4EU . You are receiving this because you commented.Message ID: @.***>

camathieu avatar Sep 15 '22 06:09 camathieu

I think that this is the way Just drop it is working when streaming file to multiple clients: opening one websocket per client:

schema

I note that plik is currently designed for one to one stream transfer.

oupala avatar Sep 15 '22 08:09 oupala

There is no websocket involved. The content of the upload request body is piped directly to the download response body without any buffering

camathieu avatar Apr 13 '23 18:04 camathieu

For streaming to multiple clients maybe you can look at torrent protocols

camathieu avatar Apr 13 '23 18:04 camathieu

piping-server support stream to multiple client: https://github.com/nwtgck/piping-server#transfer-to-multiple-receivers

m2acgi avatar Nov 27 '23 03:11 m2acgi