-
Notifications
You must be signed in to change notification settings - Fork 7
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
Why? What? Who? How? #1
Comments
At present the I realise that I am responsible for making the intro clear and beginner friendly. |
Database Migrations are Always Backward Compatible. |
@Cleop given your knowledge quest in #5 do you feel that you can write the intro to this tutorial If you have any questions, as always, I'm happy to answer/clarify. 😕 |> 🤔 |> 😃 |> 🤓 |> 🚀 |
Why?Append only logs are an attractive approach to database structures because:
Here are some examples of use cases where these characteristics may prove useful:
What?The Phoenix Append Only Log Example is an immutable database structure. It is an alternative to using Ecto's standard "CRUD" which allows overwriting and deleting data without "rollback" or "recoverability". In these instances each update over-writes the state of the record so it's impossible to retrieve it without having to go digging through a backup which is often a multi-day process, cost/time prohibitive or simply unavailable. Instead the Phoenix Append Only Log Example "tables" are only ever extended with new columns. This means that whilst changes can be displayed as you wish to your users, data is never irretrievable or lost to you on the back-end. It is also a time series database meaning that whatever activity occurs, we also know when it occurred, making understanding chronology and how events occurred easy. Who?All developers who have a basic understanding of database storage in web development and want to "level up" their knowledge/skills. Those who want to improve the reliability of the product they are building. Those who want to understand more ("advanced") "distributed" application architecture |
Hi @Cleop thank you for summarising the intro questions/answers. Please create a Pull Request with the bullet points you have written and an intro paragraph. (Thanks!) The Why? section should answer the question: "Why should I care about this?"
Bullet points are good and have their place, keep them! e.g: If you have ever used the "undo" functionality in a program, you will have experienced the power of an Append-only Log. When changes always create a new state (without altering history) we can easily return to the previous state. This is the principal in the Elm Architecture (borrowed by Redux so most React apps) and in Elixir/Haskell too; data is always "transformed" never mutated. This makes it much faster to build reliable/predictable apps because debugging apps is considerably easier when state is always known. If any these terms are unclear to you now, never fear we will be clarifying them below. The main thing to remember is that using an Append-only Log to store your App's data makes it much easier to build the App almost immediately because records are never changed, history is preserved and can easily be referred to i.e. you have built-in debug-ability/traceability. Once you are overcome the initial learning curve, you will see that your Apps become easy to reason about and you "unlock" many other possibilities for useful features and functionality that will delight the users! You will get your work done much faster and more reliably, users will be happier with the UX and Product Owners/Managers will be able to see how data is transformed in the app; easily visualise the usage data and "flow" on analytics charts/graphs in realtime! I'm sure you can re-word/work this to read bettererer. |
#1 Adds why/what/who section to readme
Oops. I closed the issue but still has un-finished items in the checklist...! (derp!) 😕 |
…ts that answer critical questions in less than 7 seconds see: #1 (comment)
Why?
Having an append-only log is incredibly useful in way more situations than most people realise.
Anywhere you would need accountability in data is an excellent candidate for immutability.
but that edit/revision history should be transparent not "message edited" (with no visibility of what changed) and if a person deletes the a message they should have to provide a comment indicating why they are "breaking" the chain. (more on this later).
When a system/db does not have (field/record level) "version control" each update over-writes the state of the record so it's impossible to retrieve it without having to go digging through a backup which is often a multi-day process, cost/time prohibitive or simply unavailable.
We propose that all apps should be built with an Append Only Log at the core by default.
This is not a "new" idea. Several large companies have used the "Lambda" or "Kappa" architecture in production with superb results for reliability and scalability.
see: http://milinda.pathirage.org/kappa-architecture.com
What?
Instead of using
Ecto
's standard "CRUD" which allows overwriting and deleting data without "rollback" or "recoverability", we propose writing a thin "proxy" layer between the application code and the PostgreSQL databaseWho?
All developers who have basic understanding of web development where data is stored in a DB
and want to "level up" their knowledge/skills and the reliability of the product they are building
with a view to understanding more ("advanced") "distributed" application architecture
including the ability to (optionally/incrementally) use IPFS and Blockchain.
How?
The purpose of this tutorial is to:
just "stock" PostgreSQL as downloaded or available through a DB-as-a-service provider. e.g. Heroku.
Open Questions:
delete
data (mark an item as deleted) without "destroying" the data.Similar to: (please use these a reference when writing the doc(s))
The text was updated successfully, but these errors were encountered: