swimos / transit

Massively real-time city transit streaming application

Home Page:http://transit.swim.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transit

Prerequisites

  • Install JDK 11+.

    • Ensure that your JAVA_HOME environment variable is pointed to your Java installation location.
    • Ensure that your PATH includes $JAVA_HOME.
  • Install Node.js.

    • Confirm that npm was installed during the Node.js installation.

Run

Windows

Install the Windows Subsystem for Linux.

Execute the command ./run.sh from a console pointed to the application's home directory. This will start a Swim server, seeded with the application's logic, on port 9002.

 user@machine:~$ ./run.sh

*nix

Execute the command ./run.sh from a console pointed to the application's home directory. This will start a Swim server, seeded with the application's logic, on port 9002.

 user@machine:~$ ./run.sh

View the UI

Open the following URL on your browser: http://localhost:9001.

Run as a Fabric

Run two Swim instances on your local machine to distribute the applications Web Agents between the two processes.

# Build the UI
server $ ./build.sh

# Start the first fabric node in one terminal window:
server $ ./gradlew run -Dswim.config.resource=server-a.recon

# Start the second fabric node in another terminal window:
server $ ./gradlew run -Dswim.config.resource=server-b.recon

When both processes are up and running, you can point your browser at either http://localhost:9008 (Server A) or http://localhost:9009 (Server B). You will see a live view of all Web Agents, regardless of which server you point your browser at. Swim transparently demultiplexes links opened by external clients, and routes them to the appropriate server in the fabric.

About

Massively real-time city transit streaming application

http://transit.swim.ai

License:Apache License 2.0


Languages

Language:TypeScript 48.4%Language:Java 41.3%Language:HTML 7.0%Language:JavaScript 2.5%Language:Shell 0.6%Language:Dockerfile 0.2%