Thanks for going through our interview process and for taking the coding test!
There is an aggregated log file that contains log lines from multiple services. This file is potentially very large (think hundreds of millions of lines). A very small example of this file can be found in the provided logs.txt
.
We would now like to analyze this file, e.g. count log lines for a specific service.
-
Build a console command that parses the file and inserts the data to a database (without using a parsing library). Pick any DB that you are familiar with and decide on a schema. The import should be triggered manually, and it should be able to start where it left off when interrupted.
-
Build a RESTful service that implements the provided
api.yaml
OpenAPI specs.
The service should query the database and provide a single endpoint /count
which returns a count of rows that match the filter criteria.
a) This endpoint accepts a list of filters via GET request and allows zero or more filter parameters. The filters are:
- serviceNames
- statusCode
- startDate
- endDate
b) Endpoint result:
{
"counter": 1
}
Please create a repository on Github, Gitlab or BitBucket with your solution.
Implement the solution in PHP 8.1, using the Symfony framework and document the solution in the README file. You may use the template app provided in the devbox
folder (see included README file for details).
Once you are done with the challenge, please send us the link to the repo.
Wishing you the best.
- For testing purposes take a look at our example log file
logs.txt
. It only contains 20 entries. Your submission will be evaluated with a much larger file (~ hundreds of millions of lines) - If you feel there are ambiguities in the requirements feel free to document them in the README file
- Correctness
- SOLID / DRY / KISS
- Tests
- Agnostic / Reusable Code
- Design patterns
- Documentation of the solution