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

ClientConnector abstraction #132

Closed
jmcc0nn3ll opened this issue Feb 16, 2016 · 5 comments
Closed

ClientConnector abstraction #132

jmcc0nn3ll opened this issue Feb 16, 2016 · 5 comments
Assignees

Comments

@jmcc0nn3ll
Copy link
Contributor

migrated from Bugzilla #423722
status ASSIGNED severity enhancement in component client for 9.1.x
Reported in version 9.1.0 on platform PC
Assigned to: Project Inbox

On 2013-12-10 11:15:07 -0500, Simone Bordet wrote:

While Jetty has a clear ServerConnector abstraction, that can work with multiple connection factories to handle a number of different protocols, a similar, client-side abstraction is missing for the client.

Requirements:

  1. Be able to wrap an existing SocketChannel, already connected, with Jetty's EndPoint and Connection objects.
  2. Support NPN or ALPN negotiation. This must be supported at 2 levels: in a SPDYClient and in a HTTPClient. The SPDY client part is already implemented, but the HTTPClient part is difficult to make it work, especially with the SPDY client transport. This is because HttpClient has its own SelectorManager, and the SPDY HttpClientTransport uses SPDYClient, which also has its own SelectorManager. When opening the connection, it is not known yet that the protocol will be SPDY, so HttpClient opens that SocketChannel. Then the SPDY protocol is selected, but it is now difficult to "pass" the opened socket to SPDYClient's SelectorManager.
  3. Be able to share a single SelectorManager component among different "clients". This is useful for HttpClientTransports
  4. Have a clear semantic for idle timeouts, especially for multiplexed protocols, at the connection level. What would it mean to set the connection idle timeout to 1000 ms for a multiplexed protocol ?

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=404889.

@sbordet sbordet self-assigned this Feb 17, 2016
@joakime
Copy link
Contributor

joakime commented Mar 13, 2018

@sbordet This has been implemented in jetty-client long ago, right? Can we close this?

@sbordet
Copy link
Contributor

sbordet commented Mar 13, 2018

Nope, not yet implemented, leave open.

sbordet added a commit that referenced this issue Jan 17, 2019
Introduced ClientConnector and refactored HttpClient transports,
removing duplicated code that was connect() to a remote host.

Refactored also HTTP2Client to reference ClientConnector.

Refactored tests accordingly to the changes introduced in the
implementations.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jan 18, 2019
Added name to default executor and scheduler after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jan 22, 2019
Rewrote HttpClientTransportOverUnixSockets in light of ClientConnector.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jan 22, 2019
Reverted refactoring of newConnection() to avoid
to bind the class to a too specific abstract method.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jan 31, 2019
sbordet added a commit that referenced this issue Feb 4, 2019
Introduced ClientConnector and refactored HttpClient transports,
removing duplicated code that was connect() to a remote host.

Refactored also HTTP2Client to reference ClientConnector.

Refactored tests accordingly to the changes introduced in the
implementations.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Feb 4, 2019
Added name to default executor and scheduler after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Feb 4, 2019
Rewrote HttpClientTransportOverUnixSockets in light of ClientConnector.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Feb 4, 2019
Reverted refactoring of newConnection() to avoid
to bind the class to a too specific abstract method.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@stale
Copy link

stale bot commented Nov 20, 2019

This issue has been automatically marked as stale because it has been a full year without activit. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale For auto-closed stale issues and pull requests label Nov 20, 2019
@joakime
Copy link
Contributor

joakime commented Nov 20, 2019

@sbordet isn't this complete (for Jetty 10) ?

@stale stale bot removed the Stale For auto-closed stale issues and pull requests label Nov 20, 2019
@sbordet
Copy link
Contributor

sbordet commented Nov 20, 2019

This was merged in #3267.

@sbordet sbordet closed this as completed Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants