Coder Social home page Coder Social logo

departuretimes's Introduction

departureTimes

departureTimes is a proof of concept for real-time interaction, in this particular case with the departure times of transports in the area of San Francisco. The application fetches the data using the NextBus API and parses its geolocation information for stops and next departures.

The backend is built on Express.js, Socket.IO and MongoDB. The frontend uses Bootstrap and the client for Socket.IO.

image

NextBus API

It's important to say that the API exposes endpoints in XML format, so for each request to the API a conversion from XML to JSON is being made. Also, have in mind that the stops records are multiplied by 2, once representing the inbound direction and another one for outbound transit.

Geolocation queries

Routes

TODO

  • Geolocation queries in-memory would be a lot faster
  • LRU cache layer in front of the querying layer could improve performance significantly.
  • Add build system for resource concatenation (only if we are thinking in terms of HTTP 1.1 and not RFC 7540) and minification.
  • Add feature for the client to update its geolocation.
  • I couldn't get the fetching of the stops data working in OpenShift. I'm not sure why I keep getting You have requested too much data in the last 20 seconds. Limit is 4000000 bytes. even after applying some throttling, locally it works just fine.

departuretimes's People

Contributors

a0viedo avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.