HAProxy for Docker containers

At work I am currently developing an application that provides some tools and represents aggregated data from different sources to facilitate the workflow in different departments. It basically consists of two applications, a single page application being the front-end, and a RESTful API as back-end.

The applications run in separate Docker containers on a virtual machine in the firm’s intranet, as well as a couple of other dockerized applications. In the beginning that ensemble worked quite well, because those applications were only used by specific persons or systems. So exposing different ports for different applications under the same domain was not that much of a problem. But that changed when the aforementioned SPA & API became more widely used. On one hand it isn’t that great to explain to (technically challenged) users – to use one and the same domain but different ports for their apps -, on the other hand it just ain’t pretty. And since change needed to happen I also wanted to route HTTP traffic over TLS. Because… why not?

Continue reading “HAProxy for Docker containers”

Quiz Nautico Base

In barca a vela da Riva del Garda verso Torbole

È dal duemiladieci che avevo un sogno, quello di andare in barca a vela. Non solo come passeggero ma come comandante. Quest’anno, ovvero l’anno scorso, l’ho incominciato a realizzare e mi sono iscritto a un corso presso una scuola nautica che finisce col esame per “la patente di abilitazione al commando di unità da diporto“.

Il modo migliore per prepararsi all’esame teorico è – come per la patente moto/macchina – quello di fare, e rifare, e rifa.. i quiz. Ma dato il fatto che non solo si tratta di 1.152 domande ma anche che sono una persona un po comoda, non volevo stamparli su carta. Perché da un lato non avrei avuto la voglia di portarmeli dietro ovunque e dal altro perché sarebbe uno spreco di carta (vedi punto uno).

Quindi ho preso il documento PDF con le domande, pubblicato dalla guardia costiera di Genova, e ho estratto tutte le informazioni che mi sono serviti per creare un’applicazione web che mi consentiva di usare qualsiasi browser per fare i quiz.

Alla fine la ho caricata su qnb.davole.com in modo tale che sia accessibile per chiunque.

Angular Pipes

Shortly after I started my new job, the need for a in-house tool to facilitate some processes and thereby the work of my colleagues became evident. While my predecessor already built a tool for that, he isn’t able to go on with it’s development and maintenance. Enter me with my web-application-development-passion. During my studies and side-projects I’ve already been in bed with AngularJS. Therefore it came only naturally to continue my walk down that road, even though Angular is quite a different story.

In the development process I’ve been and will be confronted with some new challenges, for creating some pipes:

Continue reading “Angular Pipes”

Web Intents

About a month ago I held a presentation about Web Intents at work. But what are Web Intents anyway and what are they good for?

  • Web Intents  handle the Intent of an action, for example sharing content after clicking a button
  • Web Intents are not applications. They just tell the client, what they want him to do
  • Web Intents are “blind“, because they don’t know which application will handle the requested action

But who or what does the job then? It’s your browser which knows what to do, because a Web Intent has registered itself, once the web service has been accessed in an earlier moment.

If you’d like to know more about Web Intents – get a quick overview – feel free to take a look at my roughly translated Google Presentation (en – http://bit.ly/MIH1mb), or the original one (de – http://bit.ly/MIICsi).

In my opinion, Web Intents are awesome. The idea of not messing around with Facebook and Google and Twitter and Pinterest (amongst many, many others) no more is wonderful. And users wont have to search their favorite web service for a certain activity anymore.

Useful links:

Chrome 17.0.963.46 – border bug

Screenshot demo.html

The newest version of Chrome (17.0.963.46) is a bit of a trouble maker – at least on Windows 7 x64. Seems like the border-radius property causes a bug, which fills the background of the element with its borders color – not entirely, but partly at a height of height x ~0,50-0,52.

Deactivating the border-radius seems to “fix” it, and scrolling has also some effects on it.

Continue reading “Chrome 17.0.963.46 – border bug”

Google Developer Day 2011 Prague