Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[W.I.P.] Add service-registry component (feedback wanted) #474
The goal of this pull request is to add support for registering Respose instances in Rackspace Service Registry.
The patch is unfinished and work in progress. All it currently does it adds a filter which performs the following actions:
I opened this pull request to start the discussion and get more feedback from Repose people on how to improve this patch to make it more "idiomatic" and better (best way to add tests, how to correctly use other abstractions such as handler, etc.).
Implementing Filter requires the javax.servlet library
to your list of imports
The filter chain logic requires that the current filter call doFilter to continue the filter chain.
the getFilterConfig method only really returns the filename of the config file that the user would like to use. Within the system-model.cfg.xml when the user adds a filter to the filter chain they can include a 'configuration' attribute and point to a different config file than the default configuration.
We then pass this to a HandlerFactory which create request handlers whenever Repose receives a request. The ip-identity filter (https://github.com/rackerlabs/repose/tree/master/project-set/components/client-ip-identity/src/main/java/com/rackspace/papi/components/identity/ip) shows the basics of how we expanded the basic Filter methods (doFilter, destroy, and init).
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
First of all thanks for writing this. This feature looks looks to be a great addition to Repose. I've added some notes to your code, which I hope would help. I would like discuss this with you further to see if I can help get this up and running with Repose soon. Please log in to to our public IRC channel #repose on freenode.net for questions you may have.