Friendly in development. Fast in production. Just build your apps. Let Achieve do the rest.

← Back to main examples index
Use the tabs to inspect the code behind this demonstration.

Distributed Computing

SCENARIO: Your application has a processing job that you want to offload from the computer serving the main application.

Server A relays the SVG to a second Achieve application. Server B processes the SVG, removing dots outside the circle, and streams the result back through Server A.

Browser → Server A → Server B → Server A → Browser

For convenience, both independent servers run on the same computer: Server A on port 8989 and Server B on port 8990. In a real distributed system, Server B could run on another computer reachable over the network. Server A remains involved as an I/O relay, but does not parse or filter the SVG.

From the extracted distribution, run npm run start:distributed. The command starts both independent Achieve servers. Open http://localhost:8989/advanced/distributed/. Refresh this page after starting the servers.

Loading and processing the SVG…
Original
Original field of colored dots
Processed by worker
Dots retained inside the circle by the worker server