A Witnessing Service

I stopped journaling daily since the last 3 weeks. I feel like a stranger in a place that made me feel at home for a long time. I don’t want to be here anymore. I don’t feel like I belong here anymore. I am worried about writing these days.

I don’t know what it will be at the end.

It is a horse —
sometimes I ride.
Sometimes it rides me.
Not knowing is our only destination.
Sometimes we rain,
sometimes we blow,
sometimes we dry out,
sometimes we freeze cold.

I cannot hold all the leaves.
I cannot know which leaves belong to which tree.


The Assembly Line

Imagine an assembly line. Things are flowing constantly. There are workers around the assembly line. They constantly interact with what is moving. So workers have impact on the assembly line. They don’t let it be a straight line. They make it look like a circular, complicated line. They make one a million.

These workers can be like robots. They recognize their items on the assembly line. They identify them with incredible accuracy and speed. They are like chemists. They pick the smallest element, combine them, transform them. They make new structures from the basic elements and release them back onto the assembly line. It is an incredibly scaled system.

It is like event-driven architecture. Each service listens to its own events. Each service produces new events. The assembly line is a message broker. It works in fan-out mode. It publishes to all listeners. It is a highly liberal society. Everything is available to everyone.

How are these workers, robots, listener-services coming to be?


Origins

There is no stopping of events. Input is always there. It is not challenging to understand the sense doors. They are always open; nobody has the power to shut them down. You can hold 5 of them, but the 6th one is not graspable. It even senses nothingness. You cannot stay alive and stop breathing at the same time for too long.

How do these aggregates disappear then?

Message broker is also untouchable. Can a class control the JVM? Can a thread touch the OS? Can a bit touch a register? Electricity flows as long as the cable extends. Breathing becomes zeros and ones.

Sense doors are there. The assembly line is there. Events are flowing. And I am watching.

What is reacting to these events? Who built these services? Who owns them?

I don’t know.


The Witnessing Service

But there is a special service. A really special one.

It is the witnessing service. Someone thought: If I cannot touch the underlying system, I might as well build something that works with this system. A service that is going to swallow all events. It is like a hacker, a magician. It is like those early open-source geeks: I will produce an event, but it won’t be an event. It looks like an event, but it won’t be an event. I would like to mention GNU here.

This implies something important: one single event is not delivered to all services. So it is not fan-out actually, but more like “who comes first.” There is no delivery; there is availability. A message is available to all, but can only be picked once. A message will be processed, changed in shape, and published again.

So the witnessing service picks up the message, and releases a witnessing event — which is not interesting to any other listener. It is like a short circuit in the whole system. It is like a dead-letter queue.

Interestingly, if enough witnessing events are produced, the whole system seems to become idle. Other services receive no input, even though the same input mechanism is active.

What happens when a service is not receiving its event anymore? What happens when a service stops producing the specific events that keep it alive?

The service goes out of use. It is decommissioned.

It is not easy to build a witnessing service. A new service that competes with all other rooted services to be the first to pick up events. Imagine a junior, someone new joining a system. It has no power, no influence. There is struggle in the beginning. But the junior should know there is only one way: keep trying, keep witnessing. Not witnessing is not a loss, but witnessing is always a win.


Introspection Power

Imagine that we have a witnessing system — a high-tech, AI-driven, state-of-the-art witnessing system. And all other dinosaur systems are slowly but gradually being decommissioned.

Will we let the witnessing system decommission itself? What is left then? Events are still there. The assembly line is still moving. What is happening now in the system? Is any system still reacting to what is flowing?

There is also a memory service. This one is special too. It swallows events differently — picking them up so they can be released later. A smart decision, useful when the system is under heavy load. Too many events. Store them for later.

The witnessing service introduces a different energy into the whole system. It brings new capabilities. It makes it possible to build new services.

Here I want to mention reflection in Java. Different programming techniques — OOP, FP, scripting — strengthen an engineer in new ways of thinking. It is already a big step to stabilize oneself in thinking in terms of class/object and interface/implementation. But it is a whole different skill to understand reflection in the JVM. Who would not be surprised to find out a class is an object, and a class can be defined as a class?

This is introspection power. It makes the JVM a powerful platform and makes it possible to build many new tools and solutions.

The witnessing service is exactly that: the introspection of the mind itself.

Can we build a dynatrace like system on top of that in our mind? What would that give us?


The Broker Breaks Down

Here I think the metaphor of message broker is broken.

There is no delivery. There is no publishing. That would imply that the activities are happening in different locations. But all happens in the same location.

There is one single activity happening in one single location in a single moment.

The Mirror

Imagine a mirror. What you see is what you reflect.

Imagine a mirror and a big crowd. All the people in the crowd are looking at the mirror. Everyone sees what the mirror shows from their own point of reference. The mirror shows what one person sees.

Can you see how that moves?

I am looking at the mirror, seeing myself, but each time from a different location — a different perspective, a different set of eyes. What I see reflects in the mirror. Then I see again, maybe from the same eyes, maybe from different eyes. These perspectives are the equivalent of the services mentioned earlier.

What you see first is what is seen first.
What you see first is how it is seen first.

This internal mirror is exactly what happens externally. Many people look at the same thing and speak their mind — what they see, what they understand. Each time you listen to one of them, you look at the same thing from their perspective. Then someone else speaks based on that, and you hear it, so you see from their perspective. And this can go on and on.

What was internally a mirror becomes a verbal mirror.

Neither what we see nor how we see is stable.

You are one with many.
You are many with one.

The witnessing viewpoint shortcuts the whole activity. It is like silence in a two-person interaction. The person only hears themself. There is no different viewpoint.


This is where the base case is reached in recursive functioning.

The witnessing decommissions the journaling, the narrating, the analyzing.

The silence decommissions the conversation.

https://music.youtube.com/watch?v=pRMrAlWG8W4
https://music.youtube.com/watch?v=vZFaHjylMLI
https://music.youtube.com/watch?v=A_aaZERYYGM