Die wunderbare Welt von Isotopp

Mastodon Interaction Counters

Kristian Köhntopp - January 25, 2023
In this post , SirSquid@toot.io asks: Can someone explain to me why seeing retoots and likes is wildly different across Mastodon servers? From toot.io, a toot from @gamingonlinux@mastodon.social shows hardly anything. But when viewing it on mastodon.social, it has tons of both. This is one thing I would love to see properly cleaned up on Masto. Mastodon is using ActivityPub, a federated protocol. Nodes exchange articles, and each node caches articles.

I don't hate Let's Encrypt anymore

Kristian Köhntopp - January 4, 2023
So, Rachel is in a bad mood: Why I still have an old-school cert on my https site and I feel her. Like her, for my own sites I have always been running Apache. There was never much need to upgrade, the software was available, stable, and fast enough. At some point in time, I needed TLS and started to use Let’s Encrypt . That was messy: Running dehydrated , a bunch of haphazard shell scripts trying to get certificates authenticated and installed, through a wild chain of callbacks and sourced scripts all over the system, driven by Cron, and with bad alerting.

MySQL: Ways to run mysqldump

Kristian Köhntopp - January 3, 2023
This text exists mainly so that I paste the URL into the #mysql channel in Libera IRC. The mysqldump tools allows you to convert a MySQL database server or individual schemas back to SQL. You are left with a script that is supposed to be loadable into a target server and gives you back the full database, including all objects in it. You can read that SQL as a script into an empty server to create a new instance, or process it with different tools for different purposes.

Was mein Kind in der Schule so macht

Kristian Köhntopp - December 30, 2022
Die Niederlande sind ja ein Land, das mit WhatsApp funktioniert. “Ik stuur je snel een appie” und wenn WhatsApp mal down ist, wird das Land vorübergehend geschlossen. Damit kann man einverstanden sein oder nicht, aber Metcalfe’s Law ist mächtig und wenn man das Land nicht in Hard Mode spielen will, dann legt man sich besser ein WhatsApp zu. An ungefähr jedem zweiten Wohngebiet findet man ein solches Schild an der Einfahrtstraße.

Chromebooks in der Schule

Kristian Köhntopp - December 29, 2022
In Mein Sohn sitzt vor dem Computer und in Schulen digitalisieren ging es schon einmal um den Einsatz von Computern in der Schule, in Deutschland und in den Niederlanden. VWO Jetzt stand bei uns letzten Sommer nach dem Ende der 8. Grundschulklasse (der deutschen 6. Grundschulklasse) der Schulwechsel auf die VWO an. VWO steht für “Voorbereidend wetenschappelijk onderwijs”, studienvorbereitender Unterricht, und entspricht noch am ehesten einem deutschen Gymnasium. So wie es in Deutschland Gymnasien mit unterschiedlicher Ausrichtung gibt, gibt es das auch in den Niederlanden und der Name “Gymnasium” steht für eine VWO mit altsprachlicher Ausrichtung, der Name “Atheneum” für VWO mit einer technisch-naturwissenschaftlichen Ausrichtung, und es gibt noch ein paar weitere Geschmacksrichtungen.

MySQL: The command line client

Kristian Köhntopp - December 28, 2022
When asking for help in Libera Chat , in the #mysql channel, people will ask you to use the mysql command line client. They will also point you to dbfiddle.uk for asking questions. Specifically, when using phpMyAdmin, you will get hate. Why is that? When asking for help, it is almost impossible to help a GUI user, because they will need to paste screenshots in order to document what they did.

Meditations on Quitting

Kristian Köhntopp - December 27, 2022
I quit often. At least once a year, but there have been years when I have been quitting four times. Every time before a performance evaluation, or before important meetings, I sit down and write myself a notice. I pull up a word processor, start the empty business letter template, fill in the details and the date, and then write the three or four sentences necessary to inform my employer that the time has come to part ways.

From Hadoop to HTAP?

Kristian Köhntopp - December 23, 2022
For the last 15 years, one popular way to persist large amounts of data has been Hadoop, if you needed them persisted in such a way that you can still process them. Of course, from a database point of view, brute forcing a result by scanning compressed CSV files in parallel, and then building giant distributed Hash Joins is not very elegant. But two facts were true in 2006 influenced Hadoop’s design, and which allowed it to process data at all at a scale where all other things failed:

Tying the BI pipeline together

Kristian Köhntopp - December 22, 2022
In Of Stars and Snowflakes we have been looking at the “normal Form” for Data Warehouses/BI structures, and how it differs from normal forms used in transactional systems. In ETL from a Django Model we looked at one implementation of a classical offline DWH with a daily load. The normal BI structure is a fact table, in which an object identifier (the one we collect facts about) is paired with a point in time to report facts about the object at a certain point in time.

Ansible: List Cross-Join

Kristian Köhntopp - December 12, 2022
A friend asked in Discord: I need a pointer to a solution in Jinja. Given two lists, x: [a,b,c] and y: [d,e,f], I need the cross-join ["a.d","a.e","a.f","b.d",…,"c.e","c.f"]. I know how to cross-join, but that then is a list of lists, and I want join the inner lists. After some experimentation the result was a set of nasty templating loops. There has to be a better way. There are two: Ansible Custom Filters in Python Playbook We want a custom filter cross, which produces the desired result.

