-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: master
Are you sure you want to change the base?
Conversation
now models are: * hashable * comparable * frozen * JSON serializable * collections are frozen sets with constraints (confrozenset)
Looks intriguing. Can you put some explanation in the pull request description? |
OK... reading about FastAPI I can see some nice reasons to use it. What would we use for the front end UI? |
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 |
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.