A remFREE job is more than a message sent to an endpoint.
It is a durable representation of administrative intent.
That distinction is important because network connections are temporary, endpoints disappear, processes fail, and users close browsers.
The job record gives remFREE a stable source of truth around an operation even when the transport carrying that operation is transient.
Administrative intent becomes state
Consider a technician requesting inventory collection.
The browser does not directly command the endpoint.
Instead, the workflow begins in the remFREE application.
Conceptually:
Technician
|
| HTTPS request
v
Laravel
|
| authorization
| validation
| tenant checks
v
Job record
|
| persistent state
v
Delivery layer
|
v
Connected agent
The database-backed job exists independently of the technician's browser connection.
Closing the browser does not erase the fact that the work was requested.
Why durable jobs matter
Without durable application state, a management system becomes overly dependent on live connections.
For example:
Browser sends command
|
X browser disconnects
|
? what happened?
With a persistent job model:
Browser requests operation
|
v
job created
|
v
browser may disappear
|
v
agent can still execute
|
v
result remains recorded
This allows asynchronous endpoint administration.
Authorization happens before delivery
A transport channel should not decide whether a user is authorized to manage a particular endpoint.
That decision belongs in the application layer.
Before work becomes deliverable, remFREE can evaluate questions such as:
- Is the user authenticated?
- Does the user belong to the tenant?
- Does the device belong to that tenant?
- Does the user's role permit this operation?
- Is the requested action supported?
- Is equivalent work already active?
Only after application policy is satisfied should the operation proceed toward the endpoint.
The gateway is transport, not policy
The Go gateway maintains persistent agent connectivity.
Its role is fundamentally different from Laravel's role.
A useful separation is:
Laravel
policy
authorization
workflow
persistent state
Gateway
connection management
message delivery
real-time transport
Agent
endpoint execution
result generation
This separation prevents the socket layer from becoming the place where product policy lives.
Delivery to an online endpoint
When an endpoint has an active agent connection, remFREE can deliver supported work through the real-time communication path.
The agent receives a job description rather than an unrestricted interactive shell implicitly created by being online.
The operation remains associated with its job identity.
Endpoint execution
The agent interprets the requested job type and dispatches it to the appropriate implementation.
Examples can include:
- inventory collection
- command execution
- script execution
- screenshot capture
- patch operations
- agent update
- remote-session coordination
Some operations are platform-neutral at the server layer but platform-specific on the endpoint.
For example:
screenshot.capture
may be one conceptual operation while Windows and Linux use different providers to perform it.
Result return
The agent sends completion information back to remFREE.
Depending on the operation, this may contain:
- state
- output
- error information
- structured data
- timestamps
- evidence
- version information
The application then persists the result.
Conceptually:
Agent executes
|
v
result message
|
v
gateway
|
v
application
|
v
job state updated
Transport success is not execution success
These states must not be confused.
A job can reach an agent successfully and still fail.
For example:
transport = healthy
execution = failed
Possible endpoint-side failures include:
- insufficient permissions
- unsupported operating system
- missing graphical session
- command error
- update failure
- timeout
- local policy restriction
Conversely, an execution result cannot return normally if the communication channel disappears before delivery.
Duplicate active work
Some workflows should reject duplicate active operations.
This is particularly important for actions such as agent upgrades or patch remediation where launching the same operation repeatedly may make the endpoint less predictable.
Duplicate protection is therefore part of application policy, not merely a UI convenience.
Timeouts
A job timeout represents an operational boundary.
It prevents the platform from treating work as actively executing forever.
However, a timeout does not necessarily mean the endpoint process magically ceased at the exact same instant.
Timeout handling should therefore distinguish:
- application state
- transport state
- endpoint process state
That distinction is important when diagnosing long-running commands.
Idempotence
Where practical, management operations benefit from idempotent behavior.
An idempotent operation can be safely evaluated more than once without creating unintended repeated effects.
Examples of naturally safer patterns include:
- collect current inventory
- query patch state
- report agent version
Operations such as installing software or changing system configuration require more care because repetition may produce additional effects.
Evidence survives the transport
One of the most important architectural principles is this:
The WebSocket connection is temporary. The operational record should not be.
Connections reconnect.
Browsers close.
Machines restart.
The job and its resulting evidence provide continuity across those transient events.