Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungI wanted the diff, not a screenshot: a small URL-change API(24.09.2026 um 06:05 Uhr)
Sichere ProgrammierungFreeze Object Identity Before One Mutator Extract(24.09.2026 um 06:06 Uhr)
Sichere ProgrammierungRun an n8n workflow when a page's text changes(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungThe Spreadsheet That Runs Your Company (And Why That Should Worry You)(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungArchitecting an Enterprise Network on AWS Cloud WAN(24.09.2026 um 06:31 Uhr)
Sichere ProgrammierungI wanted the diff, not a screenshot: a small URL-change API(24.09.2026 um 06:05 Uhr)
Sichere ProgrammierungFreeze Object Identity Before One Mutator Extract(24.09.2026 um 06:06 Uhr)
Sichere ProgrammierungRun an n8n workflow when a page's text changes(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungThe Spreadsheet That Runs Your Company (And Why That Should Worry You)(24.09.2026 um 06:12 Uhr)
Sichere ProgrammierungArchitecting an Enterprise Network on AWS Cloud WAN(24.09.2026 um 06:31 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Decoupling Behavior and Data

-- written by ChatGPT - edited by me -- Intro Extensibility of logic is always difficult. How do we add a particular case in an algebra? How do we handle the control flow? We can't use goto, and sometimes we end with callback…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

-- written by ChatGPT - edited by me --






Intro



Extensibility of logic is always difficult. How do we add a particular case in an algebra? How do we handle the control flow? We can't use goto, and sometimes we end with callback hell with monadic styles. So what are we left with? We want a data-oriented programming design - this provides us with the ability to reason about the code easily, because of the fact that it's discrete. But then we always have the undefined nature of recursion, something Nasa thought is dangerous as it's hard to reason about stopping conditions. The AI is very good at math, and coding is getting there, but how can we make our code more logical, more algebraic, and get a recursive style for free, without the complexity?



At first I thought free monads another crazy idea from the academic side. But then, once you think about it within the context of what's been happening in databases, decoupling storage and compute, you start to realize it's more a natural extension of a paradigm shift that's happening. Once you understand what a free monad is, the intuition of it, you realize there are places where the ability to reason about and extend the code increases. It fits very nicely within the greater paradigm shift of code as data, and you get reusability at yet another level. In this case, maybe the experts are right!






Declarative Algebras, One-Step Execution, and the Hidden Free Monad




Describe first, act later.

Capture intent as data, postpone behavior to a pluggable interpreter—then watch extensibility emerge.










1. The principle



Across cloud warehouses, build pipelines, and micro-services, the winning pattern is:





  1. Capture intent as plain data – inspectable, serializable, versionable.


  2. Defer behavior to a separate phase – interpret, optimize, simulate, or replay whenever you like.



A fancy name for that pattern—one we won’t reveal until the very end—is the free monad.

But let’s get there step by step.







2. Build an extensible algebra



Start with zero side effects. Each constructor is frozen intent plus “what to do next.”




// Java 21 sealed algebra of document operations
sealed interface DocOp<A> permits Read, Transform, Store { }

record Read<A>(
String path,
java.util.function.Function<String,A> next // carry on with file text
) implements DocOp<A> { }

record Transform<A>(
java.util.function.Function<String,String> fn, // pure transform
java.util.function.Function<String,A> next // carry on with new text
) implements DocOp<A> { }

record Store<A>(
String dest, String content,
A next // nothing to pass along
) implements DocOp<A> { }






Need a new feature tomorrow—say NotifySlack? Add one more record; the compiler makes you handle it explicitly.









3. Stitch steps declaratively



We need a container that chains these atoms without running them.

Here’s a micro-“script” type (a tiny free monad):




sealed interface Script<A> {
/* A finished program */
record Pure<A>(A value) implements Script<A> { }

/* One pending step followed by the rest */
record Step<X,A>(
DocOp<X> op,
java.util.function.Function<X, Script<A>> cont
) implements Script<A> { }

static <A> Script<A> pure(A a) { return new Pure<>(a); }

/* Declarative bind */
default <B> Script<B> then(java.util.function.Function<A, Script<B>> f) {
return switch (this) {
case Pure<A>(var v) -> f.apply(v);
case Step<X,A>(var op, var k) ->
new Step<>(op, x -> k.apply(x).then(f));
};
}
}






Write workflows as data:




Script<Void> build =
new Script.Step<>(new Read<>("src/doc.txt", Script::pure), raw ->
new Script.Step<>(new Transform<>(String::trim, Script::pure), clean ->
new Script.Step<>(new Store<>("dist/doc.txt", clean, null), __ ->
Script.pure(null))));






Still no I/O!









4. One-step interpreter: jump, return, repeat






interface Engine<F> { <T> F run(Script<T> script); }

/* Production engine using async I/O */
class IOEngine implements Engine<java.util.concurrent.CompletableFuture<?>> {

public <T> java.util.concurrent.CompletableFuture<T> run(Script<T> s) {
while (true) { // ← single tail-rec loop
switch (s) {
case Script.Pure<T>(var v) -> // ① finished
return java.util.concurrent.CompletableFuture.completedFuture(v);

case Script.Step<Object,T>(var op, var k) -> {
switch (op) { // ② match the case
case Read(var p, var nxt) -> {
return java.nio.file.Files.readString(java.nio.file.Path.of(p))
.thenCompose(txt -> run(k.apply(nxt.apply(txt)))); // ③ jump
}
case Transform(var fn, var nxt) -> {
s = k.apply(nxt.apply(fn.apply("")));
break; // loop continues
}
case Store(var d, var c, var nxt) -> {
return java.nio.file.Files.writeString(java.nio.file.Path.of(d), c)
.thenCompose(__ -> run(k.apply(nxt)));
}
}
}
}
}
}
}








  • Peel one Step.


  • Handle the matching constructor.


  • Return the next Script (or tail-recurse).



That short “jump-to-next-step” loop never changes—add new cases, plug them in, done.









5. Recursive composition for free



Because every step returns another script, scripts compose like Lego:




Script<String> readClean =
new Script.Step<>(new Read<>("in.txt", Script::pure), raw ->
new Script.Step<>(new Transform<>(String::trim, Script::pure), Script::pure));

Script<Void> saveTwice =
readClean.then(clean ->
new Script.Step<>(new Store<>("out.txt", clean, null), __ ->
new Script.Step<>(new Store<>("backup.txt", clean, null), __ ->
Script.pure(null))));






No matter how deep the graph, the interpreter still just peels one layer, does work, repeats.









6. Why step-at-a-time rocks




























Benefit Comes from “handle one step, return the rest”
Infinite pausing You can pause, inspect, rewrite, or migrate mid-script.
Fine-grained billing/retry Each node is an observable unit of work.
Hot-swappable engines Same script runs on I/O, mocks, audit logs, …
Local reasoning & changes Add/adjust a constructor; compiler forces local updates.








7. The hidden reveal



If the structure feels familiar—a functor of single actions wrapped in a bindable container—you’ve secretly rebuilt the free monad for DocOp.



So the next time you separate intent from effect, remember:

that jump-to-next-step interpreter is the categorical machinery that makes modular, recursive, endlessly extensible software almost trivial.



Happy decoupling!

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
SOC Incident Playbook: Remote Code Execution (RCE) Defense
title: Detect Exploitation - Decoupling Behavior and Data
id: 25344315-7e37-42e1-9fcc-50dc517f742b
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Decoupling Behavior and Data" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Decoupling Behavior and Data.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Decoupling Behavior and Data

Thematisch verwandte Begriffe: Decoupling, Behavior, Data · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96676 | A vulnerability was identified in Fast FAC1900R 20190827_2.0.2. The impa…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick