{"id":22286215,"url":"https://github.com/nehaljwani/nb-rev-proxy","last_synced_at":"2026-04-29T21:03:50.808Z","repository":{"id":148684051,"uuid":"84368892","full_name":"nehaljwani/nb-rev-proxy","owner":"nehaljwani","description":"I small reverse proxy for http://webservices.nextbus.com/service/publicXMLFeed","archived":false,"fork":false,"pushed_at":"2017-03-10T04:04:59.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T20:46:59.946Z","etag":null,"topics":["docker","docker-compose","golang","load-balancer","mysql","proxy","reverse-proxy"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nehaljwani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-03-08T21:42:18.000Z","updated_at":"2017-03-08T22:32:03.000Z","dependencies_parsed_at":"2023-05-28T16:00:35.050Z","dependency_job_id":null,"html_url":"https://github.com/nehaljwani/nb-rev-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nehaljwani/nb-rev-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nehaljwani%2Fnb-rev-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nehaljwani%2Fnb-rev-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nehaljwani%2Fnb-rev-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nehaljwani%2Fnb-rev-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nehaljwani","download_url":"https://codeload.github.com/nehaljwani/nb-rev-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nehaljwani%2Fnb-rev-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","docker-compose","golang","load-balancer","mysql","proxy","reverse-proxy"],"created_at":"2024-12-03T16:55:06.619Z","updated_at":"2026-04-29T21:03:50.792Z","avatar_url":"https://github.com/nehaljwani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NextBus Reverse Proxy Service\r\n\r\nThis is a small application for proxying and caching responses to API calls made to https://webservices.nextbus.com/service/publicXMLFeed\r\n\r\n## Implementation Details\r\n\r\n* Written in Go instead of Python since handling multi processing is much easier in Go.\r\n* Uses the labstack echo web framework, since it provides an easy way to handle api versioning using groups.\r\n* DB and cache updates are goroutines, so that they don't block the user.\r\n* Two types of caching mechanims have been incorporated: Local (go-cache) and Remote (redis). Both are in-memory and the former is _faster_ since it is native and doesn't involve any network overhead. Remote is preferred when the app needs to be horizontally scaled behind a load balancer.\r\n* Request logging and stats collection is being done using middlewares.\r\n* The app requires the db to be up before spawning itself, which is done using the famous _wait-for-it.sh_ script provided by [@vishnubob](https://github.com/vishnubob/)\r\n* Instead of turning off SELinux, the context `svirt_sandbox_file_t` has to be set on the database `datadir`\r\n  \r\n## Assumptions \r\n\r\n* List of endpoints includes the route `/api/v1/stats` too.\r\n* 'Response Time' refers to the time taken to serve any end point (by the proxy app), which also includes the time taken to fetch something from cache, if present.\r\n* Containers are allowed to have access to the docker daemon socket.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnehaljwani%2Fnb-rev-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnehaljwani%2Fnb-rev-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnehaljwani%2Fnb-rev-proxy/lists"}