- Provide 2 http endpoints that accepts JSON base64 encoded binary data on both endpoints
- /v1/diff//left and /v1/diff//right
- The provided data needs to be diff-ed and the results shall be available on a third end point
- /v1/diff/
- The results shall provide the following info in JSON format
- If equal return that
- If not of equal size just return that
- If of same size provide insight in where the diffs are, actual diffs are not needed.
- So mainly offsets + length in the data
- Make assumptions in the implementation explicit, choices are good but need to be communicated
- Windows / Linux / MacOs
- Visual Studio Comunity (prefereable 2017/2019) or any other prefered code editor (Vs Code :D)
- Sql Server Express or and SqlServer Db installed elsewhere
- .NET Core 2.2
-
If using a local SqlServer proceed to 2, otherwise remember to change the value from ConnectionStrings under the file
appsettings.json
pointing to your database. -
Make Shure you have conected to your Sql Server Local DB (possibly ServerName: "(LocalDb)\MSSQLLocalDB") and run the scripts that create the database and tables.
Scripts at:
dbScripts/create_db.sql
-
Open a console and run at the root of the project
dotnet run
After that you would be presented with the Swagger Documentation
dotnet test
dotnet test /p:CollectCoverage=true /p:Exclude="[xunit*]*"
- Implementation
- Implement PUT for updating sides
- Implement some kind of Authentication and Authorization either by implementing a token generation or by using an external API Manager and validating a JWT Token
- Technical Debt
- Increase Test Coverage
- Remove Both Left and Right Repository since they don't make sense anymore
- Properly handle http responses
- Create Models and separate the Controler and Repositories
- Properly handle model validation
- Refactor the Comparisson, specialy the insights part wich was poorly implemented