So I have been reading this post Create Phoenix based application without database but with Ecto very interesting what learn from it. I also purchased this book Functional Web Development with Elixir, OTP, and Phoenix, unfortunately its still in beta. I have few questions about some concept that they talk about in the book, but that will be for another post.
Now there are few things that I would like some of you to clarify for me please. The other posted did not really answer some of these questions(or I did I miss the answer?):
If you use Elixir processes as a mean to persist your data (save your data), it is because you are assuming that your system/application will always be running. What are the concept/principles applied if the system/app crashes or needs to be restarted? Pretty much I have users info, some transactions data how to I retrieve them back? (how do I return to my original state before the crash)
What are the questions do I have to answer to know that I do not need a database? Or, how do you gauge that a system/application does not need a database? Since I do not fully understand the power of the processes/memory I do not know how to go about to make the decision to not use a database. (I’m kind off a visual person… I need to be able to form a sort of link to the concept.)
What are my advantages/disadvantages when using a statefull server(I believe this is the term used when not using a database to persist but memory)?
Is it ok to keep sensitive data in memory? Something tells me yes because I think that it would be harder to directly access the memory from outside…?
I don’t think the title is right if anyone has a better suggestion please do say so. I just want specific answer related to not using a database or other means instead of always using a database to build an application. As I’m reading the book, reading posts, and viewing some videos. Its seems to me that Phoenix is trying to refrain developers from automatically modelling their system or app based on a database but to think more of what is actually needed. The problem for me is that I lack of knowledge in both areas(memory vs database) i’m not sure on how to make these decision.
Can anyone help? Thanks in advance.