Giter Site home page Giter Site logo

vehicle_locator's Introduction

vehicle_locator

Vehicle Locator Application Assets

This repo contains modules for Vehicle Locator application template for a customer workshop

vehicle-location-client houses the consumer end of the application

vehicle-location-service houses the server piece which houses the smarts to track vehicle locations using GPS and incoming sensor data

service-registry houses the eureka server piece which keeps the registry of variuous modules

config-server retains all the configuration pieces

  1. Create Service Registry in Spring Cloud Services on PCF
    cf create-service p-service-registry standard vehicle-service-registry

  2. Create Circuit Breaker Dashboard also in SCS on PCF
    cf create-service p-circuit-breaker-dashboard standard vehicle-circuit-breaker

  3. First, demonstrate the Spring Cloud Contracts piece by going to vehicle-location-service and demoing the groovy contract templates.
    Use mvn clean package to create tests and stubs, and then mvn install to install the maven repository for consumer testing

  4. Then, change over to vehicle-location-client and run the stubbed out Wiremock service functionality to test consumer in isolation. Once, the consumer piece is finished, make sure to uncomment the following pieces to run in full-online mode (i.e. location service is running and accessible)

In pom.xml

<dependency>
        <groupId>io.pivotal.spring.cloud</groupId>
        <artifactId>spring-cloud-services-starter-circuit-breaker</artifactId>
</dependency>

In VehicleClientController.java

@HystrixCommand(fallbackMethod = "getDefaultVehicleDetails")
public Vehicle getDetails(@RequestParam(name = "vehicle") String vehicle) {

UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://vehicle-location-service/locate");

In VehicleLocationClientApplication.java

@LoadBalanced

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.