GithubHelp home page GithubHelp logo

Setup an asset repository about aksw.github.io HOT 4 OPEN

aksw avatar aksw commented on June 3, 2024
Setup an asset repository

from aksw.github.io.

Comments (4)

white-gecko avatar white-gecko commented on June 3, 2024

The repository should have some way to go through the graph and fetch all images (people depictions, project logos, partner logos, …) and serve them under some predictable id (e.g. hash of the iri) in this way we can then retrieve all images via https and from our domain where we can make sure to not track the visitors.

from aksw.github.io.

KonradHoeffner avatar KonradHoeffner commented on June 3, 2024

I would not use the hash of the IRI because if the content of the IRI changes then the hash stays the same.
This is not optimal for caching.
Instead I propose to hash the content.
This enables two very performance critical optimizations:

  1. An ETag response header with a strong ETag, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag.
    This allows transfering 0 bytes of the content, only the request and response headers (response code 304 I think) need to be transfered.
    However there is still the lag from the round trip, which shouldn't matter that much because the page should load in parallel but still even better is to add:
  2. Setting the cache-control header field to "immutable" along with the maximum max-age. This causes the browser cache to never even send a request header, which means that we don't even have the latency from the round trip.

Also this is a perfect way to deal with duplicates and renamings.

See also:

from aksw.github.io.

KonradHoeffner avatar KonradHoeffner commented on June 3, 2024

However the question is if the AKSW website has such heavy traffic and low latency requirements that this is even worth the effort.
Given that a static asset repository introduces more work and another potential failure point, my recommendation would be to first check if that is necessary.
Or do you mean it is legally required?
How many HTTP partner image URIs are there currently?
Would it be less work to just manually save them in a subdirectory?

from aksw.github.io.

white-gecko avatar white-gecko commented on June 3, 2024

My main concern is eg this page: https://aksw.github.io/aksw.org.jekyllrdf/Team where we have images from various sources.

The asset repo would:

  • Keep images even if they are not available
  • provide all images from one host
  • we can add https
  • since the images are referenced with iris in the aksw.org graph I'm looking for a solution where I can just take that IRI and calculate a new url on our asset repo based on the iri alone.

Sure the host would not always be up to date, but we could have some ci job running that updates the files periodically. we could then have an etag based on the git commit id when the file was last updated.

from aksw.github.io.

Related Issues (7)

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.