[KongchangAI]
ConceptHexagonal Architecture / 端口与适配器架构

Hexagonal Architecture

A software architecture pattern proposed by Alistair Cockburn in 2005, also known as the Ports and Adapters architecture. Its central idea is to place business logic at the core and interact with the outside world through abstract ports, with adapters responsible for translating external technologies so that the business core remains independent of specific implementations.

Timeline (last 90 days)

Nov 5

In Agent channel integration scenarios, the adapter pattern is usually implemented as a ports-and-adapters architecture (hexagonal architecture): the Agent core defines abstract ports (such as receive_message and send_reply), and each channel implements its corresponding adapter.

Unverified50%
Oct 19

CodebaseRAG adopts a hexagonal architecture, where query use cases depend on ports, and pgvector, Qdrant, Ollama and Anthropic sit behind the ports as adapters.

Unverified50%
Sep 20

In every round of this experiment, the flat version without architectural constraints consistently took less time overall.

Unverified50%
Sep 20

The hexagonal architecture version consumed more input and output tokens overall.

Unverified50%
Sep 20

The time saved by the hexagonal architecture in the database extension scenario was not enough to offset the cumulative time gap accumulated across the preceding fifteen-feature sequence.

Unverified50%
Sep 20

In the scenario of adding PostgreSQL support while retaining SQLite, the hexagonal version completed in approximately 39 minutes with no changes to the core application code, while the flat version took 71 minutes.

Unverified50%
Sep 20

The experiment built two versions of the same Java sample application: one using hexagonal architecture (with ports, adapters, and architecture tests), and the other a flat version with no architectural constraints, both of which needed to pass the same set of external test cases.

Unverified50%
Sep 5

Hexagonal Architecture, also known as the Ports and Adapters pattern, has a core philosophy of isolating different concerns through clear boundaries and interfaces, allowing each layer to evolve and be replaced independently.

Unverified50%

All Facts (9)

Unverified

Hexagonal Architecture (also known as Ports and Adapters Architecture) was proposed by Alistair Cockburn in 2005, with the core idea of decoupling business logic from external dependencies.

60%
Unverified

In Agent channel integration scenarios, the adapter pattern is usually implemented as a ports-and-adapters architecture (hexagonal architecture): the Agent core defines abstract ports (such as receive_message and send_reply), and each channel implements its corresponding adapter.

50%
Unverified

CodebaseRAG adopts a hexagonal architecture, where query use cases depend on ports, and pgvector, Qdrant, Ollama and Anthropic sit behind the ports as adapters.

50%
Unverified

In every round of this experiment, the flat version without architectural constraints consistently took less time overall.

50%
Unverified

The hexagonal architecture version consumed more input and output tokens overall.

50%
Unverified

The experiment built two versions of the same Java sample application: one using hexagonal architecture (with ports, adapters, and architecture tests), and the other a flat version with no architectural constraints, both of which needed to pass the same set of external test cases.

50%
Unverified

The time saved by the hexagonal architecture in the database extension scenario was not enough to offset the cumulative time gap accumulated across the preceding fifteen-feature sequence.

50%
Unverified

In the scenario of adding PostgreSQL support while retaining SQLite, the hexagonal version completed in approximately 39 minutes with no changes to the core application code, while the flat version took 71 minutes.

50%
Unverified

Hexagonal Architecture, also known as the Ports and Adapters pattern, has a core philosophy of isolating different concerns through clear boundaries and interfaces, allowing each layer to evolve and be replaced independently.

50%

Source Articles