Git Product home page Git Product logo

goeurotest's Introduction

##GoEuro Assignment The assignment is a command line program. Based on the argument passed (CityName), it makes HTTP call to a remote server and writes the output in CSV format. The output is also printed to the STDOUT.

##Structure The program is a simple JAVA Application. I have resisted using Spring as in my opinion it would have been an overkill and bloated the executable for not good reason.

The solution is divided into multiple packages:

  1. client - Contains classes related to HTTPClient. ThriftClient, ProtoBuf and other code will go here.
  • Would have used Netflix's Hystrix (for connection pooling), however for a command line program it is not very useful.
  1. exception - Custom exceptions are declared here.
  2. mapper - I have used jackson for serialization and deserialization for json-pojo and csv-pojo
  3. model - All data models go here, in separate packages for json and csv. It is also possible to create one model and build multiple views. Having multiple views on top of a datamodel will save a lot of code in a large project.
  4. service - The interface LocationService gives an idea about the kind of APIs exposed by the service. All the version of LocationService will implement the interface. Each service should return an object with all potential common business logic enclosed.
  • It contains an abstract class "Service", which contains the common features of all service we will possibly integrate. In a micro service architecture, it becomes difficult to manage and debug and pin-point a fault. Basic sanity and hygiene practices will go here so that it is inherited by every service.
  1. Configuration - Configuration management of the application.

##Execution

Since it a maven project ###BUILD mvn clean install

###TEST mvn test

###RUN java -jar goeuro.jar <CITY> java -jar goeuro.jar Berlin

goeurotest's People

Contributors

vermapratyush avatar

Watchers

 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.