Achieve 3 Advanced Examples

This archive contains six complete demonstrations of Achieve 3: MySQL, WebSockets and Rooms, Node clustering, XML/SAX streaming, distributed computing, and SOAP services.

You do not need an existing Achieve installation or an adjacent development checkout. npm install installs Achieve and the supporting packages used by the examples.

Requirements

Extract and install

  1. Choose an ordinary location and extract the ZIP file there.
  2. Extraction creates one directory named achieve_examples.
  3. Open a terminal in that directory.
  4. Install the dependencies and start the default server:
npm install
npm start

Open http://localhost:8989/ in a browser. The landing page links to the examples available through the default server, including XML/SAX streaming and the confirmation servlet.

The nested application/ directory is the Achieve application space. Startup files, package metadata, installed packages, and this guide remain outside the HTTP-visible application space.

Specialized demonstrations

Stop the current server before starting another demonstration that uses the same port. Press Ctrl+C in the terminal to stop a server.

DemonstrationCommandPortsExtra requirement
WebSockets and Roomsnpm run start:websockets8989None
Node clusteringnpm run start:cluster8989 and 8990None
Distributed computingnpm run start:distributed8989 and 8990None
SOAP servicesnpm run start:soap8989 and 8990None

XML/SAX streaming and the confirmation servlet run with the default npm start command.

Optional MySQL setup

The MySQL demonstration requires a reachable MySQL server. The rest of the distribution does not require MySQL.

In phpMyAdmin, use the Import tab to import application/advanced/mysql/setup.sql. The SQL file is imported, not executed as a program. It creates the achieve_demo database and its users table. Then replace the placeholder user name and password in both servlets under application/advanced/mysql/servlets/. Run npm start and open or refresh the MySQL demonstration from the landing page.

The credentials and login logic are deliberately simple demonstration code; they are not production authentication guidance. Do not commit or share real credentials.

Troubleshooting

Cluster and distributed launchers create child processes. Allow shutdown to finish before starting the next example.

Achieve documentation

For tutorials and the complete API Reference, see the Achieve 3 documentation.