Then I extended the official Cassandra image with the addition of dnsutils (for the dig command) and a custom entrypoint that configures seed nodes for the container. The new entrypoint script is pretty straight forward:

I recently wanted to set up a local Kubernetes cluster for development on my Mac. I tried many howtos in various state of staleness and brokenness. The official Vagrant setup didn’t even work for me on OS X until yesterday.

Google already has the tech to build the best read-it-later service bar none. It understands web content like no other and can even crawl JavaScript applications. Google can unshackle content that I actually want to read from all the surrounding noise.

Google can, but unfortunately it won’t. Doing so would anger content owners, the people that Google relies on to display its ads. And that’s a pity.

I’ve been learning myself some Elixir lately. Unfortunately, I’ve only been able to sip while I really want to be gulping the stuff down. There aren’t enough hours in a day. Sometimes a week passes between study sessions and it’s hard for me to find my bearings when I come back to the language after a break. So I’ve started writing some study notes. I find that it helps me internalise the syntax and makes what I’m learning more sticky. The result is more than just a cheat sheet, but remains easy to glance through.

It’s a work in progress, but might be useful to somebody: Elixir notes.

Elixir is a functional, meta-programming aware language built on top of the Erlang VM. It is a dynamic language that focuses on tooling to leverage Erlang’s abilities to build concurrent, distributed and fault-tolerant applications with hot code upgrades.

Retrofit from Square, and RxJava from Netflix, are a great combo for interacting with web services on Android.

Retrofit

Retrofit is a REST client for Android and Java. It allows you to turn a REST API into a Java interface by using annotations to describe the HTTP requests. It can then generate an implementation of the interface for you. This means that you can go from:

GET /users/{userId}/posts

to:

webService.fetchUserPosts(userId)

in a few lines of code. Retrofit is very easy to use and it comes with RxJava integration.

RxJava

RxJava is a Java implementation of Rx, the Reactive Extensions library from the .NET world. It allows you to compose asynchronous and event-based programs in a declarative manner. Let’s say that you want to implement something like this:

Start observing our current location. When a location change happens, in parallel

Send a web service request A

Send a web service request B

Using the result from B, send a web service request C

When the results for both A and C are back, update the UI

RxJava allows you to write out your program pretty much as above. It abstracts out concerns about things like threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O. You can tell RxJava to observe the location changes and perform the web service requests in a background thread, and pass you the final results in the UI thread. If any exceptions are thrown at any point in the chain of events, you get told about it in one convenient place. You’re not drowning in a spaghetti of onSuccess and onError callbacks. You’re building pipelines.

I’m sold. Show me the code!

Sounds good? I’ve got some code to get you started. RexWeather is a simple app that demonstrates the use of Retrofit and RxJava on Android. The app queries the current location, then fetches the current weather and seven day forecast from OpenWeatherMap.

You can grab the Android Studio project from GitHub. The code is BSD-licensed, so feel free to use and share.