Quantcast
Channel: Michiel Rook, Author at Michiel Rook's blog

Interesting links


Phing development update

$
0
0

It’s about time I wrote another Phing development update post, as the previous one  was written 6 months ago!

So, what have we been up to ?

Release 2.5.1

Unfortunately, because of other commitments, the 2.5.1 release has been delayed a little and should hopefully be pushed out later this month.

Here are some of the issues that have already been fixed for this release:

Ticket Summary
#920 Load phpdepend dependency only when they are used
#966 phing unit tests nice on all platforms
#970 FileSyncTask missing from docbook5 documentation
#981 FileUtil::copyFile(): $preserveLastModified causes empty symlink target file
#985 Git Commit Task missing from docs
#990 Prompting for a property value when it is not set results in a repeated input message
#993 ExecTask passthru will redirect stderr
#999 phing-2.5.0.phar Can’t load default task list
#1000 Make phing.phar work out of the box
#1003 2 php syntax bugs in GitCommitTask
#1004 <gitcommit …/> does not work because task definition is missing in defaults.properties + another bug
#1011 Problem with spaces in output redirection path
#1015 phing does not allow phpunit to echo
#1020 [PHP Error] Illegal string offset ‘filename’ [line 149 of /usr/share/pear/phing/tasks/ext/ExtractBaseTask.php]
#1023 Argument 1 passed to IniFileTokenReader::setFile() must be an instance of PhingFile
#1027 RegexpMapper uses deprecated PREG_REPLACE_EVAL
#1029 PhpDocumentor2 task broken with latest phpdoc version

DocBook manual

A number of awesome pulls by johan162 updated our docbook manual (which has been in the works for some time) to a viable alternative. Next on the list are a few infrastructure issues and styling changes, after that the current manual will be ready to be replaced by our shiny new docbook version :)

Details:

Other changes

For more in-depth information, see the list of recently closed pull requests and the list of commits.

Using conditional build steps to speed up your Jenkins PHP builds

$
0
0

At my client Spotney, we have a pretty solid (and common) build infrastructure for our PHP projects; SVN commits are checked out by Jenkins, tests are run by PHPUnit, Sonar runs static code analysis, and artifacts are built and deployed to a staging environment by Phing. However, some of the code relies pretty heavily on (complex) db queries, adding the need for DbUnit style tests. The nature and quantity of the tests, combined with a slow VM (possibly related to this Xdebug issue) meant that our buildtimes were becoming prohibitively long.

An interesting post by @pascaldevink triggered a conversation and sparked an idea. I started working on our build setup, eventually resulting in a 60-70% decrease of our build times!

Here’s how I did it.

Starting point

Let’s assume we have a fairly standard Jenkins job. The job checks out an SVN repository, and periodically scans that repository for changes, triggering a new build if any are detected.

Each build of the job performs three steps:

  • Run phpunit
  • Run phing (target “build”)
  • Invoke Sonar (using the Jenkins Sonar plugin - this plugin also allows invoking Sonar as a post-build action, but that option requires Maven)

After the build steps, the job publishes the test and code coverage reports, and archives the generated artifacts.

Disabling code coverage and Sonar for regular builds

Two of the most obvious optimizations (also suggested by Pascal) are disabling code coverage on all tests and disabling Sonar runs during regular Jenkins builds. We define regular as either manually started by a user, or by an SCM trigger.

Disabling code coverage generation in PHPUnit is easy, simply remove the “coverage-xxx” elements from the logging section of your phpunit.xml configuration file (see this section of the PHPUnit manual). Disabling Sonar is trivial too, just remove the last build step from the job.

However, this is not an ideal solution: we do want to generate code coverage information and run Sonar at some point, such as during nightly builds, preferably without cloning our existing job. This means that we’ll need to skip code coverage and Sonar invocations on all but the scheduled (nightly) builds.

The Sonar plugin supports excluding SCM triggered builds (“Skip if triggered by SCM Changes”), but that only works if you use the post-build action. Additionally, we need to be able to change the PHPUnit configuration – one file to enable code coverage generation, one file to disable it.

Conditional build steps

The Conditional BuildStep plugin wraps one or more build steps in a conditional execution block. One of the possible conditions is the build cause, i.e. was the build triggered by a user, an upstream project, a timer, an SCM change, etc. etc.

First we define the steps that should be taken for each nightly build of our job. These steps should only be executed when the build is trigger by a timer.

We add a “Conditional steps (multiple)” build step, setting the condition to “Build Cause” and the Build Cause to “TimerTrigger”.

Conditional Sonar Build Config [Jenkins]2

Then we add our three (original) build steps:

Conditional Sonar Build Config [Jenkins]3

As stated before, regular builds are those that are triggered by a user or an SCM change.

We again add a “Conditional steps (multiple)” build step. The condition for this step is a little more interesting, as seen below. We combine two Build Cause conditions (one set to “UserCause”, the other to “SCMTrigger”) using the Or condition.

Conditional Sonar Build Config [Jenkins]4

We then add two build steps: the first will run PHPUnit without code coverage (note that we are specifying a different configuration file here), the second one will run Phing.

Conditional Sonar Build Config [Jenkins]5

Note that in the above build steps we’re invoking Phing from the shell instead of using the Phing plugin. Unfortunately this plugin is currently not supported as a conditional build step (probably because of this JIRA issue).

Build schedule

As a final step we need to update our build schedule.

Conditional Sonar Build Config [Jenkins]1

This will ensure our job runs somewhere after midnight (between 12:00 AM and 2:59 AM to be precise).

The end result:

  • A nightly scheduled build, with all the bells and whistles enabled
  • User and SCM triggered builds run (a lot) faster

Please let me know if you think this post is useful, or if you have any other Jenkins/PHP optimization tips!

Dutch Web Alliance, leaders in web technology

$
0
0

I’m proud to announce that I’ve joined forces with a group of very talented web developers in the Netherlands and Belgium: the Dutch Web Alliance.

Dutch Web Alliance

More information is available on our website, the full (dutch) press release is posted below:

APELDOORN: Freelance web developers bundelen krachten in de Dutch Web Alliance.
De Dutch Web Alliance (DWA) is een vereniging voor en door freelance
web developers uit Nederland en Belgie. Onze missie is om via kennisdeling, samenwerking en het combineren van resources, de positie van de freelancer en de kwaliteit van web professionals te verbeteren. Een lid van de DWA staat voor kennis en kunde op alle vlakken in web-ontwikkeling en kan zich als zodanig onderscheiden worden door klanten en opdrachtgevers.

De DWA richt zich niet op kwantiteit, maar op kwaliteit. Zo zijn het de leden onderling die bepalen of een nieuw lid ook daadwerkelijk kan toetreden tot de vereniging. Binnen de vereniging houden leden elkaar actief op de hoogte van alle laatste ontwikkelingen, bieden ze hulp en dienen ze als vraagbaak. Maar DWA leden springen ook graag bij andere leden in situaties zoals ziekte, deadlines, specifieke kennis. Zo krijgen afnemers van de DWA de flexibiliteit van freelancers, met de voordelen van full-service internet bureaus.

De DWA is meer dan alleen een keurmerk en kwaliteitswaarborg. Onze leden zijn voor het grootste deel actief in open source communities zoals PHP, dev/ops en system administration. Zij zijn dan ook vaak terug te vinden op nationale en internationale conferenties als spreker waarbij ze als experts en “leaders of the field”, andere ontwikkelaars helpen met nieuwe technieken, best practices en algemene kennis die is opgedaan uit de vele complexe projecten waar ze dagelijks aan werken. De DWA draagt hier nog een extra steentje aan bij door het organiseren van workshops en meetups voor niet alleen ontwikkelaars, maar ook leidinggevenden, project managers en CTO’s/CIO’s. Kortom: onze vereniging zet zich in voor een beter, professioneler en efficiënter klimaat binnen de web-ontwikkeling.

Docker & PHP: beyond virtual machines

$
0
0

(note: this post was first published on the blog of the Dutch Web Alliance)

Docker is currently one of the hottest technologies around, because it solves a very specific problem: the ability to easily package and deploy a (self contained) application, without the overhead of traditional virtualization solutions.

In this post you’ll learn how to build, run and host Docker containers, integrate with other containers, and see how Vagrant interacts with Docker.

Background

The Linux kernel contains a number of containment features that enable resource (CPU, network, memory, etc.) & process (user id’s, file systems, process trees) isolation on the same host, without the need for a virtual machine: cgroups and namespaces.

