Skip to content

A middleware project allowing the user to find their way using the bikes api offered by JCDecaux though REST, SOAP and ActiveMQ

Notifications You must be signed in to change notification settings

luvluvdt3/LetsGoBiking

Repository files navigation

LetsGoBiking

The objective of this project is to create all the parts of an application that would allow the user to find their way from any location to any other location by using the bikes offered by JCDecaux.

Demo

Light Client:

LightClient.mp4

Heavy Client:

HeavyClient.mp4

This repository contains:

1) A Proxy Server, which uses the JCDecaux API and provides the following functionality:

  • Getting information about which Contracts (cities) have bike stations and which do not.
  • Finding the nearest Station to the provided Location with free bikes or available stands.
  • Caching received information inside the generic cache using System.Runtime.Caching with the following policies:
    • ObjectCache.InfiniteAbsoluteExpiration for Contracts.
    • 3 minutes for Stations.
  • Sending a request to determine if the provided station still has bikes or stands, and if not, sending another nearest one.

2) A Routing Server to compute the routing and return the results to the clients. This server is a WCF server, receiving requests in both REST and SOAP. This server has multiple jobs:

  • Calling OpenStreetMap to get information about the provided geo data (city name).
  • Checking if the current location has Stations with bikes within a maximum of 3 hours of walking.
  • Checking if the destination location has Stations with stands available within a maximum of 3 hours of walking.
  • Computing the routing and returning the result to the Client. There are 4 points: Start location -> Nearest station with available bike -> Closest station to the destination with available bike parking -> Destination
  • Sending the full route in parts in the Message queue. The parts are: Start location -> Nearest station with available bike -> Closest station to the destination with available bike parking -> Destination And returning the name of the created (or found) queue name in which the response has been sent. Each time the Client sends the request, the server is checking if the station's informations is still up to date and if not -> rebuild the route and rolls back to the previous step.

3) A Heavy Client that communicates with the server through SOAP and ActiveMQ

  • Version 1: (App.java)

    • Getting name of starting point and destination from the client then give them up to 5 options to choose from
    • Once the starting point and destination is defined, Heavy Client communicates with the server through SOAP to get the routes then show it step-by-step to the client with the help of map visualisation thanks to the library jxmapviewer2
  • Version 2: (Main.java)

    • Do the same thing as version 1 but instead of using ActiveMQ to communicates with the server instead of SOAP. When each parts of the routes finishes, send another request to server to update the new steps. It then gets the new steps from ActiveMQ and continues to show it to the user.

4) A Light Client, a web project made with React.js, communicates with the server through REST requests.

  • Getting the starting point and destination by entering an address / use the user's current location / click on the map
  • Then communicating with RoutingServer though REST API to get way to go from starting point to the destination
  • Show the way to the client, together with information of each step (duration, distance, type of movement, type of movement) and extensional information (estimated arrival time, kms left to the destination, number of rental bikes in nearest station and number of available stands in destination station, together with Google Map link of each)

Authors

Group: SI4 FISA

How to launch

Warning You have to have the administrator right to launch the servers since we are using different ports and URLs between the routing server and the proxy cache server, and it's allowed only with the administrator's right on Windows.

Prerequisites

  • Having Node.js
  • Having JDK 11, 17, or 18.
  • Having ActiveMQ launched at activemq:tcp://localhost:61616.

Steps

  1. Launch the servers. If it's your first time launching, please build the 2 servers first. Then run them with runProxyServer.bat and runRoutingServer.bat.
  2. Launch the Light Client: If it's your first time launching it, please install its dependencies with npmInstallClient.bat. Then run it with runLightClient.bat. You will find it running at http://localhost:3000/.
  3. Launch the Heavy Client: Run it with runHeavyClient.bat.

About

A middleware project allowing the user to find their way using the bikes api offered by JCDecaux though REST, SOAP and ActiveMQ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published