Giter Site home page Giter Site logo

playermicroservice's Introduction

Player Microservice

Startup - DB Seed Process (PlayerDB)

img.png

Notes

Assumptions and Limitations

  • The Player CSV should be sanitised further and when loading it there should be better edge case handling
    • fallback to default values
    • keeping a dictionary (in memory or using an api or some sort of external service) of places to handle ambiguous locations
    • conversion of date should be better handled
  • The initial load parallelize the row loading (8 threads at a time)
    • this could be fine-tuned to get the best startup loading time
    • this could be further parallelized between loaders (currently there is only one the PlayerLoader)
  • The API should add a user input validation phase (especially for the get player by id)

Deployment

  • The deployment process should take into consideration that the Player database is probably seeded/loaded already, and have some sort of seeding process that is not related to the startup of this MS
  • Deployment should automatically trigger the unit tests, and the (not implemented yet) Integration and API tests
    • preferably with GitHub action, and connection to a Jenkins job

Structure

  • The project structure is not optimal but enables a shift to a better structure
    • one that will separate the Interfaces from the actual implementations ( I kept them within the same directory)
    • optimally the implementations would be in a separate project and have a reference to the interface declarations
    • then the reference could be done by some-kind of Artifactory, keeping track of versions

Future-proofing

  • Creating more csv loaders is possible, that way there could be multiple .csv files to load to different repositories
  • The DB engine is H2, and in real life (or when we take this to production) this would need to be replaced with a persistent layer (not in mem) such as mysql or postgres
    • it would be simple to replace the engine, with the application properties of this SpringBoot project
  • Monitoring of the usage of this API MS, and next phase would need to consider caching of "popular" players/teams, should the data indicate so.

Summary

Overall - I had fun
I admit I felt a bit rusty,
But that feeling was only fueling me to continue and improve the code
and recall how I love the Spring Framework and the Java Ecosystem.

playermicroservice's People

Contributors

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