Core image analysis system
Parallel scanning and data persistence
Separated physical equipment use from long-running backend processing. Once acquisition finishes, the scanner becomes available for the next sample while the previous result continues to be persisted independently.
Problem
The scanner remained occupied for 4–5 minutes, although acquisition took about one minute. The next sample had to wait for persistence.
My responsibility
Designed contracts and implemented backend orchestration, workflow states, intermediate result capture, safe retries, and recovery scenarios.
Result
The scanner is released after the result is captured. The next scan and persistence of the previous result proceed independently.
scanner occupancy per metre before the change
for acquisition, after which the equipment is released
persistence continues independently from the next scan
What changed for the user
The equipment acquires core images and measurements from multiple sensors. Previously, equipment availability depended on completion of the entire backend workflow. Users now see separate progress for acquisition and persistence.
Separating the workflows
After acquisition, the backend captures a result snapshot and releases the equipment. Two independent branches follow: scanning the next sample and persisting the previous result.
Parallel execution did not require a major rewrite of the existing pipeline. The key changes were event handling and separating task states.
Reliability and my contribution
I implemented backend orchestration and contributed to contracts between the main backend, scanner service, and analysis service. Other developers worked on the equipment mechanics and parts of the scanner service.
- Capture before release. An intermediate result snapshot allows processing to continue without querying equipment that has already been released.
- Short transactions. States and results are persisted in separate operations. File, network, and long-running compute operations do not hold a database transaction.
- Connection recovery. The backend reconciles its stored state with the scanner service to determine how the workflow can continue safely.
- Automated checks. Tests cover transaction boundaries, repeated processing, and partial failures.
I also contributed to aligning data from multiple sensors and implemented separate progress phases.
Result and measurement limits
Scanner occupancy per metre fell from approximately 4–5 minutes to about one minute. Persistence, taking another 3–4 minutes, no longer blocks the next sample.
This does not mean a fourfold reduction in total processing time. The confirmed effect is earlier equipment availability.
Stack: Java, Spring Boot, Spring Modulith application events, PostgreSQL, WebSocket, REST, file storage, JUnit, Mockito, integration testing.