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

nsqd: consider publicly exporting diskQueue #764

Closed
jaytaylor opened this issue May 25, 2016 · 10 comments
Closed

nsqd: consider publicly exporting diskQueue #764

jaytaylor opened this issue May 25, 2016 · 10 comments

Comments

@jaytaylor
Copy link

jaytaylor commented May 25, 2016

First off, thank you for DiskQueue! It's the best go implementation of a disk-backed channel-esque data structure that I've found!

I have been using it and it's great, but I'm sure you can imagine that hand-applying updates sucks!

Would you please consider making diskQueue publicly exported so it can be used as a "normal" dependency?

In case it is helpful, here is a copy of the ported DiskQueue I'm currently using (obviously there is a lot more stuff I ported over, including interfaces and unit-tests, etc):

https://gist.github.com/jaytaylor/71ae326116d9d5492250022025a2015a

Also I am curious - is there a way to get the disk queue to delete or clear out the .dat files? I've invoked .Empty() which reset the metadata, but the .dat file lives on at the same size as before (even though Depth()==0).

@mreiferson
Copy link
Member

yea, we probably should

@mreiferson mreiferson changed the title Please consider publicly exporting diskQueue nsqd: consider publicly exporting diskQueue May 26, 2016
@ploxiln
Copy link
Member

ploxiln commented May 26, 2016

If there is a chance of #625 (replace diskQueue with a write-ahead log) eventually getting done, it would be kinda funny to have exported the original diskQueue

@jaytaylor
Copy link
Author

Can we get it moved out to it's own repository then, perhaps?

@stephensearles
Copy link

I don't think #625 should conflict with this. I could be wrong here, but the interface, I'd guess, will stay mostly the same? It's more like, with #625, that diskQueue will be used a little differently by NSQ to promptly store things and give clients more assurance about that, but it shouldn't fundamentally change writing a stream of events to disk.

@jaytaylor
Copy link
Author

What are your thoughts on possibly relocating DiskQueue into it's own external repository?

@mreiferson
Copy link
Member

That would seem to be the likely path if we do export it.

@didip
Copy link

didip commented Jan 10, 2017

Count me in as one other person that's been forking diskqueue.go and applying upstream patch by hand.

It would be super awesome if DiskQueue is publicly exportable.

@mreiferson
Copy link
Member

OK, fine

@mreiferson
Copy link
Member

see #847

@jaytaylor
Copy link
Author

@mreiferson Thank you!

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

No branches or pull requests

5 participants