This operating system-level virtualization imposes far less overhead. User space instances (also called containers) run within the host OS, so a hypervisor and guest OS are not needed. This results in lightweight images and incredibly fast start/boot times: think seconds, not minutes. Containers are like vm’s, without the associated weight.

Docker is a toolkit built around those containment features. Before version 0.9, Docker relied on LXC (LinuX Containers): a (userspace) interface to the kernel containment features. As of version 0.9, Docker has its own interface layer called libcontainer.

Installing Docker

Installing Docker is easy if you are using Ubuntu. To install the official package (may not be the absolute latest version):

$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker 
$ sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
$ source /etc/bash_completion.d/docker.io

Should you really want the latest version:

$ curl -s https://get.docker.io/ubuntu | sudo sh

Note: because Docker relies on Linux-specific kernel features, it is not natively supported on OSX or Windows.
There are some workarounds: use Vagrant (see below), or refer to the Docker installation instructions ( https://docs.docker.com/installation/windows/ and https://docs.docker.com/installation/mac/) for details.

Creating and starting a container

Let’s start with a small PHP app, which we will package and deploy as a Docker container. The app will expose a simple socket server on a port (1337), and output a string to connections on that port. To build the app we’ll be using React, a library that adds event-driven, non-blocking IO to PHP.

First, install composer (http://getcomposer.org), then run the following command:

$ composer require react/react=0.4.x

Then save the following code as “app.php”:

<?php

require 'vendor/autoload.php';

$loop = React\EventLoop\Factory::create();
$socket = new React\Socket\Server($loop);
$http = new React\Http\Server($socket, $loop);

$app = function ($request, $response) {
   $response->writeHead(200, array('Content-Type' => 'text/plain'));
   $response->end("Hello World\n");
};

$http->on('request', $app);
echo "Server running at http://0.0.0.0:1337\n";

$socket->listen(1337, "0.0.0.0");
$loop->run();

If we then run the following command:

$ php app.php

we should see something like this:

Server running at http://0.0.0.0:1337

Open your browser, point it to http://localhost:1337/, and you should see something like:

React screenshot

Now, to get our app to run inside a Docker container, we first need to build an image. The instructions that define how to build the image are saved in a Dockerfile, in the form of commands:

FROM jolicode/php55

ADD ./ /var/apps/reacttest

CMD cd /var/apps/reacttest && php app.php

EXPOSE 1337

In this Dockerfile we’ve used the following commands:

  • FROM: an existing image that our image should be based on
  • ADD: a tar file or existing directory pointing to our app
  • CMD: command to run when starting the container
  • EXPOSE: ports that we want accessible outside of the container

The full list of commands is available .

Now that our Dockerfile is finished, let’s build the image. Run the following command:

docker build -t "our_app_image" .

This builds a new image using the Dockerfile in the current directory, and will tag
the resulting image with the string “our_app_image”. The output of the command should look like this:

Sending build context to Docker daemon 1.633 MB
Sending build context to Docker daemon 
Step 0 : FROM jolicode/php55
 ---> 13f8ff6325db
Step 1 : ADD ./ /var/apps/reacttest
 ---> 09b79e178ff3
Removing intermediate container 20296bc15647
Step 2 : CMD cd /var/apps/reacttest && php app.php
 ---> Running in 8d907cb22524
 ---> 66feac5b7e2c
Removing intermediate container 8d907cb22524
Step 3 : EXPOSE 1337
 ---> Running in 42b14e4d20d3
 ---> ad72a42f978a
Removing intermediate container 42b14e4d20d3
Successfully built ad72a42f978a

The next step is creating and running a new container that uses our freshly baked image.

docker run -d --name "our_app_container" -p 1337:1337 our_app_image && docker ps

The container will be named “our_app_container”, and will run in the background (the ‘-d’ option). Docker will also proxy port 1337 on the host to port 1337 in the container. After starting the container, ‘docker ps’ shows the list of running containers and their attributes, something like:

5c35b78eede36eb34ca7498b202979200df56dce6343cc5f0d8242f370bba64f
CONTAINER ID        IMAGE                        COMMAND                CREATED                  STATUS                  PORTS               NAMES
5c35b78eede3        our_app_image:latest         /bin/sh -c 'cd /var/   Less than a second ago   Up Less than a second   0.0.0.0:1337->1337/tcp            our_app_container

To verify that the app is running and available, we can use ‘docker logs app’ to retrieve the stdin/stderr streams of the running container.

Dependencies: linking containers

Let’s extend our app with an external dependency. The requirement: increase a counter with every request to port 1337. The counter will live inside a Redis instance.

First, add predis-async to the list of composer dependencies:

$ composer require predis/predis-async=dev-master

Then, insert the following lines in app.php:

$client = new Predis\Async\Client('tcp://redis:6379', $loop);

$app = function ($request, $response) use ($client) {
   $client->incr("app:requests");
   $response->writeHead(200, array('Content-Type' => 'text/plain'));
   $response->end("Hello World\n");
};

Now, how to add a Redis server to our app? We can connect directly to a specific hostname, or assume that whoever works on our app has Redis installed and running. Both are somewhat fragile, and make setting up a development environment more difficult. There is a third option: installing Redis directly to the Docker image of our app. However, this would polute the image and make it less flexible.

Enter Fig, a tool to quickly build and start (isolated) development environments. Fig requires a single configuration file (default: fig.yml):

app:
  build: .
  links:
  - redis
redis:
  image: redis

The above file defines two containers: app (which contains our php application), and redis. The first container depends on the latter through the “links” section. Fig will make sure that, within the app container, “redis” resolves and points to that container.

Save the file, and run:

$ fig -p app up

This should produce the following output:

Creating app_redis_1...
Creating app_app_1...
Attaching to app_redis_1, app_app_1
redis_1 | [1] 09 Nov 10:19:23.272 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 |                 _._                                                  
redis_1 |            _.-``__ ''-._                                             
redis_1 |       _.-``    `.  `_.  ''-._           Redis 2.8.17 (00000000/0) 64 bit
redis_1 |   .-`` .-```.  ```\/    _.,_ ''-._                                   
redis_1 |  (    '      ,       .-`  | `,    )     Running in stand alone mode
redis_1 |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1 |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1 |   `-._    `-._  `-./  _.-'    _.-'                                   
redis_1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1 |  |    `-._`-._        _.-'_.-'    |           http://redis.io        
redis_1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1 |  |`-._`-._    `-.__.-'    _.-'_.-'|                                  
redis_1 |  |    `-._`-._        _.-'_.-'    |                                  
redis_1 |   `-._    `-._`-.__.-'_.-'    _.-'                                   
redis_1 |       `-._    `-.__.-'    _.-'                                       
redis_1 |           `-._        _.-'                                           
redis_1 |               `-.__.-'                                               
redis_1 | 
redis_1 | [1] 09 Nov 10:19:23.279 # Server started, Redis version 2.8.17
redis_1 | [1] 09 Nov 10:19:23.279 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | [1] 09 Nov 10:19:23.279 * The server is now ready to accept connections on port 6379
app_1   | Server running at http://0.0.0.0:1337

By default, Fig will start the containers in the foreground, blocking the terminal. To start in the background, add ‘-d’ to the command line.

Docker & Vagrant

As of version 1.6, Vagrant directly supports Docker and Docker containers through a new provider. Additionally, on platforms where Docker is not natively supported (Mac, Windows), Vagrant automatically starts a Linux-based (VirtualBox) vm which can then run a Docker container.

Let’s create a Vagrantfile for our app. We can re-use the existing Dockerfile, and let Vagrant use that:

Vagrant.configure("2") do |config|
  config.vm.provider "docker" do |d|
    d.build_dir = "."
    d.ports = ["1337:1337"]
  end
end

Save the file, and run ‘vagrant up':

==> default: Deleting the container...
==> default: Removing built image...
==> default: Building the container from a Dockerfile...
    default: Image: d2717466cf97
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Creating the container...
    default:   Name: docker_blog_default_1415529103
    default:  Image: d2717466cf97
    default: Volume: /home/user/dev/docker_blog:/vagrant
    default:   Port: 1337:1337
    default:  
    default: Container created: 539ba7edfee50fa0
==> default: Starting container...
==> default: Provisioners will not be run since container doesn't support SSH.

And once again, our app is available on port 1337, proxied to the container that Vagrant built.

Conclusion

If you’ve made it this far, you now know how to start a Docker container that runs your app, and link that container to other dependencies. Ofcourse this is but a little intro into the exciting world of Docker, which is rapidly changing and growing, and has much more to offer!

The post Docker & PHP: beyond virtual machines appeared first on Touchdown Consulting Services.

The road to continuous deployment: a case study

$
0
0

Below are the slides of my talk “The road to continuous deployment: a case study”, as presented at the Dutch PHP Conference in June 2016. I’m planning to dedicate a series of blogposts to this particular topic later this year. It’s a situation many of us are familiar with: a large legacy application, limited or […]

The post The road to continuous deployment: a case study appeared first on Touchdown Consulting Services.

CD: Continuous Delivery or Continuous Deployment?

$
0
0

I’m writing this post to contribute my take on the acronym CD, and the distinction (or perhaps, confusion) between the phrases Continuous Delivery and Continuous Deployment. These phrases are used interchangeably, and sometimes incorrectly, in various books, blogs and talks. And while these software engineering approaches (or disciplines) share a lot, there is one key difference. […]

The post CD: Continuous Delivery or Continuous Deployment? appeared first on Touchdown Consulting Services.

Phing development update

$
0
0

A few years ago I pledged to publish regular updates on Phing’s development. I’m a little ashamed that I haven’t done that for nearly three years. Needless to say, a lot has happened, so it’s about time to post an update! Recent releases The latest version, 2.14.0, was released in March. Ever since the move of the code to […]

The post Phing development update appeared first on Touchdown Consulting Services.


The hierarchy of Continuous Deployment

$
0
0

In this post I’m presenting a twist on Maslow’s hierarchy of needs, the hierarchy of Continuous Deployment. This version is based on the steps that are required to successfully implement Continuous Deployment (a step up from Continuous Delivery). Maslow’s hierarchy of needs (also known as Maslow’s Pyramid) is a well-known theory in psychology, describing human needs in a particular ranking, with […]

The post The hierarchy of Continuous Deployment appeared first on Touchdown Consulting Services.

Distributed command handling with Axon, JGroups and Docker

$
0
0

In a recent project I used Axon Framework together with JGroups, to create a clustered, or distributed command bus. In that project we had some concurrency issues. One of those issues was that two events were applied on a single aggregate with an identical sequence number. The JGroupsConnector in Axon uses a consistent hashing algorithm to route […]

The post Distributed command handling with Axon, JGroups and Docker appeared first on Touchdown Consulting Services.

Event versioning (or why I sometimes modify the event store)

$
0
0

Requirements and applications evolve and change, leading to refactoring. For example, user registration now requires a first and last name, what was once an error may no longer be considered one, etc. In an event sourced application, that poses a few problems. In this post I’ll discuss a few strategies and my views on event versioning. On immutability […]

The post Event versioning (or why I sometimes modify the event store) appeared first on Touchdown Consulting Services.

Concurrent commands and event sourcing

$
0
0

In this post I want to talk a little about concurrency in the context of CQRS and event sourcing. Specifically, when a single aggregate is concurrently accessed by two commands (or command handlers, really). Concurrent commands Let’s assume there are two commands, DepositMoney and WithdrawMoney. Both commands are handled by the BankAccount aggregate. Let’s also assume that those two commands […]

The post Concurrent commands and event sourcing appeared first on Touchdown Consulting Services.

Branches considered harmful

$
0
0

“Don’t use branches”. Three words that are guaranteed to trigger reactions when I utter them during my continuous deployment talks. Three words that make for interesting discussions. This post contains some of the arguments I use during those discussions. Continuous deployment and the master branch A lot of teams are used to having some combination of feature, […]

The post Branches considered harmful appeared first on Touchdown Consulting Services.

The road to continuous deployment (PHPCon Poland 2016)

$
0
0

Below are the slides of my talk “The road to continuous deployment: a case study”, as presented at PHPCon Poland in October 2016. It’s a situation many of us are familiar with: a large legacy application, limited or no tests, slow & manual release process, low velocity, no confidence…. Oh, and management wants new features, […]

The post The road to continuous deployment (PHPCon Poland 2016) appeared first on Touchdown Consulting Services.

Continuous delivery, devops & microservices literature

$
0
0

Recently I was asked for books and other literature recommendations on the subjects Continuous Delivery / Deployment, DevOps and Microservices. Here are some of the books, articles and talks I think are worth consuming. Books Continuous Delivery (Jez Humble & David Farley) Reactive Microservices Architecture (Jones Bonér) Building Microservices (Sam Newman) Build Quality In (Steve Smith & […]

The post Continuous delivery, devops & microservices literature appeared first on Touchdown Consulting Services.


Phing development update

$
0
0

A few months have passed since the last Phing development update, so it’s about time to discuss some of the recent changes. Releases Phing 2.15.0 (and two point releases to fix regressions) were released recently. More details can be found in the change log. Version 2.16.0 is scheduled for December 2016. GitHub Issues A task that’s been […]

The post Phing development update appeared first on Touchdown Consulting Services.

CQRS & Event Sourcing in the wild (ScotlandPHP 2016)

All Day Devops

$
0
0

In a little less than two weeks, on Tuesday November 15th, I’ll be speaking at All Day Devops. A free, online DevOps conference spanning 15 timezones with 50+ sessions. Join me at 10 AM GMT for my session “The Road to Continuous Deployment”.

The post All Day Devops appeared first on Touchdown Consulting Services.

The Strangler pattern in practice

$
0
0

In this post I’ll discuss my experiences with the strangler pattern and how it can be applied when rewriting a large, legacy code base. Introduction In one of my recent projects, I helped a development team that was struggling with maintaining a large application. One that handled a lot of (web) traffic, but suffered from […]

The post The Strangler pattern in practice appeared first on Michiel Rook's blog.

Season’s greetings from Utrecht!

$
0
0

This amazing photo was taken by Chris Heijmans in 2012. Last year, I ordered a canvas print, which is now proudly displayed in my home. Admittedly, current conditions (partly cloudy, windy, 8 degrees celcius) are nowhere near what’s pictured, but one can hope 😉 2016 has been interesting! I’ve met loads of cool people and been part of […]

The post Season’s greetings from Utrecht! appeared first on Michiel Rook's blog.

Training sessions and talks

$
0
0

One of the things I like most about my work is the ability to help teams improve, by sharing my experiences and knowledge in training sessions. These sessions can be conducted in the form of interactive workshops or talks. I’m offering training sessions on DevOps, Continuous Delivery, Event Sourcing, Microservices and many other topics. Contact me […]

The post Training sessions and talks appeared first on Michiel Rook's blog.

CQRS & Event Sourcing in the wild (PHP Benelux 2017)


The Road to Continuous Deployment (PHP UK Conference 2017)

Phing development update

$
0
0

A few months have passed since the last Phing development update in October, so here’s an overview of some of the recent changes. Releases Phing 2.16.0 was released on December 22nd, 2016. Details of this release can be found in the change log. Barring any significant issues (that trigger a patch release), this release will be the last in […]

The post Phing development update appeared first on Michiel Rook's blog.

The Road to Continuous Deployment (JAX DevOps London 2017)

The Road to Continuous Deployment (DevOpsPro Vilnius 2017)

State Of DevOps Report

$
0
0

The 2017 version of Puppet’s State of DevOps Report was just released. To me, the most interesting takeaways from the report are: High performing teams have 46x more frequent deploys, 96x faster mean time to recover/repair and a 5x lower change failure rate. They also automate significantly more work (automation is a key ingredient of any […]

The post State Of DevOps Report appeared first on Michiel Rook's blog.

Using annotations in Prooph

$
0
0

One of the things I love about Java is its native, compiler-level support for annotations, a form of syntactic metadata which can be applied to source code but also retain at run-time to influence application behavior. I use them almost daily in my projects. I do a fair amount of consulting and development on event […]

The post Using annotations in Prooph appeared first on Michiel Rook's blog.

Using Tracking processors to replay events in Axon Framework 3

$
0
0

Replaying events is a crucial part in any event sourcing / cqrs application, to rebuild projections, generate new ones or seed external systems with data. I’m a big fan of the Axon Framework. Even with its quirks and occasional (strange) bugs, it’s my go-to toolbox for my event sourcing & cqrs consulting and development work. […]

The post Using Tracking processors to replay events in Axon Framework 3 appeared first on Michiel Rook's blog.


Forget me please? Event sourcing and the GDPR

$
0
0

In May 2018, a new piece of EU legislation called the General Data Protection Regulation (GDPR) will come into effect. The GDPR attempts to regulate data protection for individuals within the EU and has very interesting and specific implications for applications that use event sourcing. In this article, I’ll discuss my thoughts on this subject […]

The post Forget me please? Event sourcing and the GDPR appeared first on Michiel Rook's blog.

Upcasters or a versioned event store: pros and cons

$
0
0

In a previous article, I wrote a few things about upcasters. One of the significant downsides when implementing an upcaster is that it adds to our application’s technical debt. An alternative technique is the versioned event store (or versioned event stream), where the existing event store is copied and modified. In this post I’ll discuss […]

The post Upcasters or a versioned event store: pros and cons appeared first on Michiel Rook's blog.

2017 Conference Season – It’s a wrap!

$
0
0

As my flight touched down at Schiphol Airport early this morning, I realized that that landing marks the closing of my 2017 conference season.  And what an awesome season it has been! I’ve been a part of these incredible conferences: PHP Benelux PHP UK JAX DevOps London DevOpsPro Vilnius CodeMotion Amsterdam Continuous Lifecycle London International […]

The post 2017 Conference Season – It’s a wrap! appeared first on Michiel Rook's blog.

Event sourcing and the GDPR: a follow-up

$
0
0

My article about the implications of the GDPR for event-sourced applications that I published last week generated a sizable number of responses, suggestions and comments (most of them on Twitter). All of which are appreciated of course! In this post I’ll list the most interesting comments and try to respond to them. 1. Removing data […]

The post Event sourcing and the GDPR: a follow-up appeared first on Michiel Rook's blog.

CQRS & Event Sourcing article published in PHP Architect

$
0
0

This month an article I wrote for PHP Architect, called “CQRS & Event Sourcing in the Wild”, was published in the December 2017 “Talking Code” issue. The article deals with some of the challenges when dealing with change and versioning in an event sourced context. I wrote about compensating actions, upcasters, versioned event stores and […]

The post CQRS & Event Sourcing article published in PHP Architect appeared first on Michiel Rook's blog.

Rebuilding projections in Axon Framework 3

$
0
0

CQRS (Command Query Responsibility Segregation) allows you to have separate models for reading and writing. Combining that pattern with Event Sourcing leads to a powerful capability: updating query (read) models, based on events. In real-time or rebuilding them from an existing collection of events. This post focuses on such projections, in applications that are built on […]

The post Rebuilding projections in Axon Framework 3 appeared first on Michiel Rook's blog.

A typical CI/CD pipeline explained

$
0
0

Recently, I was asked on Twitter if I could give some pointers for reading material on (production) CI/CD pipelines – what they look like, and how they work. I decided to shed some light on this by describing a typical CI/CD pipeline (from my perspective), in a series of tweets. This article is an expansion of […]

The post A typical CI/CD pipeline explained appeared first on Michiel Rook's blog.


Leadership books (English and Dutch)

$
0
0

Earlier, I wrote a post about literature (books, articles, etc.) on Continuous Delivery and DevOps. As I’m currently developing a new talk on Effective Leadership (in the context of Agile/DevOps environments), let me share a few books (in English and Dutch) that helped me or that I reference in this talk. English Leadership Books Turn […]

The post Leadership books (English and Dutch) appeared first on Michiel Rook's blog.

Binnenkort treedt de AVG (GDPR) in werking!

$
0
0

Vanaf 25 mei 2018 is de Europese privacyverordening Algemene Verordening Gegevensbescherming (AVG, ook bekend als General Data Protection Regulation of GDPR) van toepassing. Deze verordening gaat over de ‘bescherming van natuurlijke personen in verband met de verwerking van persoonsgegevens en betreffende het vrije verkeer van die gegevens’. Belangrijke onderdelen van de verordening zijn het recht op inzage en correctie […]

The post Binnenkort treedt de AVG (GDPR) in werking! appeared first on Michiel Rook's blog.

Soon the GDPR will take effect! Are you ready?

$
0
0

As of May 25th, 2018, the European privacy regulation General Data Protection Regulation (GDPR) will take effect. This regulation concerns the ‘protection of natural persons with regard to the processing of personal data and on the free movement of such data’. Important parts of the regulation are the right to access (and correct) of personal data […]

The post Soon the GDPR will take effect! Are you ready? appeared first on Michiel Rook's blog.

The Road to Continuous Deployment (All Day DevOps 2016 Recap)

$
0
0

In 2016 and 2017, I gave a series of talks titled “The Road to Continuous Deployment: a Case Study”, detailing some of the work I did in 2015 together with the team at De Persgroep Employment Solutions. At DPES, we significantly improved time to market, quality and delivery speed by implementing Continuous Delivery. In the […]

The post The Road to Continuous Deployment (All Day DevOps 2016 Recap) appeared first on Michiel Rook's blog.

Event Sourcing & The GDPR – Erasing your data footprint

$
0
0

Recently, the EU General Data Protection Regulation (GDPR) came into effect. You’ve probably heard all about it (or at least seen the absurd amount of ‘update privacy policy’ emails in your inbox). In any case, the GDPR attempts to regulate data protection for EU citizens, and is applicable to any organization that deals with EU citizens. […]

The post Event Sourcing & The GDPR – Erasing your data footprint appeared first on Michiel Rook's blog.

Forget me, please? Event sourcing and the GDPR (JAX London 2018)

$
0
0

Last week, at this year’s JAX London conference, I gave a talk about the General Data Protection Regulation (GDPR), and the very interesting and specific implications for applications that use event sourcing. The talk was inspired and partly based on two earlier articles that I wrote: Forget me please? Event sourcing and the GDPR and Event sourcing and the […]

The post Forget me, please? Event sourcing and the GDPR (JAX London 2018) appeared first on Michiel Rook's blog.

At year’s end – happy holidays!

$
0
0

It’s a wrap! And what a year it was. 13 conferences and 5 meetups in 9 countries – and my first overseas conference in Montreal, Canada! Many thanks to the organizers and everyone that attended these events, listened to me speak, asked questions, gave feedback, chased me around to ask more questions and made me […]

The post At year’s end – happy holidays! appeared first on Michiel Rook's blog.


PHP UK Closing Keynote (video)

$
0
0

Last month the good folks at the PHP UK Conference asked me to host the closing keynote. So, on Friday February the 22nd, I took the audience on a journey through my experiences with and views on Continuous Delivery and DevOps. The video of “I deploy on Fridays (and maybe you should too)” is now […]

The post PHP UK Closing Keynote (video) appeared first on Michiel Rook's blog.

The Road to Continuous Deployment (part 1)

$
0
0

The story below details a very interesting & transformational project that I was a part of in 2014 and 2015, at a Dutch company. I’ve told this story before during a number of conference talks (slides and videos are available, if you’re interested), and I’ve now finally come around to writing it up as a […]

The post The Road to Continuous Deployment (part 1) appeared first on Michiel Rook's blog.

The Road to Continuous Deployment (part 2)

$
0
0

The story below details a very interesting & transformational project that I was a part of in 2014 and 2015, at a Dutch company. I’ve told this story before during a number of conference talks (slides and videos are available, if you’re interested), and I’ve now finally come around to writing it up as a […]

The post The Road to Continuous Deployment (part 2) appeared first on Michiel Rook's blog.

The Road to Continuous Deployment (part 3)

$
0
0

The story below details a very interesting & transformational project that I was a part of in 2014 and 2015, at a Dutch company. I’ve told this story before during a number of conference talks (slides and videos are available, if you’re interested), and I’ve now finally come around to writing it up as a […]

The post The Road to Continuous Deployment (part 3) appeared first on Michiel Rook's blog.

The Road to Continuous Deployment (part 4)

$
0
0

The story below details a very interesting & transformational project that I was a part of in 2014 and 2015, at a Dutch company. I’ve told this story before during a number of conference talks (slides and videos are available, if you’re interested), and I’ve now finally come around to writing it up as a series of […]

The post The Road to Continuous Deployment (part 4) appeared first on Michiel Rook's blog.

Congratulations, you failed!

$
0
0

For those of you that know me, or have seen one of my conference talks, you know that one of my favorite phrases is: “if it hurts, do it more often”. Reading that, you might think I’m some sort of masochist. And it’s probably a phrase you won’t hear your doctor say to you. He’ll […]

The post Congratulations, you failed! appeared first on Michiel Rook's blog.

Reflections on the Learning Lab on Critical Thinking in Safety at Lund University






Latest Images