Inspiration
Maxime likes trains and travelling by train. We're all really interested by using data APIs, like the SBB openData.
What it does
By giving a number of users, you can set a common destination with different starting points and times for each user, and our program will find the paths that optimizes the time spent together in the trains, instead of everybody travelling by themselves.
How we built it
The backend is built in Java. That is the parser for the JSON data returned by the SBB API, the backtracking algorithm selects a master route, which is the one that can be the most easily joined by the others, and then tries to merge all the routes as best as possible.
The frontend consists of Java Server Pages and JSTL with expression language. It displays the routes on the Google Maps API and on travel tables indicating for each traveler the trains to take, at what time and from where.
Challenges we ran into
The algorithm, and more specifically, deciding what factors to consider when joining routes (and electing master). The deployment took a lot of work, because we ran into lots of issues with Swisscom Application Cloud deployment platform.
We experience some slowness when searching paths because of the API maximum of 3 requests/second, so we have to wait on it to continue processing.
Accomplishments that we're proud of
Having a working and polished app, in less than 24 hours. The three of us took a long time designing the algorithm together, working as a team in brainstorming it from scratch, that then it was easy and relatively quick to actually implement it.
What we learned
Parsing JSON, staying focused enough all night long (proof: the gradual degradation of our commit messages).
We learned about new technologies in deployment as well.
What's next for TripHub
An Android app perhaps ¯\_(ツ)_/¯
Adding data for long distance trips (planes and other countries transportation)
Demo
You can try our project on the Swisscom Application Cloud or on an EC2 instance on AWS
Log in or sign up for Devpost to join the conversation.