How datasharingframework/dsf works
Project type and purpose
• This is a distributed full-stack microservice application (“Data Sharing Framework”) providing two core services at each site:
• A FHIR R4 server (dsf-fhir) exposing REST/WebSocket APIs for clinical resources.
• A BPMN-based process engine (dsf-bpe) coordinating local and cross-site workflows.
• The README confirms it uses Camunda (BPMN 2.0) and FHIR, secured via X.509 certificates, to support federated biomedical research.
High-level file structure
• Top-level modules:
• dsf-fhir (server, jetty, auth, REST adapter, validation)
• dsf-bpe (API, server, jetty)
• dsf-common (shared libraries: auth, config, db, UI, status)
• dsf-tools (CLI/build/db migration/documentation utilities)
• dsf-docker (Dockerfiles and docker-compose for multi-site deployment)
• dsf-webservice-client & websocket-client (client SDKs)
• Each service has sub-modules for Spring Boot / Jersey applications, configuration, resources (static/UI templates), database migrations (Liquibase), and test suites.
Key insights from README
• Each participating site deploys both the FHIR server and BPE engine in its local network.
• Services communicate over HTTPS with mutual X.509 authentication.
• Docker configurations orchestrate multiple “dic” sites, proxies, and a central trust provider (Keycloak for OIDC client configs).
1) FHIR Server (Spring Boot / Jersey + Jetty)
2) BPMN Process Engine (Camunda embedded in dsf-bpe)
3) Two Databases (PostgreSQL / Liquibase): one for FHIR data, one for BPMN engine & plugin state
4) Identity Provider (Keycloak or X.509 CA)
5) Reverse Proxy / API Gateway (Apache httpd or NGINX in dsf-docker)
6) External DSF Sites (peers with the same stack)
7) FHIR & WebSocket client libraries used by dsf-bpe and external apps
8) dsf-tools CLI utilities (db migrator, bundle generator, etc.)
• Incoming client requests → Proxy → FHIR Server or BPE Server
• BPE Server → (FHIR Webservice Client) → FHIR Server REST API
• FHIR Server publishes resource events → BPMN subscriptions or WebSocket clients
• Both servers ↔ Databases for persistence (JDBC / Liquibase migrations)
• Servers ↔ Identity Provider (mutual TLS or OIDC flows)
• Sites communicate peer-to-peer: BPE engines invoke remote FHIR endpoints for cross-site tasks
c. Architectural patterns and principles:
• Microservices: two bounded contexts (FHIR, BPE) with shared libraries via dsf-common
• Layered architecture:
– API layer (JAX-RS, Jersey, WebSocket)
– Service layer (Spring services, Camunda delegates)
– Data access (DAO, JDBC commands)
– Database migrations (Liquibase changelogs)
• Plugin pattern: dsf-bpe uses ProcessPluginApi to extend process tasks
• Event-driven: FHIR subscription events drive BPMN tasks
• Standardized deployments: Docker + docker-compose scripts for multisite setups
d. Technologies & frameworks (annotate components):
• Java 11+, Spring Boot, Jersey, Thymeleaf (UI templates)
• Camunda BPMN engine
• Jetty server, Log4j2 for logging
• Liquibase for DB migrations
• PostgreSQL (engine + identity)
• Maven for builds & GitHub Actions workflows
• Docker, NGINX/Apache, Keycloak for security