Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swimos/transit
Massively real-time city transit streaming application
https://github.com/swimos/transit
actor-model actors concurrency concurrent-programming demo-app distributed-systems map mapbox nextbus public-transportation real-time realtime rest-api stateful streaming-api streaming-data
Last synced: 9 days ago
JSON representation
Massively real-time city transit streaming application
- Host: GitHub
- URL: https://github.com/swimos/transit
- Owner: swimos
- License: apache-2.0
- Created: 2019-02-19T13:22:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T22:12:23.000Z (8 months ago)
- Last Synced: 2024-03-05T23:28:02.691Z (8 months ago)
- Topics: actor-model, actors, concurrency, concurrent-programming, demo-app, distributed-systems, map, mapbox, nextbus, public-transportation, real-time, realtime, rest-api, stateful, streaming-api, streaming-data
- Language: TypeScript
- Homepage: http://transit.swim.ai
- Size: 226 KB
- Stars: 23
- Watchers: 7
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Transit
## Prerequisites
* [Install JDK 11+](https://www.oracle.com/technetwork/java/javase/downloads/index.html).
* Ensure that your `JAVA_HOME` environment variable is pointed to your Java installation location.
* Ensure that your `PATH` includes `$JAVA_HOME`.* [Install Node.js](https://nodejs.org/en/).
* Confirm that [npm](https://www.npmjs.com/get-npm) was installed during the Node.js installation.## Run
### Windows
Install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
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.
```console
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.
```console
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.```sh
# 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.