Separated scheme loading from main thread.
Open
Nobody has claimed this yet.
status:under discussion
- Dominant language
- PHP
- Stars
- 216
- Forks
- 51
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 2
Description
What steps will reproduce the problem?
Schema loading on the main thread is problematic in several ways (like yii2):
- block main thread, increase response delay
- this is particularly problematic as databases do not have an RFC on how long the schema loading response in 1ms, 100ms, 10sec... for example https://github.com/yiisoft/yii2/issues/17444
- not really suitable for event based updates (for example after deploy)
- cache TTL problems
- with large TTL, the change is noticed slowly
- with small TTL, a lot of updates are unnecessary
What is the expected result?
- The schema load can be called at any time, regardless of the main thread
I suggests
The best solution would be to generate the table schema to PHP code (for example one class/table).
- not require cache (no connection and loading delay)
- generation is event-based (for example, after generating the yii3 configuration)
| Q | A |
|---|---|
| Version | 3.0.x-dev |
| PHP version | - |
| Operating system | - |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the current schema-loading path in the db repository and determine how it is invoked; done would mean schema loading can occur independently of the main thread and the proposed generated PHP schema approach is defined and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100