n3integration


Technical Notebook

Stopping Docker Containers

Containers are all the rage these days and for good reason. They offer a significant leap forward in software development in terms of convenience and environment stability. Although not the only available option for containers, docker has emerged as the de facto. While there is no shortage of articles about getting containers up and running, there doesn’t seem to be much written about gracefully terminating containers.

Read More

Configuring an Elastic Load Balancer using Gradle

Amazon’s Elastic Load Balancer, or ELB service, provides load balancing for Amazon’s EC2 instances. If you are new to Amazon’s ELB service, it provides high availability for your web services and also provides trusted SSL certificates for no additional charge through Amazon’s Certificate Manager.

Read More

RethinkDB - First Steps

I am starting a new project and was in search of a database that was easy to setup, has a solid query language, and is easy to integrate into my codebase. In my search, I came across RethinkDB. Having worked with other document stores in past projects, namely MongoDB and CouchDB, RethinkDB has two features that caught my eye for this particular project: joins and changefeeds. In this project, some of the data is relational, so having join support built into a document database is a welcome feature. The changefeed support is a great feature for realtime applications - think WebSockets or SSE.

Read More

Parsing Dates in Java 8

For anyone working with raw data, you know that working with dates can be tedious and Java’s SimpleDateFormat class is limited in it’s capabilities. With the release of Java 8, the JDK now comes with a DateTimeFormatter class - with a DateTimeFormatterBuilder companion class - that is much more capable.

Read More

Play Framework Actions

If you are unfamiliar with the Play! Framework, it’s an MVC framework written in Scala and definitely worth checking out. This holds true especially if you’re a Java or Scala developer. If you are unfamiliar with Scala, the language allows developers to blend both functional and object-oriented programming (OOP) techniques, providing the best of both paradigms.

Read More

Play Framework Dependency Injection

If you are unfamiliar with the Play! Framework, it’s an MVC framework written in Scala and definitely worth checking out, especially if you’re a Java or Scala developer. One constraint of the framework that I have never really been fond of was the requirement for controllers to require static methods for routing purposes.

Read More

Advanced Object Serialization Using Jackson

I am a long time fan of Gson for object to JSON serialization. If you have a fairly trivial object graph, it is excellent in terms of simplicity and being non-intrusive.

Read More

Instrumenting Java Code

In an effort to improve performance, developers need ways to instrument their code to track the amount of time taken per operation. There are a few ways to accomplish this while maintaining an elegant solution. Rather than roll your own solution, it is better to leverage an existing metrics library. One popular library for the JVM is the Dropwizard Metrics project, which includes counters, gauges, and timers. Although it’s outside of the scope of this post to cover all of the available functionality, for this use case, we’re interested in the timers.

Read More

Introduction to Gremlin

Gremlin is a domain-specific language for querying or mutating the contents of a graph database. While other graph query languages exist, the advantage of Gremlin is that it is supported across the major graph databases: Neo4j , OrientDB, and Titan Graph DB.

Read More

OAuth2 with Waterlock

I’ve spent the last few weeks developing an application using Sails.js. Being a side-project, my development time is limited and Sails has been great in allowing me to get a prototype up and running quickly.

Read More