|
| 1 | +1. Pipeline Choice |
| 2 | +------------------ |
| 3 | + |
| 4 | +Status |
| 5 | +------ |
| 6 | + |
| 7 | +Accepted |
| 8 | + |
| 9 | +Context |
| 10 | +------- |
| 11 | + |
| 12 | +While migrating the analytics pipeline to a new technology, we'd like a toggle which: |
| 13 | + |
| 14 | +- Lets particular users in edX and maybe selected partner organizations see new data |
| 15 | + for validation. |
| 16 | +- Is fast for us to flip back and forth to look at new vs. old, ideally without leaving |
| 17 | + the client dashboard. |
| 18 | + |
| 19 | +We also need to make a decision on how to store the new data. In any case, this should |
| 20 | +involve a duplicate store to compare the old and new data. |
| 21 | + |
| 22 | +Store Options |
| 23 | +------------- |
| 24 | + |
| 25 | +**New tables in original store** |
| 26 | + |
| 27 | +- Least amount of configuration needed. |
| 28 | +- Duplicate tables in the same store may get messy. (IE CourseActivity vs V1CourseActivity?) |
| 29 | + |
| 30 | +**Separate store in the same instance** |
| 31 | + |
| 32 | +- Allows for complete duplication with the same table names. |
| 33 | +- Cleaner separation of data. |
| 34 | + |
| 35 | +API Options |
| 36 | +----------- |
| 37 | + |
| 38 | +**New V1 API** |
| 39 | + |
| 40 | +- Cleaner separation, but there will be duplication of code. |
| 41 | +- Easier for us to maintain the original API for Edge and Open edX. (and deprecate later, |
| 42 | + if needed) |
| 43 | +- Simple to switch between; we can implement a check on the client dashboard to determine |
| 44 | + which base URL to use. |
| 45 | + |
| 46 | +**Alter the existing API** |
| 47 | + |
| 48 | +- Less code duplication. |
| 49 | +- The check for which data to use will have to be passed down from the client to the API. |
| 50 | + |
| 51 | +Decision |
| 52 | +-------- |
| 53 | + |
| 54 | +To house the new data, we will create a separate database in the same MySQL instance. We |
| 55 | +will access this database using a new V1 API, and implement a simple toggle on the client |
| 56 | +dashboard to switch between the two APIs. |
| 57 | + |
| 58 | +This toggle can be controlled by a query string (IE `?new_data=true`), and converted to |
| 59 | +a Django setting once the new API is fully rolled out. |
| 60 | + |
| 61 | +Consequences |
| 62 | +------------ |
| 63 | + |
| 64 | +- We will be maintaining two databases and two APIs until the old API is retired (if at all). |
| 65 | +- We will rely on the client (in our case, |
| 66 | + `edx-analytics-dashboard <https://github.com/edx/edx-analytics-dashboard>`_) in order to |
| 67 | + determine which API to use. |
| 68 | + |
| 69 | +References |
| 70 | +---------- |
| 71 | + |
| 72 | +- `Insights Replumbing <https://openedx.atlassian.net/wiki/spaces/PT/pages/3139764337/Insights+Replumbing>`_ |
0 commit comments