Giter Site home page Giter Site logo

stscoundrel / dictionary-revalidator Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 163 KB

Kotlin / Spring Boot API for triggering ISR revalidations in online dictionaries

Home Page: https://dictionary-revalidator.onrender.com/health/

License: MIT License

Kotlin 98.50% Dockerfile 1.50%
isr kotlin revalidation spring spring-boot h2-database

dictionary-revalidator's People

Contributors

dependabot[bot] avatar stscoundrel avatar

Watchers

 avatar  avatar

dictionary-revalidator's Issues

Support custom batch sizes

Currently batch sizes are defined per dictionary. While fine for most cases, changing batch sizes requires code change & redeploy of API.

Lets allow override in controller endpoint. like optional batchSize=200, which would then be fed to the revalidate method. Should still default to original config values when not provided.

Decrease batch sizes (again)

Something seems to have changed in Vercel, as more and more batches are getting timeout. Past baches of up to 250 used to be matter of few seconds, now can take more than 10 (timeout).

As this is not exactly time critical, decrease the batch sizes even further. For example, 100 seems to work fine for Old Swedish.

Revalidator batch size: set per dictionary

Currently uses same 250 entries as batch size for all dictionaries. However, the time it takes to revalidate the entries can vary quite a bit based on how large the dataset to be processed is. For example, Old Icelandic dictionary is quite fast and has few & coincise entries, whereas Old Swedish dictionary is both larger and generally has larger entries.

Add batch size to the per dictionary setup. Preliminary values could be:

Old Norse: 250
Old Icelandic: 300
Old Swedish: 200
Old Norwegian 200

Test cases

The script does its thing, but might as well add simple test cases

Add number of times to retry

Currently always runs retries only once. It could be done until there is nothing to retry or certain limit is met.

Add healthcheck endpoint

Render has automatic support for health monitoring. Add simple /health/ endpoint that just returns 200

Support start & endpoint as optional params

Occasionally one would like to run certain subset of entries to validate. For example, should the process have crashed around entry 10 000 of 20 000, one would only want to revalidate entries 10 000 -> 20 000 in the following request, ignoring the first 10 000.

  • Add as optional params to the controller
  • Feed to revalidator. Use if provided.

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.