High-level HTTP client support #113

Open
akka-ci opened this Issue Sep 8, 2016 · 13 comments

Comments

Projects
None yet
3 participants
@akka-ci
Collaborator

akka-ci commented Sep 8, 2016

Issue by jrudolph
Wednesday Feb 11, 2015 at 13:54 GMT
Originally opened as akka/akka#16856


It would be convenient if akka-http would provide common high-level HTTP functionality similar to what a browser supports in its backend. This is a collection of all the things that would belong into this category. This is a metaticket and each subfeature has its own ticket.

  • connection pooling and configurable request queuing (provided by host-level API #15681)
  • request-level API (#15906)
  • automatic redirection (#15990)
  • automatic retry attempts (#16852)
  • try different IP addresses on retries (#16827)
  • HTTP proxy support (for HTTP: #16853, for HTTPS: #16153)
  • authentication data store (#16854)
  • cookie store (#16855)
  • response routing DSL (#15909)
  • request building should be polished and documented (akka/akka#18550)
  • optional: response decompression (akka/akka#16813)
  • optional: Add support for OAuth authentication #16857

@akka-ci akka-ci added this to the http-backlog milestone Sep 8, 2016

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by kanerogers
Monday Mar 09, 2015 at 21:20 GMT


Awesome. Looking forward to this.

Collaborator

akka-ci commented Sep 8, 2016

Comment by kanerogers
Monday Mar 09, 2015 at 21:20 GMT


Awesome. Looking forward to this.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by jvican
Friday Apr 03, 2015 at 00:07 GMT


Me too. Great and necessary features!
If you need any contribution, let me know and I will help.

Collaborator

akka-ci commented Sep 8, 2016

Comment by jvican
Friday Apr 03, 2015 at 00:07 GMT


Me too. Great and necessary features!
If you need any contribution, let me know and I will help.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by rkuhn
Tuesday Jun 16, 2015 at 07:59 GMT


Thanks for your offer to help, the core team will likely not get around to these anytime soon.

Collaborator

akka-ci commented Sep 8, 2016

Comment by rkuhn
Tuesday Jun 16, 2015 at 07:59 GMT


Thanks for your offer to help, the core team will likely not get around to these anytime soon.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by ktoso
Friday Oct 09, 2015 at 07:43 GMT


Somewhat related to akka/akka#18550

Collaborator

akka-ci commented Sep 8, 2016

Comment by ktoso
Friday Oct 09, 2015 at 07:43 GMT


Somewhat related to akka/akka#18550

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by ktoso
Tuesday Nov 24, 2015 at 14:33 GMT


For reference when designing the client side:

I bumped into very nice blog post which compared different Scala HTTP clients, among others Spray and Play:
https://www.implicitdef.com/2015/11/19/comparing-scala-http-client-libraries.html
I agree with the article that "dead simple" should be a focus of the Client Side, and the awesome stuff should be additions.

// cc @sirthias @jrudolph

Collaborator

akka-ci commented Sep 8, 2016

Comment by ktoso
Tuesday Nov 24, 2015 at 14:33 GMT


For reference when designing the client side:

I bumped into very nice blog post which compared different Scala HTTP clients, among others Spray and Play:
https://www.implicitdef.com/2015/11/19/comparing-scala-http-client-libraries.html
I agree with the article that "dead simple" should be a focus of the Client Side, and the awesome stuff should be additions.

// cc @sirthias @jrudolph

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by francisdb
Tuesday Nov 24, 2015 at 14:45 GMT


Could be a joined effort together with
playframework/playframework#4297 ?

Collaborator

akka-ci commented Sep 8, 2016

Comment by francisdb
Tuesday Nov 24, 2015 at 14:45 GMT


Could be a joined effort together with
playframework/playframework#4297 ?

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by ktoso
Tuesday Nov 24, 2015 at 14:49 GMT


Thanks for cross referencing to that ticket – I've commented there as well as you'll notice :-)
We definitely want to share bits of code with WS, we'll see how exactly we'll be able to do that (it's SSL/TLS handling is excellent).

Collaborator

akka-ci commented Sep 8, 2016

Comment by ktoso
Tuesday Nov 24, 2015 at 14:49 GMT


Thanks for cross referencing to that ticket – I've commented there as well as you'll notice :-)
We definitely want to share bits of code with WS, we'll see how exactly we'll be able to do that (it's SSL/TLS handling is excellent).

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by hepin1989
Tuesday Nov 24, 2015 at 15:27 GMT


I just encounter this problem too,and then just try the AHC.A higher level like play-ws would be really helpful,the current singleRequest one is not that handy.for the Play-WS,I don't think that could be split out,but for later,maybe we could have two implement of play-ws,one for the AHC one and one for the AKKA based one,anyway there is a WSAPI.

For the client side there is https://github.com/eBay/parallec which we may take a look too.

Collaborator

akka-ci commented Sep 8, 2016

Comment by hepin1989
Tuesday Nov 24, 2015 at 15:27 GMT


I just encounter this problem too,and then just try the AHC.A higher level like play-ws would be really helpful,the current singleRequest one is not that handy.for the Play-WS,I don't think that could be split out,but for later,maybe we could have two implement of play-ws,one for the AHC one and one for the AKKA based one,anyway there is a WSAPI.

For the client side there is https://github.com/eBay/parallec which we may take a look too.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by ktoso
Tuesday Nov 24, 2015 at 15:32 GMT


for the Play-WS,I don't think that could be split out,but for later

I think it is crucial we do this. no one wants to re-implement the awesome work around SSL/TLS handling Will did in there. We, in Akka HTTP, are focusing to have a solid basis to build APIs on - easy to use API comes next :-)

I'm not too sure about parallec, I skimmed the dependencies and it's somewhat of a weird mix. Also, its use case is very specific, not a general purpose Http Client I feel.

Collaborator

akka-ci commented Sep 8, 2016

Comment by ktoso
Tuesday Nov 24, 2015 at 15:32 GMT


for the Play-WS,I don't think that could be split out,but for later

I think it is crucial we do this. no one wants to re-implement the awesome work around SSL/TLS handling Will did in there. We, in Akka HTTP, are focusing to have a solid basis to build APIs on - easy to use API comes next :-)

I'm not too sure about parallec, I skimmed the dependencies and it's somewhat of a weird mix. Also, its use case is very specific, not a general purpose Http Client I feel.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by hepin1989
Tuesday Nov 24, 2015 at 15:47 GMT


Yes,our team is continuse to using Play-WS like thing,we wrap it ourself for none-play project,and for akka-http I think it should support https://github.com/netty/netty-tcnative for OpenSSL-based SSLEngine implementation:).

Collaborator

akka-ci commented Sep 8, 2016

Comment by hepin1989
Tuesday Nov 24, 2015 at 15:47 GMT


Yes,our team is continuse to using Play-WS like thing,we wrap it ourself for none-play project,and for akka-http I think it should support https://github.com/netty/netty-tcnative for OpenSSL-based SSLEngine implementation:).

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by francisdb
Tuesday Nov 24, 2015 at 15:52 GMT


Exactly. Anybody that wants to create a library that needs to do http calls (reactive database driver, ...) needs to make a decision on what client to use. Currently it's a hard choice. Since there is no good default. I would love to use play-ws but it's to bloated with all it's dependencies.

Collaborator

akka-ci commented Sep 8, 2016

Comment by francisdb
Tuesday Nov 24, 2015 at 15:52 GMT


Exactly. Anybody that wants to create a library that needs to do http calls (reactive database driver, ...) needs to make a decision on what client to use. Currently it's a hard choice. Since there is no good default. I would love to use play-ws but it's to bloated with all it's dependencies.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by jeffpeiyt
Tuesday Dec 01, 2015 at 06:05 GMT


@ktoso Yes, Parallec does focus on some large scale use cases (such as serving as agent master to manage a lot of agents or making a lot of concurrent calls). It uses AHC and also supports TCP/PING/SSH, which may make the dependency looks mixed.

Probably @hepin1989 means that he likes Akka HTTP to have some level of built in concurrency control to handle large scale calls.

Collaborator

akka-ci commented Sep 8, 2016

Comment by jeffpeiyt
Tuesday Dec 01, 2015 at 06:05 GMT


@ktoso Yes, Parallec does focus on some large scale use cases (such as serving as agent master to manage a lot of agents or making a lot of concurrent calls). It uses AHC and also supports TCP/PING/SSH, which may make the dependency looks mixed.

Probably @hepin1989 means that he likes Akka HTTP to have some level of built in concurrency control to handle large scale calls.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Sep 8, 2016

Collaborator

Comment by ktoso
Wednesday Apr 13, 2016 at 08:32 GMT


comment via @2beaucoup:

I can imagine that additional shortcuts like HTTP().get("http://akka.io/") could become handy. But that would be another alternative way of doing things. Oh my...

Yeah, however may be worth drafting a bit as experimental side/pet project in any case...

I toyed around with it and the nice idea about it is that fluent DSLs can lead towards doing only the right thing (also, not allow calling request unless dataBytes sink (or "please drain but i dont care") is defined etc.

Another answer would be WS is we're able to make it have switchable impls and rip it out (which is in progress).

Up for grabs and opinions still.

Collaborator

akka-ci commented Sep 8, 2016

Comment by ktoso
Wednesday Apr 13, 2016 at 08:32 GMT


comment via @2beaucoup:

I can imagine that additional shortcuts like HTTP().get("http://akka.io/") could become handy. But that would be another alternative way of doing things. Oh my...

Yeah, however may be worth drafting a bit as experimental side/pet project in any case...

I toyed around with it and the nice idea about it is that fluent DSLs can lead towards doing only the right thing (also, not allow calling request unless dataBytes sink (or "please drain but i dont care") is defined etc.

Another answer would be WS is we're able to make it have switchable impls and rip it out (which is in progress).

Up for grabs and opinions still.

@ktoso ktoso added 1 - triaged and removed t:http labels Sep 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment