# Enterprise patterns

Enterprise patterns referring more to the general architecture/design

* Idempotency
  * applying the same action multiple times will have the same result
  * eg: adding/subtracting is not idempotent; setting a value to X is idempotent
* Event sourcing
  * capture every event in an event object, and store this in order in a log (audit log, time-series data store)
  * can recreate the state by re-running all events
* CQRS (Command Query Responsibility Segregation)
  * can use a different model to update information than the model you use to read information
  * one data store for command, and one for query
* Broker/ Messaging bus
* Microservices
* Multi-tier architecture ( 3-tier or n-tier)
* MVC/MVP
* Hexagonal architecture


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://claudiu-stanciu.gitbook.io/software-craft/patterns/enterprise-patterns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
