|
1 | 1 | # changelog |
2 | 2 |
|
3 | 3 | * **`0.4.3` API overhaul** |
4 | | - * Test the frontend as well |
| 4 | + * Add frontend tests |
| 5 | + * And also some general clean-up and fixes in the process |
| 6 | + * Deprecate caching contexts and related functionality |
| 7 | + * We’re assuming that caching will never be performed *in advance* of an analysis. Instead, we rely on caching during an analysis to speed up any subsequent analyses. |
| 8 | + * Separate internal routing from general Flask routing |
| 9 | + * API routes are organised based on `Dispatcher` |
| 10 | + * `Dispatcher` instances map addresses to `Endpoint` instances |
| 11 | + * Nested `Dispatcher` include the addresses of any child `Dispatcher` instances in their own address space |
| 12 | + * The top-level `Dispatcher` has a flat address space of all endpoints, which it uses to resolve requests |
| 13 | + * The Flask server delegates requests to this top-level `Dispatcher` for addresses starting with `/api/` |
| 14 | + * Expose `Endpoint` instances with own `expose()` method instead of global function |
| 15 | + * Deprecate `RootInstance` |
| 16 | + * Implementation should not care about routing |
| 17 | + * *Note: this means that methods of `BackendInstance` subclass instances nested in `VideoAnalyzer` can no longer be exposed at `Endpoint` instances. Only methods of objects associated with `Dispatcher` instances can be exposed.* |
| 18 | + * More sensible API structure |
| 19 | + * Global top-level API at `api` |
| 20 | + * Group related functionality |
| 21 | + * `api`: general stuff |
| 22 | + * `api.fs`: dealing with files and directories |
| 23 | + * `api.cache`: dealing with the cache |
| 24 | + * `api.db`: dealing with the database |
| 25 | + * `api.va`: dealing with analyzers |
| 26 | + * `api.va.<id>`: dealing with a specific analyzer |
| 27 | + * Open analyzers are handled by new `Dispatcher` instances |
| 28 | + * Analyzer methods should be exposed with the placeholder `Dispatcher` at `api.va.__id__` |
| 29 | + * By themselves, methods exposed in this way can’t be invoked since they don’t have an instance yet |
| 30 | + * New analyzers are opened from `main._VideoAnalyzerManager` and given an `id` |
| 31 | + * Use shorter `id` strings for URL readability |
| 32 | + * Associate newly instantiated `VideoAnalyzer` with a new `Dispatcher` instance at `api.va.<id>` |
| 33 | + * This `Dispatcher`, binds methods exposed in `api.va.__id__` to the `VideoAnalyzer` instance |
| 34 | + * *Now* these methods can be invoked when requested by `/api/va/<id>/<endpoint>` |
| 35 | + * Included in top-level address space at launch to reduce address resolution overhead |
| 36 | + * Mirror API structure in frontend `api.js` |
5 | 37 | * **`0.4.2` CLI overhaul** |
6 | 38 | * Subcommands to divide up the functionality of the library. |
7 | 39 | * Implemented to make accessing backend schemas easier when testing the frontend; instead of starting the whole server, run `sf.py dump <path>`. The server is now a subcommand, `serve`. |
|
0 commit comments