java - Pros and Cons of Clojure http client libraries -


i trying write http file downloader in clojure, , in one of other questions, commented using dedicated http client library better coding clojure's , java's own api. did research , found some, couldn't figure out features, pros , cons of each. if 1 can explain how different , 1 match project, appreciated. :-d

libraries in java, , corresponding clojure wrappers:

apache httpclient , clojure wrapper clj-http

apache httpasyncclient , couldn't find clojure wrapper.

netty , clojure "wrapper" aleph, guess?

async http client , clojure wrapper http.async.client

last not least, clojure library:

http-kit

i can compare http-kit , clj-http.

clj-http:

  • simple api
  • http client only
  • a wrapper apache httpcomponents

http-kit:

  • designed async
  • http client , server, more powerful
  • client api modeled after clj-http adds more abstractions cognitive load higher

if care dependencies, http-kit may better choice because standalone library no other dependencies clojure.core. because of produces smaller uberjars. sample http project:

clj-http:  1.2m    clj-http-test-0.1.0-snapshot.jar 6.7m    clj-http-test-0.1.0-snapshot-standalone.jar  http-kit:  65k     http-kit-test-0.1.0-snapshot.jar 3.8m    http-kit-test-0.1.0-snapshot-standalone.jar 

on other hand may choose clj-http if prefer trust battle tested apache httpcomponents , potentially better support bigger java community.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -