Code Monkey home page Code Monkey logo

daf-cacher's Introduction

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/

daf-cacher's People

Contributors

acherici avatar giux78 avatar ruphy avatar taganaka avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.