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

Refactor guid, message, queue #626

Closed
wants to merge 2 commits into from

Conversation

Dieterbe
Copy link
Contributor

what do we think about this?

note: currently causes go test to fail. haven't figured it out yet, wanted to check first if the general idea looks good.

first, we make the GUID library publically usable.
This requires a few other needed changes that are also useful
in their own right, basically make small packages unaware
of the things that implement them.
I.e. GUID's need not be aware of the messages using them, and
messages need not be aware of the queues using them.
@Dieterbe Dieterbe changed the title Refactor guid message queue Refactor guid, message, queue Aug 10, 2015
@@ -9,4 +11,5 @@ type BackendQueue interface {
Delete() error
Depth() int64
Empty() error
WriteMsg(buf *bytes.Buffer, msg *Message) error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional for DiskQueue to not have first class knowledge of Message - that's why we had the shim in between the two.

@mreiferson
Copy link
Member

@Dieterbe I appreciate the effort to clean things up. As per my two comments above, I don't think we would land this.

If you want to get your feet wet with the codebase, might I suggest some of the contributor-friendly issues?

@Dieterbe
Copy link
Contributor Author

i see. totally get DiskQueue should not deal with message concepts, makes total sense.
(after all i've also yanked out the diskqueue for user in other projects)

the main thing i wanted to achieve is make Guid public so that i could embed nsqd into my app publish messages through the go api instead of tcp, the only thing seemingly needed for that is the Guid stuff.

but i read your comment on the mailing list that you're not a big fan approach, so maybe i ishould just deal with it and use the network api. (through the go-nsq library) though i still think direct calls are a lot more robust.

@mreiferson
Copy link
Member

but i read your comment on the mailing list that you're not a big fan approach, so maybe i ishould just deal with it and use the network api. (through the go-nsq library) though i still think direct calls are a lot more robust.

It's really just that we don't want to have the burden of publicly supporting the in-process API. Besides, I think it would result in a deployment that is too tightly coupled. NOTE: You can still generate your own message IDs, without any of the changes in this PR.

Going to close this.

Thanks again!

@mreiferson mreiferson closed this Aug 10, 2015
@Dieterbe
Copy link
Contributor Author

thank you Matt, for the nice work :)

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

Successfully merging this pull request may close these issues.

2 participants