Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building a Reactive Database Driver on the JVM

Building a Reactive Database Driver on the JVM

This talk was given at Span London 2014, a great single track conference about distributed systems.

Recording will also be available through Skills Matter.

Michael Nitschinger

October 28, 2014
Tweet

More Decks by Michael Nitschinger

Other Decks in Programming

Transcript

  1. JSON JSON JSON JSON JSON PERFORMANCE Scalability PERFORMANCE Performance Always

    On JSON JSON JSON JSON JSON PERFORMANCE Flexibility
  2. Java SDK 1.* • Extends Spymemcached • Adds Config &

    View Capabilities • Stable & Mature • Older codebase, difficult to maintain and evolve • API inconsistencies over time
  3. Event Iterable<T> Observable<T> data retrieval T  next() onNext(T) discover error

    throws  Exception onError() complete returns onCompleted()
  4. Lessons Learned • Huge benefit in exposing reactive APIs •

    Also expose a synchronous API • Consistency matters • Document observable failure scenarios • Expect a learning curve, documentation helps
  5. Lessons Learned • Build for the JVM, not for Java

    • Benchmark early and often • Implicit batching amortizes slow consumers • Use explicit back pressure to avoid swamping • Use Netty for IO and be happy • Bundle your dependencies