question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change the architecture

See original GitHub issue

Currently: the API server, the cache/database, the assets, and the workers (that generate the data) are running on the same machine and share the same resources, which is the source of various issues:

The architecture I imagine would have these components:

  • API server
  • queue
  • database
  • file storage
  • workers

The API server would:

  • deliver the data (/rows, /splits, /valid, /cache-reports, /cache, /healthcheck): directly querying the database. If not in the database, return an error.
  • serve the assets from the storage
  • command the queue (/webhook, /warm, /refresh) -> add authentication? Send new tasks to the queue

The queue would:

  • manage the tasks sent by the API server
  • launch workers for these tasks
  • add/update/delete the data in the database and the assets in the storage

The database would:

  • store the datasets’ data

The storage would:

  • store the assets (image files for example)

The workers would:

  • compute the data for one dataset

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
severocommented, Oct 27, 2021

Partially done in https://github.com/huggingface/datasets-preview-backend/releases/tag/0.14.0:

  • the cache is now managed by a mongo database,
  • a queue (also in mongo) manages the pending jobs to refresh the cache, and multiple workers (3 at the moment in production) take care of processing them when resources are available
0reactions
severocommented, May 11, 2022

Done

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Interesting Reasons Why Architecture Changes Over Time
From how buildings are used, to environmental changes, to historical impacts, there are many reasons why architecture changes over time.
Read more >
Design for Change: How Architecture Can Adjust to the ...
The Framework's “Design for Change” measure encourages architects to design for future changes in our environment and help people navigate ...
Read more >
How Architecture Has Changed in the Past Two Decades
One of the biggest changes in architecture is coming up with greener design solutions – the notion also known as going green. That...
Read more >
Building resilient architecture using change-driven design
Change is a constant in technology. Learn how to think about designing architecture in a manner that can adapt and change to things...
Read more >
The Architecture of Change: Building a Better World
The Architecture of Change is a collection of articles that demonstrates the power of the human spirit to transform the environments in which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found