ChatGPT and Limits

Kristian Köhntopp - December 11, 2022
Like everybody else, I have been playing with ChatGPT from OpenAI . Specifically, I wanted to test how it could be used as a coding assistant, and what the limits are in terms of size and complexity. Code Generation I have been using the Labyrinths example as a base. My goal was to have ChatGPT write the Labyrinth class for me. I did so interactively. Kris: Write an empty Python class named Labyrinth

2FA für Mastodon

Kristian Köhntopp - December 10, 2022
Multi-Factor Authentication (Identifikation mit mehreren Faktoren) oder 2FA (Two-Factor-Authentication) sind ein Weg, einen Account vor der Übernahme durch Dritte zu schützen. Statt sich mit Usernamen und Passwort anzumelden ist zusätzlich noch eine wechselnde Pseudozufallszahl notwendig. Diese wird von einem Seed-Wert generiert, der durch eine Buchstabenfolge oder einen QR-Code repräsentiert wird. Authenticator Anwendung installieren Das Verfahren ist standardisiert und wird von vielen Tools unterstützt. Dazu gehören Google Authenticator, Bitwarden und viele andere Passwortmanager.

Change Data Capture

Kristian Köhntopp - December 5, 2022
Change Data Capture is a way to capture, well, events from a system that describe how the data in the system changed. For a system that does business transactions that may be at the lowest level Create, Update, or Delete of entities or relationships. Systems that emit this kind of events are called Entity Services and are kind of the lowest level of events that you can have in such a system.

USENET und Tiernetze

Kristian Köhntopp - December 2, 2022
Vor ziemlich genau 30 Jahren gab es in Deutschland die Anfangsgründe des Internet , aber es gab auch Netze, die auf anderer, viel älterer Technologie betrieben wurden – die Mailboxnetze. Das sind dezentrale Netze, bei denen denen lokale Rechner mit Modems ausgestattet wurden, bei denen man anrufen und dann Nachrichten a la Mastodon online lesen konnte. Oder man hatte Software daheim, die bei der Mailbox anrief, die Nachrichten heruntergeladen hat. Dann konnte man offline lesen, Antworten schreiben und ein zweites Mal anrufen.

Systemd and docker -H fd://

Kristian Köhntopp - November 28, 2022
Based on what I learned in Systemd Service and Socket Activation and Systemd Service and stdio , we can now have a look at Docker. The code for -H fd://-Handling is here . The file descriptors are coming from activation.Listeners(), and are in the listeners slice. In our case, the part after the fd:// is empty, so lines 83-85 are activated, and the incoming fd’s are passed to the Docker proper.

Systemd Service and stdio

Kristian Köhntopp - November 28, 2022
After yesterday’s article, Arne Blankerts pointed me at a note showing how to install a program using stdio with systemd. Code and Unit files The code: #! /usr/bin/env python3 import sys if __name__ == "__main__": while True: line = input().strip() print(f"ECHO: {line}") if line == "QUIT": sys.exit(0) The Socket Unit: $ systemctl --user cat kris2.socket # /home/kris/.config/systemd/user/kris2.socket [Unit] Description=My second service PartOf=kris2.service [Socket] ListenStream=127.0.0.1:12346 Accept=Yes [Install] WantedBy=sockets.target And the Service Unit, which has to be a template:

Systemd Service and Socket Activation

Kristian Köhntopp - November 27, 2022
In today’s Yak Shaving session I needed to understand how to expose the docker socket of a remote machine over the network. You should not do that, it is totally insecure, but I needed to do that to test something. Socket Activation I discovered that dockerd is running with -H fd://. # ps axuwww | grep docker[d] root 1616732 0.5 0.1 2930892 52168 ? Ssl 15:32 2:25 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.

ETL from a Django Model

Kristian Köhntopp - November 20, 2022
Continued from last weeks article on data warehouses. At work, I was tasked with building a capacity model for data center growth. The basic assumption of these things is often that the future behaves similarly to the past, so the future predicted capacity model is somehow an extension of past growth. I needed old server usage data, and was indeed able to find that in one of our systems, called ServerDB.

Of Stars and Snowflakes

Kristian Köhntopp - November 16, 2022
A sample system When you have an Online Transactional Database, you have to record transactions at some point in time. That means you get a table with time dimension in your OLTP system. Consider for example a system that records Reservations. Users exist and can reserve Things to use, for a day. You probably get a structure such as this: In an OLTP database, a reservation is a (resid, userid, thingid, date).

Databases on un-RAID-ed storage?

Kristian Köhntopp - November 9, 2022
Where I work, we run bare-metal databases on non-redundant local storage. That is, a database is a very cheap frontend blade server. It has 2 CPUs, with 8 cores/16 threads each. It contains 128 GB of memory, 2 or 4 TB of local NVME and it has a 10 GBit/s network interface. It costs around 120 to 150 Euro per month to run for 5 years, including purchase price and all datacenter costs.