Skip to content

REST Clients Discussion

ramonwirsch edited this page Sep 20, 2014 · 1 revision

Old manual client

  • ThreadPool
  • Database work on worker thread
  • non-preemptive authentication (reacts on realm) using HttpUrlConnection
  • not cancelable
  • manual json conversion (extremely inefficient)
  • ugly code

Jersey

  • Massive functionality
  • 5 times larger that everything else
  • no Auth based on realm
  • preemptive Auth, Basic + Digest
  • Full Jackson support
  • matches Server side
  • JAX-RS

Volley

  • from AOSP
  • lightweight
  • internal queue, with priority and order
  • handles retries / no network most efficient
  • caching
  • JSONArray / JSONObject support only
  • Callbacks always (!) on UI Thread
  • Auth handling based on HttpUrlConnection

Retrofit

  • lightweight
  • queue, customizable, executors for work / callbacks
  • very fast
  • GSON built in, Jackson compatible (inefficient implementation, transmit: -> String -> Stream)
  • super easy API, works similar to jersey on Server side
  • No Auth handling, -> HttpUrlConnection

Jetty

dk

Clone this wiki locally