Coder Social home page Coder Social logo

cdp-assignment's Introduction

What Services are in this project ?

Application server

  • Accepts and returns a response according to a specific JSON format
  • Only has 1 API
  • Also do some validation for that request, if not valid request will return an error

Eureka server

  • Acts as a service registry for application server instances
  • Upon booting the application servers will register with the eureka server, so we can retrieve the instances address from the eureka server

Routing server

  • Can only route post request for now
  • Will forward requests to one of the application server instances
  • Runs a periodic task every 60s to update the list of available servers
  • Uses simple round-robin algorithm

How to run

Gradle

//build
export JAVA_HOME=path_to_java_11 && ./gradlew clean build
// run eureka server
./gradlew bootRun eureka_server
// Run application server(s)
PORT=XXX ./gradlew :application_server:bootRun
// Run routing server
./gradlew :routing_server:bootRun

Docker compose

// To be defined, still not figured out all the bugs yet

Some possible improvements

  • Add more tests to cover more cases
  • Add more routing algorithms to routing server so that it can take into request / response time in real time
  • Optimize docker images and fix docker compose related bugs for better containerization experiences

cdp-assignment's People

Contributors

td2106 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.