scala

Scala By The Schuyllkill Recap

This past Tuesday I had the pleasure of attending the Scala by the Schuylkill conference at Comcast headquarters in downtown Philadelphia. Initially begun as an internal Scala conference, the organizers opened the conference this year to external folks interested in Scala. I learned a lot from this event, gaining perspective on trends in the Scala community and sparking curiosity in several interesting applications of the Scala language.

Simply explained: Akka Streams Backpressure

Backpressure Food for thought Very simply put, the idea behind backpressure is the ability to say "hey slow down!". Let's start with an example that has nothing to do with software: Imagine you own a factory that produces doughnuts (lucky you!) and just signed a contract with the largest grocery chain in the Northeast US. … Read More

The Internet Of Things with Scala – Part 2

This is a continuation of my Internet of Things with Scala posting. In this installment I will go over the assembly of the device that will be used to capture the soil moisture data and send it to an MQTT broker so that it may be picked up by the Scala/Akka based application. The Parts … Read More

The Internet Of Things with Scala – Part I

There has been a great deal of buzz around the Internet of Things lately. The advent of small inexpensive devices and in particular the Arduino has inspired a generation of people with no background in electrical engineering to do some very creative things. I myself was first inspired by the Arduino and had built several … Read More

Data At The Speed Of Life – Reactive IoT Applications in Scala with Angular2

I had recently come off of a three year contract and found myself with some time on my hands. I was interested in working on an application that interfaced directly with some sort of small device. The director of our company, Don Coleman, had done a good bit of work with small devices so I spoke to him about the possibility of building a small application around those devices. He agreed to it and offered to assist from the hardware end. Our director of training, Ken Rimple, was researching the Angular 2 JavaScript framework at the time and offered to build the UI for the application. We eventually decided that we would build a demo to display at our booth at the 2016 South by SouthWest conference. This post explains our approach and some lessons learned.

SBT: Group annotated tests to run in forked JVMs

SbtTestGrouping Running tests that use a HiveContext On our current project, we utilize Spark SQL and have several ScalaTest based suites which require a SparkContext and HiveContext. These are started before a suite runs and shut down after it completes via the BeforeAfterAll mixin trait. Unfortunately due to this bug (also see this related pull … Read More

Slick 3.1.0, Oracle 11g, and UUID columns

SlickUUIDs UUIDs to the rescue I recently decided to change our primary key strategy from an auto-incrementing Long to UUID (aka globally unique IDs). Early on in a project, this should be a relatively simple refactoring (neither the software nor any data has been released yet). First of all and most importantly, UUIDs provide uniqueness … Read More

Binding custom types in plain SQL queries in Slick

Hierarchical Queries Hierarchical Queries and Oracle Not everything is as fun as the first time you discover the power of monads and for-comprehensions, or realize the state machine you wrote with pattern matching is super easy to read and follow! Some days its business as usual, which as a software developer means you’re usually trying … Read More

Microbenchmarking Scala with JMH

Many times we find that there are multiple ways to write a piece of code and sometimes the choice may be determined by which implementation executes fastest. We might want to have a shootout between the different implementations to find out which one is fastest. The Java Microbenchmark Harness (JMH) tool can help us get … Read More