Microxchg 2017

| Comments

Last week I had a pleasure visiting Microxchg conference in Berlin. I was really excited, because I also conducted my first workshop there – Building Microservices with Scala and Akka.

I think the event was truly successful and I’d like to share my thoughts and notes below for the most interesting talks I attended.

The conference is dedicated to Microservices, as you can guess from its name. It’s not new – originally started in 2015, it’s been attracting top presenters from all around the world, including recognized experts like Sam Newman and Fred George.

2016 in Review

| Comments

Here’s my first attempt to summarize most important things happened in my professional life (mostly programming) this year, for future self. May be it’ll be interesting for someone else too.

Intro to RAML 1.0

| Comments

Pretty much every web developer has built HTTP APIs. How does it usually happen? If you have good practices established in your team you probably start with a whiteboarding session. Good one-hour exercise with your colleagues produces something that we call “API spec”. It might look like this:

Great job everyone! Although, we forgot a few “minor” things:

  • Error messages and error HTTP codes
  • Authorization and authentication
  • Schema for the entities
  • Versioning
  • … >_<
  • And the most important, does it actually satisfy consumers (like front-end apps or other systems)?

Multiply that by number of years you’re going to maintain that (∞) and the rate of adding new features… Looks really depressing. Our beautifully designed “API spec” quickly becomes a pile of unmaintainable mess. Is there a better way to do it?

Bootstrapping Akka Cluster With Consul

| Comments

As you probably know, I’m a big fan of Akka. Akka Cluster is a great low-level mechanism for building reliable distributed systems. It’s shipped with powerful abstractions like Sharding and Singleton.

If you want to start using it you should solve cluster bootstrapping first. Almost every tutorial on the internet (including the official one) tells you to use seed nodes. It looks something like this:

1
2
3
4
akka.cluster.seed-nodes = [
  "akka.tcp://ClusterSystem@host1:2552",
  "akka.tcp://ClusterSystem@host2:2552"
]

but wait… Hardcoding nodes manually? Now when we have Continuous Delivery, Immutable Infrastructure, tools like CloudFormation and Terraform, and of course Containers?!

Well, Akka Cluster also provides programmatic API for bootstrapping:

1
def joinSeedNodes(seedNodes: Seq[Address]): Unit

So, instead of defining seed nodes manually we’re going to use service discovery with Consul to register all nodes after startup and use provided API to create a cluster programmatically. Let’s do it!

Software Engineering Blogs I Read

| Comments

RSS is not dead. At least not for me :) I use NewsBlur to track and read 50+ various feeds – tech, travel, personal blogs. Today I want to share a list of software engineering blogs that I find very helpful and keep in my list for a long time.

Syrup - Scrum CLI Tool

| Comments

At Bench we’re convinced that GitHub should be a central place for everything project-related: codebase, documentation, tasks. That’s why we don’t use any specific Project Management software, but instead we try to use GitHub.

Obviously GitHub has a very limited set of features: issues, labels, milestones. But, surprisingly, it’s good enough foundation that can be used by other services, for example Waffle.io.

Waffle gives you Kanban-style dashboard for managing your tasks. It has two-way synchronization with GitHub, so every change in GitHub is propagated to Waffle in near real-time and vice versa. Waffle also uses labels to organize issues in columns, which makes everything easier from the GitHub side.

Still, there are lots of problems if you want to use GitHub & Waffle for your Scrum process. That’s why I’ve been working on syrup, CLI tool for Scrum. Readme has lots of details describing Waffle problems and suggested workflow to overcome them. It’s published as npm module, so it’s really easy to install.

From technical point of view it’s a very simple Node.js/ES6 app (using Babel) that mostly uses GitHub API for fetching data.

PS: currently I investigate ZenHub as a Waffle & Syrup replacement. It solves the same problems and brings even more features, like built-in epics and burndown charts. At the same time, Waffle is completely free even for private repositories (and ZenHub is not). Syrup still can be useful for ZenHub though, you can find more details in Readme.

Postgres JSONB Indexing Is Tricky

| Comments

I’m not a Postgres expert, but I’ve been using it for about 6 months as an Event Store database. At Bench we’ve built our own eventing system on top of ActiveMQ, Camel and Akka and we use Postgres to persist every single Domain Event.

Our event schema is very flexible and currently represented in JSON. We chose Postgres for persistence, because of the great JSON support. As you probably know, Postgres 9.4 introduced JSONB type, which is an advanced JSON type that supports indexing. Obviously, you should index all your key fields, but it can be tricky. Let me share what we’ve discovered.

Polyglotconf 2016 Talk

| Comments

Today I participated in Polyglotconf 3rd year in a row. This time I was prepared though, I wanted to talk about microservices and different advantages and disadvantages you can have if you use messaging as your main internal communication protocol. Also, it makes perfect sense for me to use Actors to build the actual microservices and I tried to explain why.

It seems like this topic is quite popular nowadays and I got the biggest auditorium as well as dozens and dozens of interested people.

My slides: