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

Pinning Consumers - integration #145

Open
rpalcolea opened this issue Jan 10, 2018 · 0 comments
Open

Pinning Consumers - integration #145

rpalcolea opened this issue Jan 10, 2018 · 0 comments
Labels

Comments

@rpalcolea
Copy link
Member

rpalcolea commented Jan 10, 2018

Hi @toolbear,

I was wondering if there are plans to introduce the "Pinning Consumers" mechanism as a default in Hollow.

I think it would be nice if we could know when a consumer is pinned and expose this via the metrics or the API. something like consumer.isPinned() and/or consumer.getPinnedVersion(). This could help to triage issues when you have tens/hundreds of consumers with the same dataset but because of the nature of eventual consistency, a few of them could be stuck.

I don't have a clear idea on how this could be accomplish, my guess is that the AnnouncementWatcher could be modified to support the pinning mechanism and HollowConsumer expose the information, similar to:

public long getCurrentVersionId() {
        return updater.getCurrentVersionId();
}

Something like

public long getPinnedVersion() {
        return announcementWatcher.getPinnedVersion();
} 

It would be up to the users to store the pinned version in the announcementWatcher or read it from their database/blob storage every time they need this. getPinnedVersion should be another abstract method in AnnouncementWatcher.

From the HollowProducer perspective, I think Hollow could provide a versionPinner in the builder that takes an VersionPinner (new interface). e.g.

HollowProducer producer = HollowProducer.withPublisher(new FakeBlobPublisher())
                                                .withAnnouncer(new MyAnnouncer(tmpFolder))
                                                .withVersionPinner(new MyVersionPinner());

Then, probably the HollowProducer could have a pinVersion method that takes the version number as an argument and invokes versionPinner.pin(long pinnedVersion). This way users could programmatically pin version from the producer either by background jobs based on their own business rules or as simple as expose the pinVersion as a HTTP endpoint.

Also it could have the unpin.

thoughts?

rpalcolea pushed a commit to rpalcolea/hollow that referenced this issue Jan 10, 2018
@ghost ghost added the proposal label Jan 19, 2018
Sunjeet pushed a commit that referenced this issue Apr 10, 2019
* commit '33a14107c1cc34b2c29e2daf2616ff253687b7ce':
  use cinder context instead of direct impl, rely on bindings in module for impl
  corrections after merging in from master
  Adding cinder context in cinder-api to provide implementations for metric, configurations, logger and namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant