# pds-technology/witsml architecture

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

- Interactive diagram: https://gitdiagram.com/pds-technology/witsml
- Repository: https://github.com/pds-technology/witsml

## Overview

PDS WITSMLstudio is a WITSML data-store service and reusable client/core library. A client request enters through the web service, is interpreted as a WITSML operation and dispatched to versioned providers, which use data adapters for object persistence; query parsing, validation, and XML conversion support that work. ETP is a separate protocol surface, while discovery and channel streaming are distinct capabilities. The README and source index establish the major responsibilities, but most provider and adapter implementations were not excerpted, so uncertain runtime links are omitted or marked unverified.

Main entry points: [`src/Store.Core/Data/WitsmlDataProvider.cs`](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlDataProvider.cs) (WITSML providers), [`src/Store/Controllers/EtpController.cs`](https://github.com/pds-technology/witsml/blob/master/src/Store/Controllers/EtpController.cs) (Web service), [`src/Store.Web/Controllers/EtpControllerBase.cs`](https://github.com/pds-technology/witsml/blob/master/src/Store.Web/Controllers/EtpControllerBase.cs) (ETP endpoint), [`src/Core/WitsmlParser.cs`](https://github.com/pds-technology/witsml/blob/master/src/Core/WitsmlParser.cs) (XML parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and ETP"]
  node_webapi["Web service<br/>[EtpController.cs]"]
  node_etp["ETP endpoint"]
end

subgraph group_core["WITSML Core"]
  node_parser["XML parser<br/>[WitsmlParser.cs]"]
  node_navigator["Document navigator"]
  node_querycontext["Client query context"]
  node_linq["LINQ client<br/>[WitsmlQuery.cs]"]
  node_channels["Channel data"]
  node_logmodel["Log model<br/>[Log.cs]"]
end

subgraph group_store["Store Operations"]
  node_settings["Store settings<br/>[WitsmlSettings.cs]"]
  node_operation["Operation context"]
  node_provider["WITSML providers"]
  node_etpprovider["ETP providers<br/>[EtpDataProvider.cs]"]
  node_queryparse["Query parser"]
  node_validator["Object validation"]
end

subgraph group_data["Data and Persistence"]
  node_adapter["Data adapters"]
  node_mongo["MongoDB query<br/>[MongoDbQuery.cs]"]
  node_database[("Database provider")]
end

subgraph group_extensions["Store Extensions"]
  node_discovery["Discovery providers<br/>[Discovery]"]
  node_streaming["Channel streaming<br/>[ChannelStreaming]"]
  node_growing["Growing objects"]
end

node_client(("WITSML client"))

node_client -.->|"sends requests"| node_webapi
node_client -.->|"opens WebSocket"| node_etp
node_etp -.->|"dispatches ETP"| node_etpprovider
node_webapi -->|"dispatches operations"| node_provider
node_provider -.->|"uses context"| node_operation
node_provider -.->|"parses requests"| node_queryparse
node_provider -.->|"validates objects"| node_validator
node_provider -->|"uses CRUD"| node_adapter
node_adapter -.->|"queries storage"| node_mongo
node_mongo -.->|"accesses database"| node_database
node_queryparse -->|"uses object types"| node_parser
node_parser -->|"navigates elements"| node_navigator
node_linq -->|"executes queries"| node_querycontext
node_querycontext -->|"calls WITSML API"| node_client
node_discovery -->|"reads settings"| node_settings
node_streaming -.->|"streams channel data"| node_channels
node_channels -->|"reads log data"| node_logmodel
node_growing -->|"reads timeouts"| node_settings

click node_webapi "https://github.com/pds-technology/witsml/blob/master/src/Store/Controllers/EtpController.cs"
click node_etp "https://github.com/pds-technology/witsml/blob/master/src/Store.Web/Controllers/EtpControllerBase.cs"
click node_settings "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Configuration/WitsmlSettings.cs"
click node_operation "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/WitsmlOperationContext.cs"
click node_provider "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlDataProvider.cs"
click node_etpprovider "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/EtpDataProvider.cs"
click node_queryparse "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlQueryParser.cs"
click node_validator "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/DataObjectValidator.cs"
click node_adapter "https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlDataAdapter.cs"
click node_mongo "https://github.com/pds-technology/witsml/blob/master/src/Store.MongoDb/Data/MongoDbQuery.cs"
click node_database "https://github.com/pds-technology/witsml/blob/master/src/Store.MongoDb.Common/Data/DatabaseProvider.cs"
click node_parser "https://github.com/pds-technology/witsml/blob/master/src/Core/WitsmlParser.cs"
click node_navigator "https://github.com/pds-technology/witsml/blob/master/src/Core/Data/DataObjectNavigator.cs"
click node_querycontext "https://github.com/pds-technology/witsml/blob/master/src/Core/Query/WitsmlQueryContext.cs"
click node_linq "https://github.com/pds-technology/witsml/blob/master/src/Core/Linq/WitsmlQuery.cs"
click node_discovery "https://github.com/pds-technology/witsml/tree/master/src/Store.Core/Providers/Discovery"
click node_streaming "https://github.com/pds-technology/witsml/tree/master/src/Store.Core/Providers/ChannelStreaming"
click node_growing "https://github.com/pds-technology/witsml/blob/master/src/Store.Jobs/ObjectGrowingManager.cs"
click node_channels "https://github.com/pds-technology/witsml/blob/master/src/Core/Data/Channels/ChannelDataReader.cs"
click node_logmodel "https://github.com/pds-technology/witsml/blob/master/src/Core/Adapters/Log.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapi,node_etp,node_client toneBlue
class node_parser,node_navigator,node_querycontext,node_linq,node_channels,node_logmodel toneAmber
class node_settings,node_operation,node_provider,node_etpprovider,node_queryparse,node_validator toneMint
class node_adapter,node_mongo,node_database toneRose
class node_discovery,node_streaming,node_growing toneIndigo
```

## Components

### Web and ETP

- [Web service](https://github.com/pds-technology/witsml/blob/master/src/Store/Controllers/EtpController.cs): `src/Store/Controllers/EtpController.cs`
- [ETP endpoint](https://github.com/pds-technology/witsml/blob/master/src/Store.Web/Controllers/EtpControllerBase.cs): `src/Store.Web/Controllers/EtpControllerBase.cs`

### WITSML Core

- [XML parser](https://github.com/pds-technology/witsml/blob/master/src/Core/WitsmlParser.cs): `src/Core/WitsmlParser.cs`
- [Document navigator](https://github.com/pds-technology/witsml/blob/master/src/Core/Data/DataObjectNavigator.cs): `src/Core/Data/DataObjectNavigator.cs`
- [Client query context](https://github.com/pds-technology/witsml/blob/master/src/Core/Query/WitsmlQueryContext.cs): `src/Core/Query/WitsmlQueryContext.cs`
- [LINQ client](https://github.com/pds-technology/witsml/blob/master/src/Core/Linq/WitsmlQuery.cs): `src/Core/Linq/WitsmlQuery.cs`
- [Channel data](https://github.com/pds-technology/witsml/blob/master/src/Core/Data/Channels/ChannelDataReader.cs): `src/Core/Data/Channels/ChannelDataReader.cs`
- [Log model](https://github.com/pds-technology/witsml/blob/master/src/Core/Adapters/Log.cs): `src/Core/Adapters/Log.cs`

### Store Operations

- [Store settings](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Configuration/WitsmlSettings.cs): `src/Store.Core/Configuration/WitsmlSettings.cs`
- [Operation context](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/WitsmlOperationContext.cs): `src/Store.Core/WitsmlOperationContext.cs`
- [WITSML providers](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlDataProvider.cs): `src/Store.Core/Data/WitsmlDataProvider.cs`
- [ETP providers](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/EtpDataProvider.cs): `src/Store.Core/Data/EtpDataProvider.cs`
- [Query parser](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlQueryParser.cs): `src/Store.Core/Data/WitsmlQueryParser.cs`
- [Object validation](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/DataObjectValidator.cs): `src/Store.Core/Data/DataObjectValidator.cs`

### Data and Persistence

- [Data adapters](https://github.com/pds-technology/witsml/blob/master/src/Store.Core/Data/WitsmlDataAdapter.cs): `src/Store.Core/Data/WitsmlDataAdapter.cs`
- [MongoDB query](https://github.com/pds-technology/witsml/blob/master/src/Store.MongoDb/Data/MongoDbQuery.cs): `src/Store.MongoDb/Data/MongoDbQuery.cs`
- [Database provider](https://github.com/pds-technology/witsml/blob/master/src/Store.MongoDb.Common/Data/DatabaseProvider.cs): `src/Store.MongoDb.Common/Data/DatabaseProvider.cs`

### Store Extensions

- [Discovery providers](https://github.com/pds-technology/witsml/tree/master/src/Store.Core/Providers/Discovery): `src/Store.Core/Providers/Discovery`
- [Channel streaming](https://github.com/pds-technology/witsml/tree/master/src/Store.Core/Providers/ChannelStreaming): `src/Store.Core/Providers/ChannelStreaming`
- [Growing objects](https://github.com/pds-technology/witsml/blob/master/src/Store.Jobs/ObjectGrowingManager.cs): `src/Store.Jobs/ObjectGrowingManager.cs`

### Other components

- **WITSML client**

## Connections

- WITSML client → Web service: sends requests
- WITSML client → ETP endpoint: opens WebSocket
- ETP endpoint → ETP providers: dispatches ETP
- Web service → WITSML providers: dispatches operations
- WITSML providers → Operation context: uses context
- WITSML providers → Query parser: parses requests
- WITSML providers → Object validation: validates objects
- WITSML providers → Data adapters: uses CRUD
- Data adapters → MongoDB query: queries storage
- MongoDB query → Database provider: accesses database
- Query parser → XML parser: uses object types (evidence: `src/Store.Core/Data/WitsmlQueryParser.cs`)
- XML parser → Document navigator: navigates elements (evidence: `src/Core/WitsmlParser.cs`)
- LINQ client → Client query context: executes queries (evidence: `src/Core/Linq/WitsmlQuery.cs`)
- Client query context → WITSML client: calls WITSML API (evidence: `src/Core/Query/WitsmlQueryContext.cs`)
- Discovery providers → Store settings: reads settings (evidence: `src/Store.Core/Providers/DiscoveryQuery/DiscoveryQuery12StoreProvider.cs`)
- Channel streaming → Channel data: streams channel data
- Channel data → Log model: reads log data (evidence: `src/Core/Adapters/Log.cs`)
- Growing objects → Store settings: reads timeouts (evidence: `src/Store.Jobs/ObjectGrowingManager.cs`)
