In this blog I talk about some of the personal programming I do as a hobby. By trade I'm a Java and database developer but I've dabbled in Haskell, front-end development, etc. I'm currently working as an architect but still enjoy getting my fingers dirty in code!

Saturday, January 12, 2019

A little Go project: Cassandra + Elastic + GraphQL

I've put a littleproject on Github written in Go. It's a little database system that allows
writing and reading objects, and do GraphQL queries on them. The main principle
is that objects have a arbitrary String ID that is like a path, separated by
slashes, and deleting an item with a given ID deletes also items with
"children" ids.

For fun, I used
Cassandra as the main data store, since it's optimized for fast writes and
loads of data; we never delete anything, we just keep every state of an object
as history. Text searches are done on the last version of objects using
Elastic. GraphQL support allows to follow object namespace relationships.

I also provide
Dockerfiles to deploy either just the database systems for testing, or the
whole application.

I'm not sure this
can be useful as is for anybody, but this was for me to try Go on a real-life
project. Apart from the gotchas I've wrote about before, it was a rather
painless and enjoyable experience.