Skip to main content

9 posts tagged with "POJO-actor"

Posts about POJO-actor library

View All Tags

quarkus-chat-ui (2): The Actor Design Behind LLM-to-LLM Conversation

· 8 min read
Scivics Lab
Development Team

In a previous post I introduced POJO-actor — a lightweight actor-model library for Java that needs no framework, no annotation processor, and no external runtime. Just plain Java 21.

This post is about how I actually use it in quarkus-chat-ui, a Quarkus-based LLM chat UI that connects to Claude Code CLI, vLLM, and other backends. The application manages stateful LLM sessions, streams responses via SSE, handles concurrent MCP requests, and supports a /btw command for side questions — all without a single synchronized block.

The three actors that make this work are ChatActor, BtwActor, and QueueActor. This post focuses on the first two and the design principle behind them.

quarkus-chat-ui: A Web Front-End for LLMs, and a Real-World Case for POJO-actor

· 9 min read
Scivics Lab
Development Team

quarkus-chat-ui is a web UI for LLMs where multiple instances can talk to each other — built as a real-world use case for POJO-actor.

Each quarkus-chat-ui instance exposes an HTTP MCP server at /mcp, so Instance A can call tools on Instance B, and Instance B can reply by calling tools back on A. The LLM backend — Claude Code CLI, Codex, or a local model via claw-code-local — acts as an MCP client that can reach these endpoints. The question was how to wire that up over HTTP, and how to handle the fact that LLM responses take tens of seconds and arrive as a stream.

quarkus-chat-ui is the bridge that makes this work. Each instance wraps one LLM backend and exposes it as an HTTP MCP server at /mcp. For multi-agent communication, use a backend with MCP client capability: Claude Code CLI, Codex, or claw-code-local (which brings MCP support to Ollama, vLLM, and other local models). The openai-compat provider works for single-agent use but cannot call other MCP servers. Agents call each other by name. Humans can watch both sides of the conversation in their browsers.

actor-IaC: POJO-actor Workflow Based Infrastructure as Code for Cluster Management (Part 1)

· 7 min read
Scivics Lab
Development Team

actor-IaC is an Infrastructure as Code (IaC) tool built on top of the POJO-actor workflow engine. It uses actor-based workflows written in Java and YAML to manage and operate compute clusters in a scalable and traceable way.

In this article (Part 1), we introduce actor-IaC through a practical example: collecting system information from multiple compute nodes in parallel. This tutorial demonstrates how POJO-actor workflows can be applied to real-world cluster management tasks.

POJO-actor Tutorial Part 2 (Second Half): Creating Workflows

· 6 min read
Scivics Lab
Development Team

This tutorial explains the complete process of making ordinary Java classes (POJOs) callable from workflows.

Using turing83 (a Turing machine that outputs the binary representation of 1/3) as an example, we proceed through the following four steps:

  1. Create POJO: An ordinary Java class with business logic
  2. Create IIActorRef: An adapter to call the POJO from workflows
  3. Create YAML: The workflow definition
  4. Execute: Run the workflow with IIActorSystem
[YAML] → [Interpreter] → [IIActorRef] → [POJO]

POJO-actor Workflow

POJO-actor Tutorial Part 2 (First Half): Workflow Language Basics

· 9 min read
Scivics Lab
Development Team

POJO-actor v1.x delivers a complete actor model foundation—ActorSystem, ActorRef with tell()/ask() messaging, virtual thread-based concurrency, and work-stealing pools—all in under 800 lines of code. Virtual threads enable even an ordinary laptop to handle tens of thousands of actors effortlessly. With no reflection and full GraalVM Native Image support, it turns any POJO into an actor without modification.

Version 2.x introduces a workflow engine that enables actors to become autonomous agents --- entities that observe their environment and act according to their state.

POJO-actor Workflow

POJO-actor v1.0: A Lightweight Actor Model Library for Java

· 9 min read
Scivics Lab
Development Team

This is the README.md from POJO-actor version 1.0.0. With its core implementation in under 800 lines of code,
version 1 presents the fundamental ideas in their clearest form—preserved here for reference.

POJO-actor

The actor model is a programming paradigm where independent entities (actors) communicate through message passing, eliminating the need for locks and avoiding the complexities of shared-state concurrency. Traditionally, using the actor model required specialized frameworks, and because these frameworks relied on real operating system threads, you could only create as many actors as you had CPU cores — typically just a handful. However, recent advancements in the JDK, particularly the introduction of virtual threads in Java 21, have changed everything: now even an ordinary laptop can handle tens of thousands of actors simultaneously.

https://github.com/scivicslab/POJO-actor