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

HTTP Lane Directives #7

Open
4 tasks
c9r opened this issue Aug 7, 2019 · 0 comments
Open
4 tasks

HTTP Lane Directives #7

c9r opened this issue Aug 7, 2019 · 0 comments
Assignees
Labels
A-lane Area: lanes C-enhancement Category: enhancement

Comments

@c9r
Copy link
Member

c9r commented Aug 7, 2019

Extract the HTTP lane routing logic from swim.service.web.WebServer into a generalized swim.service.web.HttpLaneRoute class.

  • Implement HttpLaneRoute, taking an EdgeContext, a node URI, and a lane URI as parameters.
  • Add a LaneAddress POJO to swim.runtime, with hostUri, nodeUri, and laneUri fields (i.e. a 3-tuple of (Uri, Uri, Uri)).
  • Implement HttpLaneDirective, taking a java.util.Function<WebRequest, LaneAddress> as its parameter, which behaves like HttpLaneRoute, but dynamically computes the address of the HTTP lane to which it routes.
  • Modify swim.service.web.WebServer to use HttpLaneRoute, keeping it compatible with the current fixed-function configuration format. That format will be deprecated once the Web routing DSL (Web Routing DSL #6) is ready to replace it.

Due to the lack of extension methods in Java, we unfortunately can't add a WebRoute combinator function for producing HTTP Lane routes.

@c9r c9r added the C-enhancement Category: enhancement label Aug 20, 2019
@c9r c9r added the A-lane Area: lanes label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lane Area: lanes C-enhancement Category: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants