Skip to content

sivakumargavs/spray-meetup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spray-meetup

A tutorial on Spray, Spark and AngularJS

About the Application

This is an application for viewing train routes between two stations in India.

Flow of the application

The application comprises of three main layers

  1. Processing the data - Apache Spark
  2. Serving the data through a REST API - Spray.io
  3. Consuming the data through a frontend - AngularJS

Requisite knowledge

  • Scala
  • Javascript
  • HTML
  • REST API concepts

[Optional]

  • Graph algorithms
  • Apache Spark
  • Actor model for concurrency
  • SQL

Running the code

Install sbt Install bower

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

API commands

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

Useful links


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.

About

A tutorial on Spray, Spark and AngularJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 75.1%
  • HTML 15.7%
  • JavaScript 9.0%
  • CSS 0.2%