A better mousetrap (or, how to improve on Java 8 Optional)

Overview The java.util.Optional class is a great addition in Java 8 as it enables a more expressive way of conveying the concept of a library API return value that may not be there. While it is not meant to replace the use of null values in code (and you will get warnings not to use … More A better mousetrap (or, how to improve on Java 8 Optional)

HOW-TO Publish a Pyton Package on PyPi

Create a setup.py file The arguments for setup() are documented here and are non-trivial: a good example is my filecrypt‘s setup.py file. NOTE Do not confuse setuptools with distutils – this is the correct import for setup.py: from setuptools import setup The trickiest part is figuring out the packages, modules and the script files: probably … More HOW-TO Publish a Pyton Package on PyPi

Docker for Mac and insecure registries

If you are using a private registry with a self-signed certificate, and need to connect to it from a macOS laptop, you are likely to incur in the following error: $ docker-compose up -d Pulling search (docker.registry.mydomain.io:5000/image:2.0.1)… ERROR: Get https://docker.registry.mydomain.io:5000/v1/_ping: x509: certificate signed by unknown authority it turns that (a) there is not much of … More Docker for Mac and insecure registries

A python notebook to experiment with the Apache Mesos HTTP API – Part 3 of 3

This is the third and final part of a three-part series: Part 1 describes the required setup and how to get Apache Mesos Master and Agent running in two Vagrant VMs; Part 2 shows how to connect to the HTTP API and accept resource offers. This series is an extended (and updated) version of the … More A python notebook to experiment with the Apache Mesos HTTP API – Part 3 of 3

A python notebook to experiment with the Apache Mesos HTTP API – Part 2 of 3

This is the second part of a three-part series: Part 1 describes the required setup and how to get Apache Mesos Master and Agent running in two Vagrant VMs This series is an extended (and updated) version of the talk I gave at MesosCon Europe 2015 updated for Apache Mesos 1.0.0, which has just been … More A python notebook to experiment with the Apache Mesos HTTP API – Part 2 of 3

A python notebook to experiment with the Apache Mesos HTTP API – Part 1 of 3

This is the first of a series of three articles that shows how to setup a Vagrant-based Apache Mesos test/development environment on your laptop; then how to run a Python notebook against the HTTP API; and finally, how to launch Docker containers on the running Agent VM. It is pretty jam-packed and requires a certain … More A python notebook to experiment with the Apache Mesos HTTP API – Part 1 of 3