Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign with FastAPI and a simple event sourced model #167

Draft
wants to merge 50 commits into
base: master
Choose a base branch
from

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