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

Allow new members to select old files #141

Open
geiseri opened this issue Apr 2, 2022 · 5 comments
Open

Allow new members to select old files #141

geiseri opened this issue Apr 2, 2022 · 5 comments
Labels
feature New feature or request

Comments

@geiseri
Copy link

geiseri commented Apr 2, 2022

In my usecase I tend to select a file for transfer and then send the "link" to people over chat or email. Currently I use nextcloud shares for that but that lacks the ability to swarm files. I tried instant.io but its UX has some "gaps" compared to blaze.

Currently members whom have not already be joined before the transfer has been started would not be able to access that file. In this case it would be nice to allow these newly joined members to select the old transfers are still being seeded by the current members of the room. Since it looks like currently the transfer is stored in memory this could get expensive for the group members. It might be feasible to retain past transfers in local storage so that new members to see those torrents on join. The new room members can then select that torrent for download from the current group members. I would suggest session storage but the maximum size would be too small to share anything meaningful. To keep the local storage from getting out of control some sort of LRU can be used to only keep the N most recent transfers. One other option might be to pair the cache with the room so that when a member leaves a room the cache can be cleared. This would allow the ability for members to join/leave instant rooms when their interest in the content changes.

@blenderskool
Copy link
Owner

@geiseri This is a very interesting feature. Some of my thoughts:

  • This will only work when WebTorrent transfer is used. I wonder if we can make it work even when WebSockets transfer is used(as a fallback), although not a requirement.
  • Right now the torrent is destroyed on the client after it has been transferred to all the active peers. This logic would need to be updated to allow the files to be seeded for some more time before it gets destroyed. Perhaps each peer has the last 3-4 shared files being seeded, or maybe some sort of Last Recently Shared scheme.
  • We'll have to come up with a good UI and UX for a new peer to choose the file they wish to download. Either we show a one-time modal or a button to choose the available files for download.

It might be feasible to retain past transfers in local storage so that new members to see those torrents on join. The new room members can then select that torrent for download from the current group members. I would suggest session storage but the maximum size would be too small to share anything meaningful. To keep the local storage from getting out of control some sort of LRU can be used to only keep the N most recent transfers. One other option might be to pair the cache with the room so that when a member leaves a room the cache can be cleared. This would allow the ability for members to join/leave instant rooms when their interest in the content changes.

I don't fully understand these lines. Do you mean to retain the past transferred files or their metadata to local storage? We can't store binary data in local storage AFAIK and its size is quite limited to store full files.

Either way, this is a fairly advanced feature and I would keep it for a future major release in case we go ahead with implementing it 🙂

@blenderskool blenderskool added the feature New feature or request label Apr 10, 2022
@geiseri
Copy link
Author

geiseri commented Jul 1, 2022

@blenderskool I was thinking about this I am not sure it does make sense without using a wider DHT to share a magnet link. So this might be pushing a square peg in a round hole. Feel free to close this if you want to clear out open issues. It is still an awesome tool!

@Udayraj123
Copy link

@blenderskool have you considered using Native File System API for this?
What if Blaze asks for permissions to access a local directory and just save their file-paths for resending them?
https://whatpwacando.today/file-system

I understand this may lead to a privacy issue, we can let users use the feature only on opt-in.

@blenderskool
Copy link
Owner

@Udayraj123 Yes, I've did take a look at file system API for reading / writing to a file during transfers but not for this particular task.
If we can store the paths(or references) to past shared files if user gives permission, then we can allow others to choose from these files and start the file sharing progress.

@Udayraj123
Copy link

It would be a really cool feature to have then! I'll ask for more details, in case I end up building something similar for OMRChecker. I am considering to build that on top of local rooms feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants