Skip to main content

PixelSense – Distributed Server Communication Architecture

1. Overview​

PixelSense is a distributed application in which different application components are deployed on different servers, networks, or cloud/on-premises locations.

Although these components are physically separated, they work together as a single application through well-defined network communication channels.

The major components are:

  • Frontend – React/Vite web application
  • Backend – Java Spring Boot REST API
  • MySQL – Persistent application database
  • Redis – Cache/session/token-related data
  • Artifactory – Image and artifact storage
  • End User / Browser – Entry point to the application

The most important concept in this architecture is:

Distributed deployment does not mean independent applications. The components are deployed separately but communicate with each other through defined protocols and APIs to provide one end-to-end PixelSense application.

The Spring Boot Backend acts as the primary application communication and orchestration layer. The Frontend communicates with the Backend for application operations, while the Backend communicates with MySQL, Redis, and Artifactory as required.

For image data, the architecture also allows the Frontend to communicate directly with Artifactory using a short-lived signed URL, so large image files do not need to pass through the Backend.


2. High-Level Architecture

The architecture can be viewed as five logical layers:

┌────────────────────────────────────────────────────────────┐
│ USER LAYER │
│ │
│ Browser / End User │
└───────────────────────────┬────────────────────────────────┘
│
HTTPS
│
▼
┌────────────────────────────────────────────────────────────┐
│ PRESENTATION LAYER │
│ │
│ React / Vite Frontend │
│ AWS S3 + CloudFront / Hosting │
└───────────────────────────┬────────────────────────────────┘
│
HTTPS / REST
│
▼
┌────────────────────────────────────────────────────────────┐
│ APPLICATION LAYER │
│ │
│ Spring Boot REST API │
│ Application Logic │
│ Orchestration │
└───────────────┬──────────────┬──────────────┬──────────────┘
│ │ │
JDBC/TLS RESP/TLS HTTPS
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────────┐
│ MySQL │ │ Redis │ │ Artifactory │
│ Database │ │ Cache │ │ Image Store │
└──────────┘ └──────────┘ └──────────────┘

There is also a special image-download path:

Frontend
│
│ Request image access
▼
Backend
│
│ Generate short-lived signed URL
▼
Frontend
│
│ Direct HTTPS request
▼
Artifactory
│
│ Image
▼
Frontend

This distinction is important because metadata/API communication and large image-data transfer follow different paths.


3. What Does “Distributed Server Communication” Mean?

In a traditional single-server application, everything might run on the same machine:

Application
│
├── Frontend
├── Backend
├── Database
└── File Storage

In PixelSense, these responsibilities are separated.

For example:

Server / Location A
└── React Frontend

Server / Location B
└── Spring Boot Backend

Server / Location C
└── MySQL

Server / Location D
└── Artifactory

Server / Location E
└── Redis

These systems communicate over the network.

Therefore, when the user clicks something in the browser, the request may travel through multiple physical systems before the operation is completed.

For example:

Browser
↓
Frontend
↓
Backend
↓
MySQL
↓
Backend
↓
Frontend

For an image:

Browser
↓
Frontend
↓
Backend
↓
Signed URL
↓
Artifactory
↓
Image
↓
Browser

This is the essence of distributed communication in PixelSense.


4. Component Responsibilities

4.1 End User / Browser​

The browser is the entry point for the application.

The user can:

  • Log in
  • View test runs
  • View checkpoints
  • View baselines
  • Compare images
  • Review differences
  • Accept/reject results
  • Manage variants
  • View stored images

The browser does not directly communicate with every backend service.

Instead, normal application operations go through the React application and Spring Boot API.


5. Frontend – React/Vite

The frontend is the presentation layer.

It is responsible for:

  • Rendering the UI
  • User interaction
  • Calling REST APIs
  • Displaying test results
  • Displaying baseline/checkpoint information
  • Requesting image access
  • Downloading images from Artifactory when provided with a valid signed URL

The frontend can be hosted independently from the Backend.

For example:

Region A / Cloud

┌─────────────────────────────┐
│ Frontend Hosting │
│ │
│ React │
│ Vite │
│ Static JavaScript/CSS/HTML │
│ │
│ S3 + CloudFront │
│ or Firebase Hosting │
└─────────────────────────────┘

The browser accesses the frontend using HTTPS.

Communication​

Browser
│
│ HTTPS
▼
Frontend Hosting

The browser downloads the static frontend application.

After that, the React application starts communicating with the Backend API.


6. Frontend → Backend Communication

Once the React application is loaded, it needs application data.

For example:

GET /api/test-runs
GET /api/checkpoints
GET /api/baselines
POST /api/login
GET /api/comparisons

The frontend sends HTTPS REST requests to the Spring Boot Backend.

Conceptually:

React
│
│ HTTPS / REST
▼
Spring Boot

The Backend processes the request and returns a response, normally JSON.

Example:

{
"testRunId": 123,
"name": "Audi A4 Configurator UI Issue",
"status": "DIFF_FOUND"
}

The important point is that the Frontend does not need to know where MySQL or Redis is located.

It only needs to know the Backend API endpoint.


7. Backend – Central Application Layer

The Spring Boot Backend is the main application communication layer.

It performs:

  • Authentication
  • Authorization
  • Business logic
  • Test-run management
  • Baseline management
  • Checkpoint management
  • Comparison management
  • Variant management
  • Region management
  • Database operations
  • Cache operations
  • Image-storage operations
  • Signed URL generation/authorization

The Backend therefore acts as the orchestrator.

For example:

Frontend
│
│ "Give me checkpoint details"
▼
Backend
│
├── Query MySQL
│
├── Check Redis if required
│
└── Return response
│
▼
Frontend

The Frontend doesn't need to coordinate all these systems itself.


8. Backend → MySQL Communication

MySQL is responsible for persistent application data.

Typical information stored in MySQL includes:

  • Users
  • Test runs
  • Checkpoints
  • Baselines
  • Comparison information
  • Variant information
  • Region information
  • Metadata
  • JSON data
  • Status information
  • Relationships between entities

The Backend communicates with MySQL using the database protocol.

Conceptually:

Spring Boot
│
│ JDBC / TLS
▼
MySQL

The exact internal database port should be treated as an environment/configuration detail, rather than hard-coded into the architecture documentation.

Example request​

A user opens a test result.

Browser
↓
Frontend
↓
Backend
↓
MySQL

The Backend may execute:

Find test run
↓
Find checkpoint
↓
Find comparison
↓
Find metadata
↓
Return JSON

The response then travels back:

MySQL
↓
Backend
↓
Frontend
↓
Browser

9. MySQL Is Not Directly Connected to the Frontend

This is an important architectural boundary.

The Frontend should not do:

Frontend ────────► MySQL

Instead:

Frontend ────────► Backend ────────► MySQL

This provides:

  • Authentication
  • Authorization
  • Validation
  • Business logic
  • Database abstraction
  • Security boundaries

The database therefore remains an internal service rather than a public application endpoint.


10. Backend → Redis Communication

Redis is used for fast temporary or frequently accessed information.

Depending on the PixelSense implementation, this can include:

  • Session-related information
  • Refresh tokens
  • Cached values
  • Frequently accessed temporary data
  • Authentication-related state

The communication looks like:

Spring Boot
│
│ Redis protocol / TLS
▼
Redis

The Backend might perform:

GET value
SET value
DELETE value
EXPIRE value

For example, during authentication:

User
↓
Frontend
↓
Backend
↓
Redis
↓
Token/session lookup

Again, the exact internal port is an infrastructure configuration detail and does not need to be shown in the architecture diagram.


11. Backend → Artifactory Communication

Artifactory is responsible for storing image-related files and other repository artifacts.

For PixelSense, this can include:

  • Baseline images
  • Checkpoint images
  • Difference images
  • Image versions
  • Other stored artifacts

The Backend communicates with Artifactory over HTTPS.

Spring Boot
│
│ HTTPS
▼
Artifactory

The Backend can perform operations such as:

Upload image
Retrieve image metadata
Generate/authorize image access
Determine storage path
Manage image references

12. Why Artifactory Is Separate From MySQL

A major architectural decision is separating structured application data from large binary image data.

Instead of putting large images directly into MySQL:

MySQL
├── Users
├── Test runs
├── Metadata
└── Large image BLOBs ← undesirable for this architecture

