{"id":27551014,"url":"https://github.com/vincenzomarotta/potholes","last_synced_at":"2026-05-04T11:32:34.026Z","repository":{"id":288161056,"uuid":"964211831","full_name":"vincenzomarotta/PotHoles","owner":"vincenzomarotta","description":"Respository for project assigned during Laboratory of Operating Systems course @ Università di Napoli Federico II.","archived":false,"fork":false,"pushed_at":"2025-04-15T21:05:35.000Z","size":1641,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T21:37:28.991Z","etag":null,"topics":["android","c","client","java","server","threadpool","threads","unix"],"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/vincenzomarotta.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-10T21:28:50.000Z","updated_at":"2025-04-15T21:05:39.000Z","dependencies_parsed_at":"2025-04-15T21:37:32.993Z","dependency_job_id":"59b1f8bb-4635-4fc7-b7aa-898d02c648b6","html_url":"https://github.com/vincenzomarotta/PotHoles","commit_stats":null,"previous_names":["vincenzomarotta/potholes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincenzomarotta%2FPotHoles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincenzomarotta%2FPotHoles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincenzomarotta%2FPotHoles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincenzomarotta%2FPotHoles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vincenzomarotta","download_url":"https://codeload.github.com/vincenzomarotta/PotHoles/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249641874,"owners_count":21305079,"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":["android","c","client","java","server","threadpool","threads","unix"],"created_at":"2025-04-19T07:51:32.500Z","updated_at":"2025-10-16T03:31:42.696Z","avatar_url":"https://github.com/vincenzomarotta.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🚗​ PotHoles\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/9a2f23cb-e8e4-4253-af4e-7f268c8c366b\" width=\"200\" align=\"center\"\u003e\n\u003c/p\u003e\n\n## 🤔​ What is PotHoles? \nPotHoles is a project assigned during Laboratory of Operating Systems course at Università di Napoli Federico II.\nPotHoles is a client-server system designed to manage pothole detection.\nThis project is divided into a client (an Android app) and a server, written in _C_ and running in a UNIX environment.\n### ​📱​ Client\nAs mentioned before, the client is an android app written in Java (as specifically required).\\\nThe user can start a recording session where the app detects potholes using the smartphone’s accelerometer along the y-axis.\\\nIf the accelerometer exceeds a certain threshold, a new pothole is detected.\nThe user can also check whether there are new events (potholes) within a specific range.\n### ​💻​ Server\nThe server is written in C language and was hosted on _Microsoft Azure_ (as specifically required).\\\nA simple communication protocol called **ECM** (_Enhanced Coordinate Messaging Protocol_)Its structure is as follows:\n\u003cp align=\"center\"\u003e HEADER -\u003e PACKET_SIZE -\u003e COMMAND -\u003e OTHER_DATA_ACCORDING_TO_THE_COMMAND \u003c/p\u003e\n\nThe server is a multi-thred where instead of assign a new connection to a new thread, a thread pool has been developed; this choice was made to design something closer to real-world servers, rather than a purely academic solution. \nFor data managment was used a simple databse in **PostegreSQL**.\n\n\nFor more detailed info you can check the [documentation](LSO_2122_Doc.pdf).\n\n## 🚀​ Server Installation\n\nThe server needs to be used in a UNIX enviroment.\\\nTo compile it:\n```bash\n  gcc -Wall -Wextra -g -pthread -o main.run main.c ecmprotocol.c ecmdb.c threadpool.c -I/usr/include/postgresql/ -L/usr/lib/postgresql/14/lib/ -lpq\n```\nTo start the program:\n```bash\n  ./main.run [argument] \u003coption\u003e ...\n```\nwhere the possible arguments are:\n- -t: thread number assigned to the pool (default is 4)\n- -q: queue length for the thread pool (default is 20)\n- -a: threshold value for the accelerometer (default is 10.0)\nAn possible run could be:\n```bash\n  ./main.run -t 4 -q 20 -a 10,0\n```\nor\n```bash\n  ./main.run -t 10 -q 30 -a 5,0\n```\n\n## 🖼️ Screenshots\n\n### 📍 Real-time Pothole Detection  \nIn this screen, you can see a live recording session during which a new pothole has been detected.  \nA red marker appears on the map to indicate danger, making it visible to all users within a certain radius.\n\n![Screenshot - Pothole Detection](https://github.com/user-attachments/assets/5a8759ed-1ae3-42c3-acc7-ae061e7b9d32)\n\n---\n\n### 📋 List of Nearby Potholes  \nThis screen displays a list of potholes detected within the user's proximity, allowing quick and organized access to critical road hazard information.\n\n![Screenshot - Pothole List](https://github.com/user-attachments/assets/38e0e0e6-d8f5-4035-9763-feb46a191f70)\n\n\n\n## ​🧑🏻‍💻​ Authors\nThis project was made in collaboration with:\n- https://github.com/matthyzza\n- https://github.com/emanuele989\n\n## 📫​ Support\nFor any questions feel free to reach me anytime; my contacts are available in my homepage.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincenzomarotta%2Fpotholes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincenzomarotta%2Fpotholes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincenzomarotta%2Fpotholes/lists"}