Server that caches POI data in the background in order to serve requests as fast as possible. Implemented in Go.
###Goals
- Provide faster access to POI data
- Protect against temporary downtime at the data provider
- Horizontal scalability
- Parsing POI data to a more workable format
- Filtering POI data according to client request parameters
- Use of data provider application token without exposing the token in client source files
###Setup
Implementations of the following interfaces must be provided to
github.com/BoSunesen/pointsofinterest/webapi/initialization.NewWebApiInitializer()
:
github.com/BoSunesen/pointsofinterest/webapi/logging.Logger
github.com/BoSunesen/pointsofinterest/webapi/factories.ContextFactory
github.com/BoSunesen/pointsofinterest/webapi/factories.ClientFactory
github.com/BoSunesen/pointsofinterest/webapi/factories.WorkerFactory
NewWebApiInitializer()
returns a WebApiInitializer which can be used to call
func (i WebApiInitializer) Initialize()
in order to initialize the back-end.
See https://godoc.org/github.com/BoSunesen/pointsofinterest/webapi/logging for more information on the Logger interface and see https://godoc.org/github.com/BoSunesen/pointsofinterest/webapi/factories for more information on the factory interfaces. The project includes a main package that starts the back-end using very simple implementations of the interfaces. See Links for a Google App Engine initialization project.
###Future development
- Remove dependency on
golang.org/x/net/context
- Parse data in the background during cache refresh
- Automatic background cache refresh, to keep the cache fresh during downtime
- More types of POI data
- More filtering options
###My experience with Go This was my first time coding in Go, hopefully it will not be my last :-)
###Links Two other projects are related to this:
- Initialization of the server for Google App Engine: https://github.com/BoSunesen/pointsofinterestlauncher
- A minimal front-end: https://github.com/BoSunesen/FoodTrucks
The hosted application can be found here: