Skip to content

Redesign with FastAPI and a simple event sourced model#167

Draft
kiancm wants to merge 50 commits intocomocheng:masterfrom
kiancm:fastapi
Draft

Redesign with FastAPI and a simple event sourced model#167
kiancm wants to merge 50 commits intocomocheng:masterfrom
kiancm:fastapi

Conversation

@kiancm
Copy link
Contributor

@kiancm kiancm commented Aug 28, 2022

What
This change redesigns the project with the FastAPI framework for significantly faster and simpler iteration. To start, data is structured as a simple collection of denormalized kinetic models, represented by a hierarchy of pydantic types (which are fully JSON-serializable) with application-level field validation.

Why
This design also makes the assumption that most kinetic model data will be ingested in bulk through scripts or perhaps a data pipeline. By storing a log of kinetic models added we can focus on validating kinetic models in isolation and gain the flexibility of a working set of data that we can manipulate into useful views for the API and for analytical purposes.

Next Steps
We will need to think of views and storage technologies that are useful for the API and a read model for the data that is useful for ad-hoc querying that the SQL schema from before was also intended for.

@rwest
Copy link
Member

rwest commented Sep 1, 2022

Looks intriguing. Can you put some explanation in the pull request description?

@kiancm kiancm changed the title Use FastAPI Redesign with FastAPI and a simple event sourced model Dec 26, 2022
@rwest
Copy link
Member

rwest commented Dec 27, 2022

OK... reading about FastAPI I can see some nice reasons to use it. What would we use for the front end UI?

@kiancm
Copy link
Contributor Author

kiancm commented Dec 27, 2022

I think this is a good idea because the front end can rely on the API for presentation, so we can choose any frontend framework we like. Like Django, FastAPI also supports HTML templating, so we can still do that if we want. I think for now I will focus on the API and backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants