{"id":13343019,"url":"https://github.com/wermajew/fileanalyzer","last_synced_at":"2025-03-12T04:31:57.864Z","repository":{"id":49268836,"uuid":"245218909","full_name":"wermajew/fileanalyzer","owner":"wermajew","description":"Java microservice that process large XML and returns file details summary","archived":false,"fork":false,"pushed_at":"2022-11-16T01:19:28.000Z","size":119,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-30T21:06:02.099Z","etag":null,"topics":["interview-exercise","interview-test","java","rest-api","spring-boot","xml","xml-parsing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wermajew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-05T16:53:17.000Z","updated_at":"2021-06-21T06:47:16.000Z","dependencies_parsed_at":"2023-01-23T16:00:47.544Z","dependency_job_id":null,"html_url":"https://github.com/wermajew/fileanalyzer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wermajew%2Ffileanalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wermajew%2Ffileanalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wermajew%2Ffileanalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wermajew%2Ffileanalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wermajew","download_url":"https://codeload.github.com/wermajew/fileanalyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221270025,"owners_count":16788786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interview-exercise","interview-test","java","rest-api","spring-boot","xml","xml-parsing"],"created_at":"2024-07-29T19:30:36.535Z","updated_at":"2024-10-24T03:30:18.243Z","avatar_url":"https://github.com/wermajew.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Goal:\n\nCreate an API server which can analyse the content of big xml files\nA distributable docker container running the server (Bonus)\n\n## Requirement:\n- Create an API with Spring Boot (Java) and Maven.\n- A POST request should be possible with a url to an XML file (this file can be \u003e 1GB)\n- The response of the post request should hold an overview of the analysation of the XML (see example below, feel free to add more fields).\n- The code should be unit and component tested.\n- The code should pass the maven build and be runnable via cli with max of 512MB of memory.\nAt least a single Java 8 feature should be included.\n\n### Request\n``curl -i -X POST \\\n     -H \"Content-Type:application/json\" \\\n     -d \\\n  '{\n    \"url\": \"{{url}}\"\n  }' \\\n   'http://localhost:8080/analyze/'``\n   \n#### Response:\n``{  \n     \"analyseDate\":\"2016-04-25T14:52:30+00:00\",\n     \"details\" {\n         \"firstPost\":\"2016-01-12T18:45:19.963+00:00\",\n         \"lastPost\":\"2016-03-04T13:30:22.410+00:00\",\n         \"totalPosts\":80,\n         \"totalAcceptedPosts\":7,\n         \"avgScore\":13\n     }\n  }``\n   \n## Run application\nLatest image will be pulled from Docker Hub. \nJust copy docker-compose.yml and run ``docker-compose up -d``\n\n## Ideas for improvements\n- Service has been impemented accordingly to specified contract so solution is synchronous but to prevent requests that take up to several minutes, asynchronous implementation could be used\n- Storing information about processed file to prevent calculating same file (based on some assumtions like: file size, given file from particular uri and size has been processed, returned persisted data about file details)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwermajew%2Ffileanalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwermajew%2Ffileanalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwermajew%2Ffileanalyzer/lists"}