PixelSense separates them:

MySQL
├── Metadata
├── IDs
├── Relationships
└── Image references

Artifactory
├── Baseline images
├── Checkpoint images
└── Diff images

This allows the database to remain focused on structured application data while Artifactory handles binary storage.


13. Image Upload Flow

When PixelSense needs to store an image, the Backend can upload it to Artifactory.

For example, a checkpoint image is captured.

Checkpoint
│
▼
Backend
│
│ HTTPS upload
▼
Artifactory

The image may be stored using a path such as:

repository/
test-run/
checkpoint/
<image-id>

The exact repository/path structure depends on the implementation.

The Backend can then maintain the corresponding metadata in MySQL.

For example:

MySQL

checkpoint_id = 123
image_id = abc123
storage_path = ...
storage_hash = ...

while the actual binary image exists in Artifactory.


14. Why the Frontend Downloads Images Directly From Artifactory

This is one of the most important parts of the architecture.

Imagine a comparison page containing:

  • Baseline image
  • Checkpoint image
  • Difference image

These images can be large.

A naïve architecture would be:

Frontend
↓
Backend
↓
Artifactory
↓
Backend
↓
Frontend

This means the Backend becomes a middleman for the entire image payload.

That can create unnecessary:

  • Network traffic
  • Backend bandwidth consumption
  • Memory usage
  • CPU overhead
  • Response latency

Instead, PixelSense can use a short-lived signed URL.


15. Signed URL Image Access

The flow becomes:

Frontend
│
│ "I need image X"
▼
Backend
│
│ Generate/authorize short-lived URL
▼
Frontend
│
│ HTTPS + signed URL
▼
Artifactory
│
│ Image
▼
Frontend

The Backend is still involved in authorization/access control, but it does not have to proxy the entire image.


16. Detailed Signed URL Flow

Step 1 – Frontend requests image access​

The React application knows it needs an image.

For example:

GET /api/images/checkpoint/123/access

The request goes to the Backend.

Frontend
│
│ HTTPS
▼
Backend

Step 2 – Backend validates the request​

The Backend can verify:

  • User authentication
  • Authorization
  • Test-run access
  • Checkpoint access
  • Image existence
  • Requested image type

For example:

Is user authenticated?
↓
Does user have access?
↓
Does image exist?
↓
Is requested resource valid?

Only after these checks does the Backend provide image access.


Step 3 – Backend generates a short-lived signed URL​

The Backend creates or obtains a temporary URL that grants access to the specific image.

Conceptually:

https://artifactory/.../image.png
+
temporary authorization information
+
expiration

The URL should be:

  • Resource-specific
  • Time-limited
  • Difficult to reuse after expiration
  • HTTPS protected

The exact signed URL mechanism depends on the Artifactory/storage configuration being used.


Step 4 – Backend returns the URL to Frontend​

The response might conceptually look like:

{
"imageId": "abc123",
"url": "https://artifactory/...signed-access...",
"expiresAt": "2026-09-26T14:35:00Z"
}

The Frontend now has temporary permission to retrieve the image.


17. Frontend → Artifactory Direct Download

The React application uses the signed URL.

Frontend
│
│ HTTPS
│ Signed URL
▼
Artifactory

Artifactory validates the authorization information associated with the URL.

If valid:

Artifactory
│
│ Image bytes
▼
Frontend

The image is then displayed in the UI.

The Backend does not have to receive the image bytes.


18. Why This Is a Distributed Communication Pattern

This is a good example of why PixelSense is distributed.

There are actually two communication paths:

Application communication​

Frontend
↓
Backend

Used for:

  • Login
  • Test runs
  • Metadata
  • Comparisons
  • User operations

Binary-data communication​

Frontend
↓
Artifactory

Used for:

  • Baseline image
  • Checkpoint image
  • Diff image

The Backend authorizes/provides access information, but the large binary payload travels directly between the Frontend and Artifactory.


19. Signed URL Expiration

The signed URL should have a limited lifetime.

Conceptually:

Signed URL created
│
▼
Valid
│
│
▼
Image downloaded
│
▼
URL expires
│
▼
Access denied

This prevents a temporary image-access URL from remaining valid indefinitely.

However, one technical distinction is important:

“Expires after download” and “expires after a short lifetime” are not necessarily the same mechanism.

A typical signed URL is time-limited. If PixelSense specifically requires single-use access, that needs an additional mechanism at the authorization/storage layer rather than assuming that a normal time-based signed URL automatically becomes invalid immediately after one download.


20. Complete End-to-End Communication

Putting everything together:

USER
│
│ HTTPS
▼
┌──────────────┐
│ FRONTEND │
│ React / Vite │
└──────┬───────┘
│
│ HTTPS / REST
▼
┌──────────────┐
│ BACKEND │
│ Spring Boot │
└──┬────┬───┬──┘
│ │ │
JDBC │ │ │ HTTPS
│ │ │
▼ ▼ ▼
MySQL Redis Artifactory
▲
│
│ Signed URL
│
┌────┴─────┐
│ Frontend │
└──────────┘

This demonstrates that the Backend is the primary application integration layer while Artifactory also has a direct data-delivery relationship with the Frontend.


21. Scenario 1 – User Opens PixelSense

Suppose the user opens:

https://pixelsense.example.com

Communication sequence​

  1. Browser → Frontend Hosting
HTTPS

The browser downloads:

  • HTML
  • JavaScript
  • CSS
  • React/Vite application assets
  1. React application starts

The frontend loads in the browser.

  1. Frontend → Backend

The application calls APIs such as:

/api/user
/api/test-runs
  1. Backend processes the request

The Backend may communicate with:

Redis
MySQL
  1. Backend → Frontend

The Backend returns JSON.

The UI is now populated.


22. Scenario 2 – User Opens a Test Result

Suppose the user selects:

Audi A4 Configurator UI Issue

The sequence could be:

Browser
↓
React
↓
GET test result
↓
Spring Boot
↓
MySQL
↓
Test result metadata
↓
Spring Boot
↓
React

MySQL may return:

Test Run
Checkpoint
Baseline
Comparison
Status
Image references

The Frontend can then determine which images need to be displayed.


23. Scenario 3 – User Views a Baseline Image

Suppose the baseline image is stored in Artifactory.

The Frontend requests access:

Frontend
↓
Backend

The Backend:

1. Authenticates user
2. Checks authorization
3. Finds image metadata
4. Determines storage location
5. Generates/obtains temporary access URL

Then:

Backend
↓
Frontend

returns the temporary URL.

The Frontend then:

Frontend
↓
HTTPS
↓
Artifactory

downloads the image.


24. Scenario 4 – User Views Baseline + Checkpoint + Diff

This is especially important for PixelSense.

Suppose the comparison page needs:

Baseline
Checkpoint
Diff

The browser may request access for each image.

Conceptually:

Frontend
│
├── Request baseline access
│
├── Request checkpoint access
│
└── Request diff access
│
▼
Backend

The Backend authorizes each request.

The Frontend receives temporary URLs:

Baseline URL
Checkpoint URL
Diff URL

Then the browser retrieves:

┌── Baseline ──────► Artifactory
Frontend ────────┼── Checkpoint ─────► Artifactory
└── Diff ───────────► Artifactory

This allows the image data to be retrieved without forcing the Backend to proxy all three images.


25. Scenario 5 – New Checkpoint Image Is Uploaded

Suppose an automated test produces a new checkpoint image.

The application receives the image.

The Backend processes the upload.

Client / SDK
↓
Backend
↓
Image processing
↓
Artifactory

The Backend uploads the binary image to Artifactory.

At the same time, MySQL can store metadata such as:

Checkpoint ID
Test Run ID
Image ID
Storage path/reference
SHA-256
Timestamp
Status

So the architecture separates:

Metadata
↓
MySQL

from:

Binary image
↓
Artifactory

26. Scenario 6 – Comparison Result Is Created

Suppose PixelSense compares:

Baseline
vs
Checkpoint

The comparison engine produces a result.

The system may maintain:

Comparison
├── Baseline reference
├── Checkpoint reference
├── Difference metadata
├── Status
└── Diff image reference

MySQL stores the structured information.

Artifactory stores the large binary image.

Therefore:

MySQL
│
└── "Where is the image?"
│
▼
Artifactory
│
└── Actual image

