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

Usage: Quick example regarding piece backend #58

Closed
0x4139 opened this issue Jan 14, 2016 · 6 comments
Closed

Usage: Quick example regarding piece backend #58

0x4139 opened this issue Jan 14, 2016 · 6 comments

Comments

@0x4139
Copy link

0x4139 commented Jan 14, 2016

Hi, can you give me a quick example on how the piece data backend should work?

@anacrolix
Copy link
Owner

@anacrolix
Copy link
Owner

Do you need more on this?

@0x4139
Copy link
Author

0x4139 commented Sep 5, 2016

I would like to know what kind of backend is the http one?, is something that you custom made or an already open solution, also it would be awesome if you could update the example to be used with the latest version of the api. Thank you!

@anacrolix
Copy link
Owner

It's a custom HTTP based protocol I made that lets you do simple file manipulation using PUT, GET, DELETE, PATCH with HTTP range requests. The storage backend has changed quite a bit since this issue was first opened. Do you specifically need an example with HTTP or do you just want to write your own piece-based storage backend?

@anacrolix anacrolix reopened this Sep 6, 2016
@0x4139
Copy link
Author

0x4139 commented Sep 6, 2016

I want to write a custom piece backend, and I need a small example
On how to write and read the pieces.

@anacrolix
Copy link
Owner

Take a look at one of the in ./storage. There's file, mmap, pieceBased, and bolt backends now. The bolt one is probably pretty good for an all-in-one implementation.

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

No branches or pull requests

2 participants