Home » JVM Languages » Page 31

JVM Languages

For All You Know, It’s Just a Java Library

Blast from the past… I wrote this in May, 2008… and I’ve gotta say, I was pretty spot-on including Java 8 adopting some of Scala’s better features: It’s starting to happen… the FUD around Scala. The dangers of Scala. The “operational risks” of using Scala. It started back in November when I started doing lift and Scala projects for hire. ...

Read More »

Property-based testing with Spock

Property based testing is an alternative approach to testing, complementing example based testing. The latter is what we’ve been doing all our lives: exercising production code against “examples” – inputs we think are representative. Picking these examples is an art on its own: “ordinary” inputs, edge cases, malformed inputs, etc. But why are we limiting ourselves to just few examples? ...

Read More »

Use Cases for Elasticsearch: Index and Search Log Files

In the last posts we have seen some of the properties of using Elasticsearch as a document store, for searching text content and geospatial search. In this post we will look at how it can be used to index and store log files, a very useful application that can help developers and operations in maintaining applications. Logging When maintaining larger ...

Read More »

Scala and Java 8 type inference in higher order functions sample

One of the concepts mentioned in the Functional Programming in Scala is about the type inference in higher order functions in Scala and how it fails in certain situations and a workaround for the same. So consider a sample higher order function, purely for demonstration:               def filter[A](list: List[A], p: A => Boolean):List[A] = ...

Read More »

Akka Cluster with Docker containers

This article will show you how to build docker images that contain a single akka cluster application. You will be able to run multiple seed nodes and multiple cluster nodes. The code can be found on Github and will be available as a Typesafe Activator. If you don’t know docker or akka Docker is the new shiny star in the devops world. ...

Read More »

Test your Dependencies with Degraph

I wrote before about (anti)patterns in package dependencies. And of course the regular reader of my blog knows about Degraph, my private project to provide a visualization for package dependencies which can help a lot when you try to identify and fix such antipatterns. But instead of fixing a problem we all probably prefer preventing the problem in the first place. Therefore in the latest ...

Read More »

Making the Reactive Queue durable with Akka Persistence

Some time ago I wrote how to implement a reactive message queue with Akka Streams. The queue supports streaming send and receive operations with back-pressure, but has one downside: all messages are stored in-memory, and hence in case of a restart are lost. But this can be easily solved with the experimental akka-persistence module, which just got an update in ...

Read More »

Explicit Implicit Conversion

One of the most common pattern we use on our day to day is converting objects from one type of object to another. The reasons for that are varied; one reason is to distinguish between external and internal implementations, another reason would be to enrich incoming data with additional information or to filter out some aspects of the data before sending ...

Read More »