27. Scenario 7 – Redis Is Used During Authentication

Suppose a user logs in.

Browser
↓
Frontend
↓
Backend

The Backend validates the user's credentials.

Depending on the authentication design, Redis may be used to store or validate temporary token/session information.

For example:

Backend
│
│ Redis lookup
▼
Redis
│
│ Token/session state
▼
Backend

The Backend then returns the appropriate authentication response to the Frontend.

The important point is:

Redis supports the Backend; it is not a frontend-facing application service.


28. Scenario 8 – Redis Is Unavailable

Consider a failure scenario.

Frontend
↓
Backend
↓
Redis
X
Unavailable

The Backend may be unable to perform operations that depend on Redis.

But MySQL and Artifactory may still be operational.

This illustrates an important property of distributed architecture:

Each dependency can have an independent availability state.

The whole application therefore needs appropriate error handling and observability.


29. Scenario 9 – MySQL Is Unavailable

Consider:

Frontend
↓
Backend
↓
MySQL
X
Unavailable

The Backend cannot retrieve persistent application information that requires MySQL.

The Frontend may receive an error such as:

Unable to retrieve test results

Artifactory itself may still be available.

Again, this demonstrates that:

Distributed component
≠
Distributed failure-free system

Every communication dependency must be handled properly.


30. Scenario 10 – Artifactory Is Unavailable

Suppose:

Frontend
↓
Backend

works correctly, but:

Artifactory
X
Unavailable

The user may still be able to:

  • Log in
  • Navigate
  • Retrieve metadata
  • View some database-backed information

But image loading may fail.

For example:

Baseline image
↓
Unable to load

Checkpoint image
↓
Unable to load

The application should communicate this clearly instead of treating the entire Backend as unavailable.


31. Scenario 11 – Signed URL Has Expired

Suppose the Frontend tries to use an expired signed URL.

Frontend
│
│ expired URL
▼
Artifactory
│
▼
Access denied

The Frontend should not simply keep retrying the same URL.

A better flow is:

Expired URL
↓
Request new access URL
↓
Backend
↓
Generate new short-lived URL
↓
Frontend
↓
Artifactory

This provides controlled access to the image.


32. Why the Backend Does Not Proxy Images

A common alternative architecture is:

Frontend
↓
Backend
↓
Artifactory
↓
Backend
↓
Frontend

This means every image passes through the Backend.

For PixelSense, this can become expensive because visual testing deals with potentially large images.

The preferred pattern is:

Frontend ────────► Backend
│
│ Signed URL
▼
Frontend ─────────────────────► Artifactory

The Backend remains responsible for application-level authorization while Artifactory serves the binary content.


33. Communication Boundaries

The architecture has several security boundaries.

Browser → Frontend​

HTTPS

Browser/Frontend → Backend​

HTTPS / REST

Backend → MySQL​

Database protocol over secure transport where configured

Backend → Redis​

Redis protocol over secure transport where configured

Backend → Artifactory​

HTTPS

Frontend → Artifactory​

HTTPS + short-lived signed URL

The exact ports should be treated as deployment configuration rather than architecture-level constants.


34. Why Ports Should Not Be Hard-Coded in the Architecture

Ports can change between environments.

For example:

Development
↓
Port A

Test
↓
Port B

Production
↓
Port C

Therefore, the architecture should communicate the protocol and purpose, rather than implying that a specific port is permanently required.

Prefer:

JDBC / Secure DB Connection

instead of:

JDBC :3306

and:

Redis Protocol / Secure Connection

instead of:

Redis :6379

The actual values belong in deployment/configuration documentation.


35. Physical Distribution vs Logical Architecture

There are two different views of the system.

Physical view​

Where the components actually run:

Cloud
└── Frontend

On-Prem
└── Backend

Separate Server
└── MySQL

Separate Server
└── Redis

Separate Server
└── Artifactory

Logical view​

How the application works:

Frontend
↓
Backend
├── MySQL
├── Redis
└── Artifactory

Frontend
└── Artifactory
(signed URL image access)

The physical locations may change without fundamentally changing the logical communication architecture.


36. Central Role of the Backend

The Backend is the main orchestration layer.

It sits between the presentation layer and most internal services.

