Commands and Aggregates in Datomic

I wanted to investigate how to implement something similar to my previous Event Sourcing examples but this time using Datomic. In particular, I wanted to keep the way commands are implemented in the domain, the way commands could be executed asynchronously and aggregates for consistency.

Continue Reading Commands and Aggregates in Datomic

Berlin Buzzwords 2013

Berlin Buzzwords feels more like a festival than a normal conference. You get these wristbands that you should wear for a few days and being held at a brewery there…

Continue Reading Berlin Buzzwords 2013

Hypermedia APIs with mobile clients

At our recent talk at Confess 2013 in Vienna there were several developers working with mobile devices in the audience. This is great as the purpose of hypermedia in the API is to make life simpler for client developers. However, after the talk several of them raised issues regarding the high latency and low bandwidth of mobile phones. In this post I will try to address both these concerns.

Continue Reading Hypermedia APIs with mobile clients

Event Sourcing in Clojure

In this blog post I implement the same rock-paper-scissors domain using what I hope is idiomatic Clojure. By using immutable datastructures I show that snapshots of aggregate state is really nothing special and snapshotting should be implemented as a cache.

Continue Reading Event Sourcing in Clojure

Learn Clojure using records and protocols

Transitioning from Java to Scala was simplified by the fact that you could still write something similar to your old style Java code in Scala and then start learning the functional way and all other cool things available in Scala. When learning Clojure this threshold is higher as the language is so different than Java. However, by using records and protocols you should be able to do things in a similar way that you are already used to and then transition into more idiomatic Clojure.

Continue Reading Learn Clojure using records and protocols

Why hypermedia APIs?

When we talk about creating RESTful services using hypermedia we often get into discussions why the links are necessary. Why not simply publish a list of available URI:s and the client can code directly using these links? Won't there be much overhead in putting links into every response? In this blogpost we will try to explain why we think a hypermedia API is useful.

Continue Reading Why hypermedia APIs?

Changing an index in MongoDB

We are using the @Indexed annotation in Morphia and when we changed to @Indexed(unique=true) we were first surprised when nothing happened. Our first thought was that this might be a…

Continue Reading Changing an index in MongoDB

Autowiring Morphia entities

My current project is using Morphia to handle object mapping to/from mongoDB and I wanted to add dependency injection using Spring to my entities like this: @Entity public class MyEntity…

Continue Reading Autowiring Morphia entities

End of content

No more pages to load