Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.
/ daf-cacher Public archive

A microservice to cache generics plots. Warning: this repo is deprecated.

License

Notifications You must be signed in to change notification settings

italia/daf-cacher

Repository files navigation

daf-cacher

Join the #daf-cacher channel Get invited

A microservice to cache DAF plots

This microservice is used by daf-dataportal, iterates over the various plots, takes a screenshot, and caches them.

Build status

Build Status

Architecture

daf cache architecture diagram

Features

  • Easy to scale thanks to producer/consumer architecture backed by redis
  • It generates for each plot a customizable set of different thumbs size
  • Embedding cached image in the page is easy as
<img src="//proxy/plot/:plot_public_id/:geometry">

Es:

<img src="//proxy/plot/cb638004-661c-4c11-802c-1fc1e2312577/356x280">
  • New public plots are discovered and cached automatically

Components

  • API

It is used to serve cached images to the client

  • Seeder

A recurring task would go through each available public plot by pinging DAF API and it will enqueue a new caching job

  • Worker

Responsible to perform screenshot and thumbs, consuming jobs enqueued by the Seeder

How to run locally with docker compose:

$ mvn clean dependency:copy-dependencies  package -Dmaven.test.skip=true
  • Build the container with:
$ docker build -t italia/daf-metabase-cacher .

Run with:

$ docker-compose up

Once the service is up, a POC will be available at http://localhost:4567/

About

A microservice to cache generics plots. Warning: this repo is deprecated.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •