In the lecture on Data Flow, Mattias stressed on the question about what will happen to the current data flow when the files on Github is updated. Did anyone give a thought about it? Thanks in advance.
This is definitely something worth thinking about as a learning exercise. Let’s walk through part of the process
Now, let’s assume we’re doing this lab, and someone from ACG (usually Mattias, being both super nice and diligent) updated the file on the GitHub repository. What would happen? Would the file automatically update on your Cloud Persistent Storage? Would the Cloud Shell execute something to automatically update the file? Would it need a manual update?
So, here we find a gap in our knowledge. "How does Git work, and how would it handle this sort of thing?". Okay, so we need to find out more about Git. This would lead to some Google research, reading the documentation about Git, and maybe watching some videos about it (like our Hands-on Labs on Developer Tools, which includes some videos on Git). From this, we’d build our understanding.
Let’s fast forward through the research in this case… insert timelapse of google searches and reading books here
From our research, we find out that when we’re downloading our copy of the code from GitHub, we’re using a feature referred to as "cloning". By cloning the repository, we have a copy of it on our Cloud Shell. From our research, we find out that cloning is something that doesn’t happen automatically (without special tools, config, etc.). To get a new copy of the data, we would have to run the clone command again.
So, if Mattias updated the repository, it initially wouldn’t make any difference to our files. If we ran
git clone again, it would download the latest copies of the files from GitHub, to your Persistent Disk.
But this raises other questions. What if we needed it to update automatically? What would happen if we made changes to our local copy of the files before we clone the new copy? Could it be configured that any time a new version of the file is downloaded, that Node would restart with the new version automatically? We would go through the same process. Build the mental model, identify the gaps in our knowledge, and research to fill those gaps.
Hope this helps a little bit!