Skip to content

Add listening-announcer extension#2286

Closed
drcrallen wants to merge 2 commits intoapache:masterfrom
metamx:listener
Closed

Add listening-announcer extension#2286
drcrallen wants to merge 2 commits intoapache:masterfrom
metamx:listener

Conversation

@drcrallen
Copy link
Copy Markdown
Contributor

This extension is proposed as a means for "capability" discovery. For this discussion any specific capability is a group of resources which can be defined by IDs and are essentially cluster-wide resources (resource with unique id across all of cluster)

The most notable example of things which would fit under "capability" are

  • Serving deep storage Segments for querying
  • Lookup namespaces used in querying
  • Tasks (maybe?)

This PR proposes a different paradigm for such items such that all services which can host capacity based on IDs can guarantee a very basic post/get/delete. Any extra functionality beyond a simple post/get/delete is not guaranteed by this paradigm, but any implementation may wish to expose a SEPARATE endpoint with the expanded functionality. An such an implementation is encouraged to use the mechanisms in this PR for capability discovery.

This PR uses ZK/Curator ServiceDiscovery to find the instances with a capability, and relies on http REST calls to manage the post/get/deletes to the instances.

This PR does not have any concept of state, and any particular implementation is expected to manage its own state and maintain its own reconciliation expectations on cluster state conflicts.

An example of a use case can be seen in https://github.com/metamx/druid/blob/queryTimeLookup_announce/extensions/namespace-lookup/src/main/java/io/druid/server/namespace/NamespacedExtractionModule.java#L262

TODO:

@drcrallen
Copy link
Copy Markdown
Contributor Author

@nishantmonu51 this is the core part of what I was speaking to you about the other day

@drcrallen
Copy link
Copy Markdown
Contributor Author

@cheddar / @b-slim I was planning on using this to communicate namespace lookups around to the cluster. Please let me know if you have any comments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If accepted as part of mainline druid this would probably merge into ZkPathsConfig

@guobingkun
Copy link
Copy Markdown
Contributor

@drcrallen I wonder if this PR overlaps #2242, where I've been working on separating internal/external announcement and Druid service discovery.

@drcrallen
Copy link
Copy Markdown
Contributor Author

@guobingkun partly. which is why I put it up as quickly as I could. I was using the approach from this PR in the metadata propagation for QTL, but thought it might be able to be used for stuff at a wider capacity.

There are separate parts of your PR compared to this one. It would be a good idea for you, myself, and @xvrl to sync up to come up with a unified approach and distinction of responsibilities for the micro-components in the PRs.

@drcrallen
Copy link
Copy Markdown
Contributor Author

As per @cheddar 's comments in #2040 (comment) this probably should start off with an Announcer-like interface rather than using ServiceDiscovery.

@drcrallen
Copy link
Copy Markdown
Contributor Author

Spoke with @cheddar a bit yesterday and will be implementing some of the suggestions. namely: move the AbstractGET/POST/DELETE to a single class.

@drcrallen
Copy link
Copy Markdown
Contributor Author

This may or may not be desired in general. I find it handy for the lookup stuff.

@drcrallen
Copy link
Copy Markdown
Contributor Author

I went with including this with the lookup stuff instead of separately. Closing down for now.

@drcrallen drcrallen closed this Feb 17, 2016
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