Giter VIP home page Giter VIP logo

alterview's Introduction

Alterview

  • Receive messages from RabbitMq server
  • Sort messages by message type
  • Update message in the database. Updating should be multithreaded.

Agenda

  1. Project structure
  2. Database schema
  3. WebApi
  4. Import service
  5. Documentation

Installation

  • Prepare Microsoft SQL Database. For example you can name it as LocalTestDatabase.
  • Create two tables: Sports and Events. You can use files from the db folder.
  • Add stored procedure UpsertEvent to the database. See db/dbo.UpsertEvent.sql.
  • Configure appsettings.json for the WebApi and appconfig.json for the importer service.
  • Build the Solution.
  • Run build/ImportService.exe console app or implement your own one.
  • Start WebApi service from build/Alterview.Web.exe.

Project structure

  • /db. Data base helper files
    • dbo.Events.sql. Table creation script. The Events table.
    • dbo.Sports.data.sql. Test data for Sports table
    • dbo.Sports.sql. Table creation script. The Sports table.
    • dbo.UpsertEvent.sql. Stored procedure for insert-or-update (upsert) database action.
  • /src. Project source code
    • Alterview.Core. Core classes and interfaces. Does not depend on any networks, frameworks etc.
    • Alterview.ImportService. Console application that do all the import from RabbitMq and export messages to the database.
    • Alterview.Infrastructure. Business logic of the project components.
    • Alterview.Web. WebApi service based on Kestrel web server.
  • /tests. Unit tests.
  • /build. Build folder for binaries and assemblies.

WebApi

Sports

  • /api/sports. Returns list of the sports with events count linked to sport.
  • /api/sports/{sport-id}/events/date/{date}. Returns list of events by sport-id for the given date. Ex.: /api/sports/149/events/date/2019-12-16.

Events

  • /api/events/{event-id}. Returns event description by event-id.

alterview's People

Contributors

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