A tutorial on Spray, Spark and AngularJS
This is an application for viewing train routes between two stations in India.
The application comprises of three main layers
- Processing the data - Apache Spark
- Serving the data through a REST API - Spray.io
- Consuming the data through a frontend - AngularJS
- Scala
- Javascript
- HTML
- REST API concepts
[Optional]
- Graph algorithms
- Apache Spark
- Actor model for concurrency
- SQL
npm install -g bower
From /src/main/resources/app
, run bower install
to fetch dependent javascripts and css files
You can then start the server
$ sbt
# From sbt shell
>>> clean
>>> compile
>>> run
# Alternatively
$ sbt clean compile run
You should see the server running at http://localhost:8000 from browser
Endpoint - http://localhost:8000/v1/spark
/train - List of trains
/train/:id - Train info
/station - List of stations
/station/:id - Station info
/calculate/train?depart=CODE&arrive=CODE - List of trains between two station codes
/calculate/station?depart=CODE&arrive=CODE - List of stops between two station codes
This project barely scratches the surface of the world of application development and is meant to help familiarize beginners by providing a foundation upon which one could work on their own idea.
Have fun hacking away.