mp911de

  • The future of lettuce

    In May 2014, I needed a Redis client. I had to collect log events within Redis (see https://github.com/mp911de/logcapture) during integration tests. The nature of integration tests and log events is, when tests are running, a lot is logged, but after the tests the connection is idle. Several clients caused connections to run into defective states, and I did not want remote log capturing kills my integration tests. So I took the best client amongst them all and started to fix the issues that were show stoppers.

    Now, about a year later, lettuce 3.2 is the most recent version, three versions were released since then. Developing lettuce is amazing. It’s by far the most advanced low-level client. There are others like Spring Data Redis or Redisson that provide high-level functionality. I’m not talking about those high-level clients. I guess, my biggest mistake was connection pooling. I was supercilious, and I was convinced, that connection pooling is a killer feature and a must. I had only my use case on my mind. @wg did not like connection pooling, too, and most probably it is the reason, why he never merged my pull request.

    However, my best decision was to start working on lettuce. I learned a lot, and I was able to support nearly all Redis 3.0 features: Sentinel, Cluster and a ton of commands. The features are well received, and the downloads increase every month.

    The question might arise: Where is the journey heading? What are the strategy and the roadmap?

    I want lettuce to be the most easy-to-use, advanced, and, flexible Java Redis client. I want to provide a synchronous, an asynchronous and a reactive API. Spinach, the Java Disque client, is built on top of lettuce. A pull request for Spring Data Redis, upgrade lettuce to 3.2, is already in progress.

    The roadmap for lettuce 4.0:

    • Advanced Cluster API: Provide means to run commands on a selected set of cluster nodes
    • Pipelining for specific cluster commands
    • Improve RedisFuture
    • Add a reactive API
    • Drop Java 6 and 7 support and maintain the 3.x branch for a certain time.
    • Streamline connection resources, so that users can use different API’s for the same resource
    • More community feedback

    I learned that plain Java futures are not flexible enough, that’s the reason, why RedisFuture is a ListenableFuture. Lettuce 4.0 will use CompleteableFutures under the hood, and this will change the behavior. Currently RedisFuture.get does not throw an exception when the command errored within Redis. The ´RedisFuture.getError´ method provides the error text. CompleteableFuture‘s require to complete either with a result or with an exception, and that, will be a breaking change for async users.

    Although downloads and the user base grow, the community around lettuce is far too small. I am grateful for every feedback and discussion on lettuce and it’s API.

    I want the community to grow. I created recently the mailing list/Google Group lettuce-redis-client-users and updated the contribution readme. Github Issues and the mailing list are great starting points to contribute.

  • Redis Client lettuce 3.2 Final released

    This release features Unix domain sockets on linux-x86_64 systems. Local connections to a Redis instance are now possible without the use of the network. A second feature with a huge impact is client options. Client options allow to control behavior on a fine-grained base. It is now possible to turn off auto-reconnect, validate the connection with a PING before activating the connection for client usage and many more.

    (more…)

  • Redis Client lettuce 3.2 Beta1 released

    This release features Unix domain sockets on linux-x86_64 systems. Local connections to a Redis instance are now possible without the use of the network. A second feature with a huge impact is client options. Client options allow to control behavior on a fine-grained base. It is now possible to turn off auto-reconnect, validate the connection with a PING before activating the connection for client usage and many more.

    (more…)

  • On Crafting Software

    It has been over a year ago the project started that I’m currently working on. This project had the goal to create an archiving service for grocery point of sales receipts. We ended up with creating an outstanding system that might become the new blueprint for software applications within the customers’ software development departments.

    I’m now on a Java/JBoss/AngularJS project, that is heading towards it end. A triumphal end, since we created an outstanding software system in many various ways. The most impressive, the application has the potential to be the blueprint for future applications. It will influence how applications will be developed and operated in this particular customers’ software development teams. Here is the story.

    TL;DR;

    Focus on the important things. Choose your architecture style according to your needs. Functional requirements are by far not everything that make a successful software development venture. Postpone major decisions. Always be aware of the things you do, be lean, do TDD and automated integration/acceptance tests, use Continuous Delivery, make yourself a comfortable life with always delivering a bit more than required.

    (more…)

  • Approaching end of “It worked on my machine!”

    You might have noticed it if you are a developer. In rare occasions, there might be the case a particular artifact runs on your machine. But not anywhere else. This issue is known as the “It works on my machine” problem. As soon as this happens, …

    There are several causes, why this might happen. Either a different build process is used, the build environment is different, the way how you deploy is slightly different, the runtime environment differs from the others, the config looks like different, … or a thousand more reasons might have caused that the artifact runs just on one machine.

    (more…)

  • Redis Client lettuce 3.1 Final released

    This release introduces support for SSL, enables lambda expressions on streaming channels and a lot of bugfixes and resilience changes.
    lettuce extensibility is improved. You can override certain parts of the client to supply classes (connection classes) that behave the way you need by extending RedisClient or RedisClusterClient.
    You can reset the internal connection state in case you run into broken connections (invalid connection state due to SSL tunneling or others) by calling the reset() method on your connection.

    (more…)

  • Book Review: Couchbase Essentials

    Couchbase Essentials is a book written by former Couchbase Inc. developer John Zablocki. The book claims to be for developers, but it is valuable to software architects as well. The book starts with a lot of marketing about Couchbase, explaining the history from CouchDB and memcached. This chapter will guide its readers through a very detailed installation procedure that reminds on a very detailed Couchbase manual. Nearly every click is explained.

    (more…)

  • How to test a REST API with JUnit

    Do you want to test your REST API as soon as possible and without any hassle? The earliest point in the code where tests can occur is within the commit stage, where you can run unit tests. I want to present you an approach how to test REST API as soon as possible in an easy way. The example code is based on JUnit and RESTEasy. It does not require any external database or heavyweight application servers which means you can run it isolated and out of the box.

    (more…)

  • Capturing and visualizing sensor data using the ELK stack

    One day a coworker came to me convincing me: Let’s do something cool with internet of things and sensors. Until now, I did not know anything about IoT sensors but my first idea was a sonic sensor that tells the distance.

    (more…)

  • Found a new Book: Couchbase Essentials

    I got in touch with Couchbase a year ago. I attended a presentation of the Couchbase guys and learned that Memcached became a part of Couchbase. Until now I never had a chance to use Couchbase for more than just a play around. Recently I stumbled upon a new Book about Couchbase: Couchbase Essentials written by John Zablocki. I will let you know what I think about it and post my review here. Stay tuned.