{"id":13337937,"url":"https://github.com/mungujn/weather-server","last_synced_at":"2025-03-11T08:32:03.200Z","repository":{"id":144347474,"uuid":"160047313","full_name":"mungujn/weather-server","owner":"mungujn","description":"A weather app backend built using go, gRPC, Redis and docker","archived":false,"fork":false,"pushed_at":"2022-01-12T06:13:44.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-23T20:11:19.475Z","etag":null,"topics":["docker","docker-compose","go","grpc","grpc-go","redis","tls"],"latest_commit_sha":null,"homepage":"","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/mungujn.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":"2018-12-02T12:56:54.000Z","updated_at":"2024-02-27T21:29:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf6cc2f2-0ff5-4082-919c-b14c4a6eab25","html_url":"https://github.com/mungujn/weather-server","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/mungujn%2Fweather-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mungujn%2Fweather-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mungujn%2Fweather-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mungujn%2Fweather-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mungujn","download_url":"https://codeload.github.com/mungujn/weather-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243000823,"owners_count":20219749,"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":["docker","docker-compose","go","grpc","grpc-go","redis","tls"],"created_at":"2024-07-29T19:15:16.282Z","updated_at":"2025-03-11T08:32:03.188Z","avatar_url":"https://github.com/mungujn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather app backend\r\n\r\n[![Build Status](https://travis-ci.com/mungujn/weather-server.svg?branch=master)](https://travis-ci.com/mungujn/weather-server)\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/mungujn/weather-server)](https://goreportcard.com/report/github.com/mungujn/weather-server)\r\n\r\nBackend for a weather app. App consists of 3 services; an api, a database service and the core weather service.\r\n\r\n## API Service\r\n\r\nThis service exposes an API endpoint that client apps access to retrieve information on the weather in a given location, at a particular time.\r\n\r\n## Weather service\r\n\r\nThis service retrieves weather information from a provider. The server for this service is an RPC server, built using gRPC. It exposes one RPC service, 'GetWeather' for retrieving the weather. The GetWeather operation first uses an RPC client (that connects to the database RPC service) to read weather data cached in the database.\r\nIf the weather request is for a location not in the database, or if the weather data retrieved from the database is too old, the service fetches fresh data from a weather provider (still not yet determined), immediately returns this data to the API service and then uses a separate thread (goroutine) to cache the newly retrieved weather data by making a create RPC call to the database service\r\n\r\n## Redis Database service\r\n\r\nA slightly customised redis server. Based on the alpine redis image with a modified configuration file.\r\n\r\nCommunication between services is encrypted and secured with SSL/TLS.\r\n\r\nRun\r\n\r\n`docker-compose up`\r\n\r\n to bring up all the services\r\n\r\nSupply two SSL key file pairs; \"wapi.crt\", \"wapi.key\" and \"weather.crt\", \"weather.key\" in a docker volume (or bind mount like in my docker-compose.yml file)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmungujn%2Fweather-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmungujn%2Fweather-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmungujn%2Fweather-server/lists"}