Blog

  • Web Fundamentals: HTTP Caching
    Let’s walk through the mechanics of HTTP caching. HTTP caching is used to reduce latency by delivering content from caches that are closer to the client and reducing bandwidth since no network traffic is required to serve a (locally) cached resource. There are two types of caches. Private caches and public caches. A public cache … Read more
  • Web Fundamentals: Overview
    The web consists of three separate concepts: URL – Uniform Resource Locator unique identifier for a resource in the web HTTP – HyperText Transfer Protocol Protocol to retrieve a representation of a resource through a URL. HTML – HyperText Markup Language an HTML document can represent a resource and link to other resources through their … Read more
  • Event Sourcing
    Systems using Event Sourcing store their persistent state as a sequence of events instead of updating a single model. A particular state can be recreated by replaying all events. It’s basically a persistent transaction log file for your application. Why should I care? You’re able to restore the system state to any point in time. … Read more
  • Exploring Streams in Scala
    In this blog post, I‘m going to explore Streams in Scala‘s Collection API. So first of all what is a Stream? A Stream is a lazily evaluated list. This means that elements in a Stream get only evaluated when they are needed. Therefore Streams can be infinite while strict collections cannot. A Stream can also … Read more
  • Helper for streaming MongoDB GridFS files in lift web applications
    Lift is a web application framework written in scala and comes with native integration for mongodb. The module is called “lift-mongodb” and integrates mongodb as the persistence layer for its Record and Mapper framework. GridFS is a specification for storing large files in MongoDB. Most drivers support it directly. In this post, I‘m going to … Read more
  • Parsing chunks of XML documents with JAXB
    Jaxb is a great java library for mapping XML documents to Java objects and vice versa. But how can Jaxb be used to parse large XML documents?The Unofficial JAXB Guide contains a small section which provides some useful information about this topic. Assume we have a xml document similar to the following: Now I want … Read more
  • Generating large PDF documents with Apache FOP
    Some days ago I had trouble with generating large PDF documents (> 2000 pages) with Apache FOP. The problem was the memory consumption while rendering the document. In my opinion, it was not an acceptable solution to increase the JVM memory > 2GB. So I had to find a way to optimize my templates. Fortunately, … Read more