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

Defaults - hyperlog #6

Closed
gmaclennan opened this issue Jan 15, 2016 · 2 comments
Closed

Defaults - hyperlog #6

gmaclennan opened this issue Jan 15, 2016 · 2 comments

Comments

@gmaclennan
Copy link
Member

Are there potential alternatives for hyperlog, or will this always be used? I am thinking we should make hyperlog a hard dependency and just pass the leveldb? If so we could just pass a single leveldb in the options and use sublevel? Are there performance gains from having two separate leveldbs?

Do we need opts.size or can this be read from the fd-store?

I'm thinking how we can reduce the complexity of the options.

@ghost
Copy link

ghost commented Jan 18, 2016

You might want to customize a hyperlog with different settings during instantiation, such as using signing keys or encryption. If a user already has a hyperlog used for different purposes on the outside, they can also use it for osm-p2p-db, but we should probably have a sublevel-style wrapper for hyperlog to support that use-case better.

I think it's better to manage the versions of hyperlog from the outside, so this module doesn't need to be updated for every possible breaking change in hyperlog. However, I think the spirit of this issue is more that we could have a wrapper module that pulls in osm-p2p-db and some other unwritten libs like osm-p2p-media with good defaults to make it easier to get started. Perhaps an osm-p2p module that sets up everything, including signing keys for hyperlog.

@ghost
Copy link

ghost commented Jan 29, 2016

This is all factored out into osm-p2p: http://github.com/digidem/osm-p2p

There were some surprisingly tricky parts to make this work without a callback, deferring the leveldb instances and the chunk store, but the resulting API is even friendlier.

@ghost ghost closed this as completed Jan 29, 2016
This issue was closed.
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

1 participant