# javaito/holandacatalinafw architecture

> Architecture diagram of the GitHub repository javaito/holandacatalinafw, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/javaito/holandacatalinafw
- Repository: https://github.com/javaito/holandacatalinafw

## Overview

##### Project type and purpose
- From README ("Holanda Catalina is a powerful framework to create your own solution based on a micro-services architecture…") and the file tree (packages like cloud, io/net/http, layers, service, security), this is a Java microservices framework, not a single runnable service. It provides core infrastructure (networking, RPC, eventing, data-access layers, plugins, scripting, security, etc.) so Java developers can build distributed microservices with minimal boilerplate.

##### File structure
Top-level modules:
- src/main/java/org/hcjf/cloud → core cloud registry, message bus, orchestrator
- src/main/java/org/hcjf/io/net and io/net/http → transport (TCP, HTTP/1.1 & HTTP/2), clients, servers, proxies
- src/main/java/org/hcjf/layers → the “layer” pattern (cache, CRUD, query, scripting, plugins, distributed layers)
- src/main/java/org/hcjf/service → service lifecycle, threads, sessions
- src/main/java/org/hcjf/service/security → permission model, security manager
- support packages: encoding, errors, events, io/console, io/fs, kubernetes integration, logging, names, properties, utils
Build & deployment: Maven (pom.xml), CI (GitHub Actions, Travis, GitLab CI), examples folder with simple salary service.

##### README for additional insights
- You start by defining a Service
- The framework wires it into the Cloud registry
- Exposes HTTP/REST endpoints or other transports
- Layers provide data access, caching, query, etc.

##### Be detailed yet clear
- Cross-cutting concerns: logging, security, naming.
- How the customer’s code (examples) sits on top of this core.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Transport Layer"
        HttpClient["Http Client"]:::transport
        HttpServer["HTTP Server"]:::transport
        TcpClient["TCP Client"]:::transport
        TcpServer["TCP Server"]:::transport
        Proxy["Proxy"]:::transport
    end

    subgraph "Cloud Infrastructure"
        ServiceRegistry["Service Registry"]:::cloud
        CloudClient["Cloud Client"]:::cloud
        CloudServer["Cloud Server"]:::cloud
        Orchestrator["Cloud Orchestrator"]:::cloud
        Broadcast["Broadcast Consumer"]:::cloud
    end

    subgraph "Service Runtime"
        ThreadGroup["ServiceThreadGroup"]:::runtime
        Session["ServiceSession"]:::runtime
        SecManager["ServiceSecurityManager"]:::runtime
    end

    subgraph "Layer Engine"
        LayerProxy["LayerProxy"]:::layers
        DefaultLayer["DefaultLayer"]:::layers
        SubLayers["Sub-layers (Cache, CRUD, Query, Scripting, Plugins)"]:::layers
    end

    subgraph "Eventing Subsystem"
        EventBus["EventBus"]:::event
        DistributedEvent["DistributedEvent"]:::event
        RemoteEvent["RemoteEvent"]:::event
    end

    subgraph "Storage/Resources"
        FSWatcher["FileSystemWatcher"]:::storage
        DataSource["HTTP DataSources"]:::storage
        Kubernetes["Kubernetes Integration"]:::storage
    end

    subgraph "Auxiliary Subsystems"
        Logging["Logging"]:::aux
        Naming["Naming"]:::aux
        Properties["Properties"]:::aux
        Utils["Utilities"]:::aux
        Encoding["Encoding"]:::aux
        Errors["Errors"]:::aux
    end

    subgraph "Examples"
        SalaryService["SalaryService\n(EmployeeResource, SalaryResource, Main)"]:::examples
    end

    HttpClient -->|"InvokeMessage"| HttpServer
    TcpClient -->|"InvokeMessage"| TcpServer
    HttpServer -->|"InvokeMessage"| ServiceRegistry
    TcpServer -->|"InvokeMessage"| ServiceRegistry

    ServiceRegistry -->|"discover/register"| CloudClient
    CloudClient --> CloudServer
    CloudServer --> Orchestrator

    Orchestrator --> ThreadGroup
    ThreadGroup --> Session
    Session --> SecManager
    Session -->|"invoke"| LayerProxy

    LayerProxy --> DefaultLayer
    DefaultLayer --> SubLayers

    SubLayers --> FSWatcher
    SubLayers --> DataSource
    SubLayers --> Kubernetes
    SubLayers --> EventBus

    EventBus -.->|"publish"| Broadcast
    Broadcast -.-> RemoteEvent
    RemoteEvent --> EventBus

    SecManager --> Naming
    SecManager --> Properties
    ThreadGroup --> Logging
    SalaryService --> HttpServer
    SalaryService --> CloudClient

    classDef transport fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1;
    classDef cloud fill:#C8E6C9,stroke:#1B5E20,color:#1B5E20;
    classDef runtime fill:#F3E5F5,stroke:#4A148C,color:#4A148C;
    classDef layers fill:#FFE0B2,stroke:#E65100,color:#E65100;
    classDef event fill:#B2EBF2,stroke:#006064,color:#006064;
    classDef storage fill:#D7CCC8,stroke:#3E2723,color:#3E2723;
    classDef aux fill:#F5F5F5,stroke:#616161,color:#616161;
    classDef examples fill:#FCE4EC,stroke:#880E4F,color:#880E4F;

    click HttpServer "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/io/net/http"
    click TcpServer "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/io/net"
    click ServiceRegistry "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/cloud"
    click ThreadGroup "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/service"
    click SecManager "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/service/security"
    click LayerProxy "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/layers"
    click EventBus "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/events"
    click FSWatcher "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/io/fs"
    click DataSource "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/io/net/http/datasources"
    click Logging "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/log"
    click Naming "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/names"
    click Properties "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/properties"
    click Utils "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/utils"
    click Encoding "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/encoding"
    click Errors "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/errors"
    click Kubernetes "https://github.com/javaito/holandacatalinafw/tree/master/src/main/java/org/hcjf/io/net/kubernetes"
    click SalaryService "https://github.com/javaito/holandacatalinafw/tree/master/examples/org/hcjf/examples/salary"
```