Backend
│
┌──────────────┼──────────────┐
│ │ │
▼ ▼ ▼
MySQL Redis Artifactory

This gives the Backend responsibility for:

  • Business rules
  • Authorization
  • Data access
  • Storage coordination
  • Authentication
  • Token/session management
  • Image access control
  • API contracts

However, the Backend is not necessarily the data path for every payload.

The signed-URL mechanism intentionally allows the Frontend to retrieve image binaries directly from Artifactory.


37. Communication Is API/Protocol-Based

Each component exposes or consumes a specific interface.

CommunicationInterface
Browser → FrontendHTTPS
Frontend → BackendREST API over HTTPS
Backend → MySQLJDBC/database protocol
Backend → RedisRedis protocol
Backend → ArtifactoryHTTPS/API
Frontend → ArtifactoryHTTPS using temporary signed access

This is an important distributed-system principle:

Components communicate through contracts rather than through direct access to each other's internal implementation.


38. What Happens When a User Clicks “Accept”?

Consider a practical PixelSense example.

The user opens a comparison and clicks Accept.

User
↓
React
↓
POST /comparison/accept
↓
Spring Boot
↓
Validate request
↓
Update comparison state
↓
MySQL
↓
Response
↓
React
↓
UI updated

Artifactory does not necessarily need to participate in this operation because the action primarily changes application state.

This demonstrates that not every operation involves every distributed component.


39. What Happens When a User Opens an Image?

Now compare that with opening a baseline image.

User
↓
React
↓
Request image access
↓
Spring Boot
↓
Authorize
↓
Generate signed URL
↓
React
↓
Artifactory
↓
Image
↓
React

Here Artifactory participates directly in the data-delivery path.


40. What Happens When Metadata Is Requested?

For a test result:

Frontend
↓
Backend
↓
MySQL
↓
Backend
↓
Frontend

The image itself may not be involved.

Therefore, the architecture should be understood as multiple communication paths depending on the operation.


41. Communication Flow Summary

The complete architecture can be summarized as:

Application startup​

User
↓
Frontend

Application API communication​

Frontend
↓ HTTPS/REST
Backend

Persistent data​

Backend
↓ secure database connection
MySQL

Cache/session data​

Backend
↓ secure Redis connection
Redis

Image upload​

Backend
↓ HTTPS
Artifactory

Image download​

Backend
↓
Short-lived signed URL
↓
Frontend
↓ HTTPS
Artifactory
↓
Image
↓
Frontend

42. Key Architectural Benefits

Separation of responsibilities​

Each component has a clear responsibility.

Frontend → User interface
Backend → Application logic
MySQL → Persistent data
Redis → Cache/session data
Artifactory → Binary/image storage

Independent deployment​

Each component can be deployed independently.

Network isolation​

Internal services do not need to be directly exposed to users.

Security​

Communication can use HTTPS/TLS, while temporary signed URLs provide controlled access to images.

Efficient image delivery​

Large images can be delivered directly from Artifactory instead of passing through the Backend.

Scalability​

Frontend, Backend, database, cache, and artifact storage can be scaled or optimized independently according to their workloads.


43. Important Architectural Principle

The most important concept to communicate in the documentation is:

PixelSense is not a collection of isolated servers. It is one application distributed across multiple deployment locations. Each component exposes a specific responsibility and communicates with the other required components through defined and secured interfaces.

The architecture does not mean:

Everything talks to everything.

Instead, it means:

Each component communicates only with the
components required to perform its responsibility.

That distinction makes the architecture easier to understand and more secure.


44. One-Page Mental Model

If someone asks:

“How does PixelSense work across different servers?”

The simplest explanation is:

The user accesses the React frontend over HTTPS. The React application communicates with the Spring Boot Backend through REST APIs. The Backend contains the application logic and acts as the primary integration layer. It communicates with MySQL for persistent application data, Redis for cache/session-related information, and Artifactory for image storage. When images need to be displayed, the Backend authorizes access and provides a short-lived signed URL. The browser then downloads the image directly from Artifactory over HTTPS rather than routing the large image payload through the Backend. This allows PixelSense to distribute its components across different cloud, on-premises, and server locations while maintaining clear and secure communication between them.