Giter Club home page Giter Club logo

faas-reverse-geocoding's Introduction

Golang Reverse GeoCoding

Go Report Card GitHub go.mod Go version GoDoc GitHub release(latest by date) Commits GitHub

Reverse geocoding is used to find places or addresses near a latitude, longitude pair. Picture a map showing building outlines but no labels, then clicking on a building and being shown the name of the business. That is reverse geocoding.

This repository holds a small web service that performs reverse geocoding to determine whether specified geo coordinates has an adress. If it is then the response will contain attributes associated with the matched adress, municipality, county, country, etc.

Deployment

Helm Chart

helm repo add geocode https://saidsef.github.io/faas-reverse-geocoding
helm repo update
helm upgrade --install geocode geocode/reverse-geocoding --namespace geocode --create-namespace

NOTE: API can be accessed via port-forward Service or via Enabling Ingress

Kustomization

kubectl apply -k deployment/

NOTE: API can be accessed via port-forward Service or via updating Ingress

Take it for a test drive:

curl -d '{"lat":"41.40338","lon":"2.17403"}' http://localhost:8080/
from requests import post
data='{"lat":"41.40338","lon":"2.17403"}'
r = post('http://localhost:8080/', data=data)
print(r.text)

Source

Our latest and greatest source of Jenkins can be found on [GitHub]. Fork us!

Contributing

We would ❤️ you to contribute by making a pull request.

Please read the official Contribution Guide for more information on how you can contribute.

faas-reverse-geocoding's People

Contributors

dependabot[bot] avatar saidsef avatar theykk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

faas-reverse-geocoding's Issues

Update golang to v1.19

Upgrade application to golang v1.19 to resolve security warning, application performance and compatibility.

Also, update / upgrade workflows versions.

Increase test coverage

Add test cases for missing long lat and invalid request body.

This should fail if the provided data is incorrect.

Add charts test in ci

Add helm chart test in k8s-test job CI workflow, this should validate both YAML and HELM chart deployment.

geocode app returns 404 on all endpoints

Problem Statement:
The application returns 404 for GET and POST including /metrics endpoints since refactoring the code.

Solution:
Looking through the code it looks there is no handler provided in http.Server

Add soft cache for app

Problem Statement:

Multiple requests can lead to rate limiting from the provider. This will have unintended consequences for other users.

Currently, the application lacks caching capabilities.

Proposed Solution:

The preferred and the most obvious solution is to add a caching layer such as Redis or something equivalent.

That however will require Redis server as a prerequisite to the run the application.

With that in mind, perhaps it might be better to:

  1. Add in application cache
  2. Add optional cache layer such as Redis or equivalent via environment variables

Option 1 is the most obvious and straightforward solution, with option 2 being a longterm preferred solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.