# Katherine Curran - COMPLEX PoC
## Front-end work
| Task | Estimate | Comments |
|-|-|-|
|User input form | 2 days | Based on provided sketch|
|Results tables| 4 days| |
|Building the charts| 8 days | Will need a library to render them|
|Download of results | 4 days |Generation of the data can happen on either the frontend or the backend|
|Help and about pages| 2 days| Including material provided by museum partners|
|General front-end design| 2 days||
|Interaction with the back-end| 1 days||
|Setting automated deployment and CI | 1 days ||
| Total | **24 days** | |
### Risks and considerations:
* How do we convert the form input into something the model can understand?
* Unfamiliarity with the model and its inputs/outputs (will need time to explore the data that arrives on the frontend)
* Charts can be fiddly, need to get used to whichever library we go for
* Use a framework or go for vanilla JS?
* Where to deploy frontend, GH-pages/AWS... which one gives us the least friction (probably GH-pages)?
## Back-end work
| Task | Estimate | Comments |
|-|-|-|
| Develop lightweight API wrap around plastic modelling function | 4 days | Needs some time to gain familiarity with model and what parts of it to expose to front-end|
|Parameter convertor | 1 days |Converting object properties to experimentally derived diffusion parameters|
| Containerise deployment| 1 day | This is necessary for easily launching the back-end and deploying |
| Integration tests | 2 days ||
| AWS wrangling / Terraform | 2 days | Could also be a provider different to AWS if we find a suitable alternative|
| Total | **10 days** | |
### Other considerations
* These estimates can change once we have access to the python version of the model. We'll keep costs the same, but we might need to swap times between tasks or reprioritise.
* A task for results cache-ing can be explored with unused time from other tasks, like the optimisation, if needed.
## Model optimisation (optional - discarded by PI)
Improvements on performance of the python version of the model can be done optionally. It's hard to estimate before seeing the final version, but based on the gPROMS code, we can estimate **5 days**.
## Hosting
We'll aim to always find free solutions for hosting the back-end and front-end, but this might compromise performance. We'd like to reserve **£350** of the budget for 4-years worth of hosting. Here are some orientative prices for Amazon Web Services (AWS) when paying all hosting costs upfront:
| Machine name | vCPUs | GB | 1-year upfront ($) | 3-years upfront ($)|
|-|-|-|-|-|
|T3 micro|2|1|61 | 117|
|T3 small|2|2|122 | 233|
|T3 medium|2|4| 243 |466 |
AWS only offers 1- or 3-year reserve instances. We could then buy a 1-year instance around one year before end of project, and then a 3-year instance right before the end of the project which would support the website until 3 years after end of project. The first machine doesn't need to be very powerful, so we could save some money there. For the 3 years after project, we could have a T3 medium which would be powerful enough. If the micro or small instance prove to be good enough, we could then save some of the hosting costs by buying that one instead. UCL ARC and AWS have a new agreement that saves 19% of total costs, and egress (user access derived costs) costs $0. This means we could cover both these VMs with **£350**.
## Maintenance
Given it is a small website, the maintenance can be pre-costed as **3 days/year** for the duration of the planned life of the website beyond end of project. Assuming 3 years, the estimate would need adding **9 days** of maintenance.
If we don't need to spend all this time, the research team can repurpose the remainder of the budget into other tasks RSDG can help with (e.g. software development, consulting advice, training...).
## Meetings and administration
We add 10% costing to the total development time to cover time spent at meetings, project management and administration.
## Documentation
Documentation for both developers and users is included in the time estimates above.
## Total
| Task | Time estimate | Cost (£)|
|-|-|-|
| Front-end | 24 days | |
| Back-end | 11 days | |
| Model optimisation | 0 days | |
| Hosting | N/A | 350 |
| Maintenance| 9 days | |
| Meetings and admin | 4 days | |
| **Total** | **48 days**| **350** |
Note: Worktribe costings assume 5h/days (6h days minus overheads) whilst we calculate estimates on 6h/days. In order to adapt Worktribe's work spells to our estimate, I have calculated the Worktribe equivalent to 48 days which is 57 days. That work spell and the hosting have been now added to the ARC budget in https://ucl-research.worktribe.com/record.jx?recordid=6465545.