5 Min Read January 25, 2017

Parsing Simple Grammars in Scala With parboiled2

parboiled2 is a Macro-Based PEG Parser Generator written in Scala. It has become our preferred tool for creating parsers for simple grammars. It offers a fairly simple syntax for creating parsers and boasts significantly better performance over Scala Combinators. To illustrate its use, we will use this post to build a parser for a simplified […]

5 Min Read December 28, 2016

According to Our Readers: Threat Stack’s Top 10 Blog Posts for 2016 (and More)

One of our goals at Threat Stack is sharing information that will help you learn about the current cloud security threat landscape in order to effectively and more easily manage your organization’s security issues — and confidently get on with running your business. To this end, the Threat Stack blog is a terrific repository of articles that cover […]

4 Min Read November 23, 2016

Ramping up on Finch: Avoiding Common Gotchas

While we have been using Scala for awhile at Threat Stack, we haven’t been overly satisfied with the HTTP servers that we have used. So a few months ago, we audited a number of options and ultimately decided to try out Finch. We chose Finch for its readable and idiomatic API for constructing HTTP endpoints, […]

4 Min Read September 26, 2016

My Journey in Scala, Part 3: None is Better Than Undefined

Here’s the situation: At Threat Stack we consume a torrent of security event data every day, and as many new customers come on board, the amount of data we need to ingest, transform, store, and retrieve just keeps growing. About a year ago, we implemented a caching layer to allow us to display more aggregated […]

8 Min Read September 12, 2016

Scala @ Scale, Part 2: Compose Yourself!

Function composition is an extremely useful tool for creating modular, testable programs. One of the most natural applications of functional composition that I’ve found is creating a lightweight, composable HTTP request builder, and with that objective in focus, this post will equip you with the tools you need to simplify your HTTP clients.

5 Min Read August 26, 2016

Useful Scala Compiler Options Part 2: Advanced Language Features

Scala offers a number of advanced language features that are disabled by default. If you try to use any of them, the compiler will generate a warning informing you of their usage. There are a number of reasons that you might want to enable features (or keep them disabled). In this post, we will explore […]