Good morning everyone, welcome back to this course. My name is Prabhu Ramachandran and I think most of you have seen me on the first day of the course. And today I will be teaching you about version control. It looks like the whole day is available for version control but we may not want to spend the entire day on version control. So I may change a few things. So in case we finish version control to satisfaction today, I may actually start off on a little bit of basic python today itself. And then tomorrow you will have latex and next week again you will have python as for the schedule so far.  So anyway good morning to you all. Thank you for joining us this weekend, yet another weekend, a long string of weekends you have. So today's topic as you have seen is version control. I will try to make sure that I teach you some of the theory and then I will show you a live examples of trying to create, use some examples of version control. And I will expect that you also follow suit that is after I do an example I will give you a few minutes that you should experiment, play around and be comfortable with creating a repository and things like that. I think it is a good idea if you have any questions I will pause once I do an example or something like that I will pause at that time ask specifically for questions at that point you can ask me questions. If you have any problems in between you can contact on the chat it will be monitored and if there are any questions that you need attention maybe you can say attention we are not able to hear you or something like that so that I can stop and I get signal to property. So today as I said we look at version control we are going to use a particular tool called mercurial. Hg is short for mercurial as you would imagine. Hg is the symbol for mercurial and mercurial is the name of the tool that we will be using in order to do version control. So if you see the slides now the outline of this session is basically we will have an introduction on version control itself, motivate the need for a version control system and basically give you an idea of why we need to do version control and some idea of how it actually works without getting into the nitty gritty details just the overall perspective of how it works with an analogy and then we will start with creating an actual repository and getting our hands dirty with creating a version control repository, seeding it with some files, learning the actual workflow how do you actually use a version control system effectively this is very important as with anything that you have a tool is only a tool. So even if you have a chisel or a hammer it is only as good as how you use it so it is important that you be able to use that you be able to use these tools well therefore you should understand the workflow the question is you have tools and it is important that you know how to use the tools effectively and that is the crucial part there are millions of tools what you need to know is how to use them effectively so we will teach you some aspects of that and kind of go through some exercises on how best to do these things. An important aspect of much of open-source software is that there is a lot of collaboration and it makes a big difference when you can actually collaborate with other people on your source code these version control tools that we will be teaching you today allow for very easy sharing of code so we will teach you the basic aspects of collaborating with mercury and then conclude with a summary. So the objectives of the session are that first you will understand what version control is and why you need it you will learn how to create and use repositories on a daily basis how to clone existing repositories so clone is exactly what it means it is a clone so if I clone myself you would imagine another Prabhu next to me the same way if you clone a repository you get the entire repository and how to do this from the web we will see how you can view the history of a repository and you will learn how to make changes to a repository and commit them commit is an important technical term that is used in version control systems finally you will learn how to work collaboratively as a team and needless to say how well you are able to do all of this depends on how much you practice and what we will try to do is we try to insist that in future as you do things that you use a version control repository in order to do all of your assignments and things like that. So let us begin with an introduction of what is version control so think of it as a very simple in a simple way essentially what a version control system does is it allows you gives you a system with which you can keep track important word is track of changes that are made to files over time so basically the keywords are track changes made to files over time so as you evolve your code base or your document or whatever it is that you have it will keep track of what the changes are and it will internally keep copies and the details of how it keeps copies is not of any relevance to us right now what is important is that it keeps some reference or copy of all of this information and usually version control is best used with text things that have a notion of a difference if you have just a binary chunk of data it is very difficult to actually produce something that shows an incremental change so we have an image you do not have an incremental change to an image you can usually change the image completely typically so the notion of version control is best applied to things like text files and documents which are not binary so if you use latex which you will be learning soon you can see that you can use all your latex sources can be put into a version control you can also use binary files and version control binary files as well but the way in which a binary file behaves is sufficiently different that binary files are treated differently they are not the same as a text file but regardless the version control tool will allow you to keep track so every time I check in a new version of any file I will be able to go back in time and retrieve the old version if I want so if I want to use my own home boron solution to do this how would I do it well we all have done it many times when we write our own projects or if you look at any student's project typically they will have one directory saying my project and inside that my project they will have a in this case you have an a.out id 1.x id 2.txt pda 1.cpp pda 2.cpp pda 2.1.cp so basically the user every time they make a significant change will copy the file change the name slightly and do it and what a mess so imagine if you have a file you have a project which has 100 files if you change every file like this for every version it is going to be some 300 files already 100 files is difficult to manage the idea is the tool that we build will make it a lot easier for you to cognitively manage all of this so you do not have to deal with 100 files which revision what date for example in this case I have pda 1.cpp and I have pda 2.cpp how do I know which I modified how do I know when I modified it how do I know which other files this pda 1 so supposing I have pda 1 and I have some gda 1 do I keep track is gda 1 link to pda 1 the idea is I want to be able to build the same project which has interdependent links for example at another point in time I cannot do it because I do not know if these files together fit as one or each is in its own independent universe right I may have made pda 1 pda 2 and gda 1 for example and gda 2 but gda 2 may only work with pda 2 but gda 1 may work with both you do not know all of these things so if you have a version control system it manages all of this for you and makes it very clean so again let us recapping the issues name and changes made or not related or linked so any changes you make to a file are not linked you do not know what is the connection between one link are they all at the same time are they at different times there is no time information similarly I cannot quite track the sequence of changes on this I impose a convention saying 1 2 3 4 5 the connection is 1 2 3 4 5 right however I may have made changed pda 1 then made gda 1 and then made pda 2 which means it flows in a different way right pda 1 back I first change pda 1 then I change some id 2 and then I come to pda 2 that is one way or it could be pda 1 pda 2 and then id 2 none of this information is actually tracked the other issue is obvious but it does not scale as I said if you have 100 files it is not possible to manage this so given all this version control allows you to do the following you can track the entire history and evolution of a project so if you look at many open source projects they will even have a web interface where you can go on the web check that project and see what happened at this time what was the situation of the repository and you can actually fetch the entire source code one month back which is very convenient because I can now track the history and evolution of a project it allows us to collaborate effectively why because if I am developing say the same source code I do not have to necessarily be in sync with you every single day supposing I say this is my version I am now building all my changes with respect to a version one month from before today and you are working on the code today then both of us know with reference to what are both of us working so it's easy for us to collaborate I now know oh this change only applies to the file at that time I can now look at my file and say oh this is the actual change he's made and now add this instead if I had it if I didn't have this information I have had no way of figuring out what exactly the changes are unless I looked at every single file and the tool also typically provides a lot of other additional functionality that lets you collaborate very effectively it allows you to merge it allows different people to clone so it becomes a instead of having me to make tar balls every time if I just give a URL someone is able to make a copy of my entire repository immediately another major advantage is very often so you may have seen Firefox I think the latest version is 8 many of us not running 8 many of us are running some 7 or 6 or God knows what but 6 may there is some bug right now how do I go to 6 and then that releases over some 5 years or 2 years 3 years ago how do I now make a fix some new major security fix we have to update a patch to 6 well obviously the people who using version 6 for whatever reason so if I am able to use I have a version control system I can say okay get me the release 6 make a fix to that build that ship that so I now have the ability because I can go back in time to get files at a different point in time make changes and fix software so how does it work underneath the covers obviously every version control system has a different way of doing it but the analogy that you should keep in mind when you are working with the tool is imagine you are playing a game many of you must have played some video game or the other when you play a game you know that many smart good gamers will not play from level 1 to level 10 in one day you don't have that kind of time and even if you do sometimes it's not easy to do so many games will have what's this save save the game so I finish level one at the end before I meet that monster I save the game because I don't want to finish all of level one and then fight the monster so what you do is you play the game you achieve a point at a point that you are happy you make a save the next time you want to start what you do you start from where you save not from 0 correct you're playing a game with 10 levels you don't wear last fellow is very difficult you don't start from level 1 all the way to level 10 so you save just before you finish 10 and then you say okay now I'll fight the monster and I mean right so it's a very sensible way of working the analogy is almost direct whenever you create your source code repository you're happy with it at some particular point of time you tell the version control system saying these are files these are the files this is a working set of files that works for me and you add a message to it and you make what's called a commit when you do this the version control system knows that hey at this point of time these are the set of files so somebody else wants the set of files at this point of time they can get and as it will associate with that particular point of time a bunch of additional metadata like a log message a revision number and any other data you may want to associate so there's something called a change set if you look at hg we look at so it'll give all of that information so you're able to identify exactly the set okay so let's now move on to actually getting something useful done the tool we're using is called mercurial many of you would have heard of various other tools so there are two classes of tools there's the old class and the new classes are not quite there in the slides but I'll just tell you some history and background original version control systems are what are called the classic version control systems examples of these are like CVS concurrent version system or SVN which is subversion there are a variety of others but these are probably probably the most popular this was about five to six maybe even ten years ago but today even five years ago subversion was used a lot and these tools required access to a server in the sense that if I were to use a repository the repository was one repository that was available in a central location and everybody had to change send their changes so if you imagine I am the central repository every one of you is sending me files all of you will need network connectivity to me right however this is a problem for many of us network connectivity is a problem secondly everybody needs access to the server which means the server goes down finished nobody can do any check-ins nobody can actually make any connections to it and therefore they cannot actually commit their changes or they cannot log their changes so after a while of development distributed version control systems came about there were many of them but probably the two most popular three most popular distributed version control systems today are Git which you must have all heard about which is what the Linux kernel uses Mercurial there is also Bazaar and there are a whole host of others like old ones like monotone darks there are a variety of other version control tool distributed version control tools in distributed version control tools the idea is that your everybody's repository is their own there is no central one repository but everybody has their own copy of the entire repository which makes it extremely convenient because now I do not care about a server I can be on an airplane without any internet connection whatsoever and continue to do my work on my laptop it also allows for a lot of very easy development by multiple people spread all over the world who then later collaborate okay so the the modern tools are distributed version controls and HG is one of them Mercurial is one of them so we are using it because it is easy to learn and use we could have also use Git please note that there are some things that may be different if you go to use Git but the essential ideas are the same and if you go and read some little documentation after this course you will have enough initiation to understand oh this is how Git also is supposed to work and it is not very different so basically it is very easy to learn and use as you will see it is lightweight and I will show you how lightweight it is once you install Mercurial it is very it is trivial almost to create a new repository it does not require a server it does not require any special kind of Apache server or it does not require special configuration you have a directory you can use it as a repository essentially it scales very well things like the Linux kernel, Mozilla project all of these large projects actually use specific version control systems today Mercurial itself is written in Python and so it is also extensible in Python it is an interesting feature so how do you install Mercurial I think all of you should have it installed already okay so let us proceed with respect to installation if you are on a Debian or Debian like system I think you have to do sudo apt get install Mercurial Tatois HG is a Windows client so there are a variety of options for installation depending on if you are a red hat machine it will be something different but if you are using the live DVD it should have HG installed already so essentially once you install Mercurial this executable called HG will now be available so let us now try a little example so I am in slash TMP I hope the font is visible is the font okay big enough little bigger okay so I am in slash temp I do not type HG the command works so it says Mercurial distributed SCM HG version HG version tells me this is the distributed sorry this is the mercurial distributed SCM copyright blah blah blah okay and please note it is free software the version I am using is 1.4.3 depending on the version certain features may be slightly different so do not worry about it right now if you have it installed that is all you are going to need right now so now let us begin with creating our first repository what is a repository so a repository is basically the place where all of your files associated with a particular project is exist okay so essentially it is all your project files along with one special directory that is made depending on the version control tool you use and this directory stores all of the changes okay I will show you the details of this the key idea with version control systems is every time you make a check-in or you make a change or you tell the version control system I will tell you these when you make a commit the term commit will come again and again and again essentially I have a set of files and I commit these set of files the version control system understands that these committed files represent the state of this repository at this point in time so think of it as imagine the classroom I have some students if I want to take an instantaneous snapshot of this classroom I take a photograph now I have that photograph saved so I know where every student is sitting one day later students have changed positions I want to record this I take another photograph and I get another picture commit is like that I have kind of like a picture but in this case that is only a picture it is only an analogy but in the version control system I can actually get all the students back at that particular point of time okay I know everybody is there this was their state all of that information is now available to me in the repository so this is what commit means so what happens when you do a commit is the entire repository is kind of snapshot so I know that at this point of time this is the state of the full project it is not just the state of one file one file also is available because I know the full repository the advantage this makes is supposing I am building something like fire forms this one the one file does not exist in isolation it exists along with a bunch of others so I make that change I know that every other file is also linked to that point so it helps me keep track of that so I will repeat a repository is the directory which contains all of your files it will have one special directory typically called .hg which is hidden which will contain all of the changes and whenever you make a commit you are essentially snapshotting the entire repository at that point of time so let us make our first repository so let us create I am going to create a dummy directory my project so now I am inside this my project this project does not have to be necessarily be empty so it could have some dummy file so I will just create one dummy file since you have done bash I will write a little bash script so I have my little hello world bash script I have one file in this hello.sh I am in slash temp slash my project so now how do I create a new repository I simply type hg in it that is it I have now created a repository so where is the repository notice that there is this new directory here called .hg there is hello.sh and there is .hg let us look at what .hg contains some change log requires some store so it has internal data that is none of our business to touch so do not delete the .hg directory do not make changes to it yourself unless you know what you are doing okay so basically this .hg directory is this magic directory that keeps log of all the changes made henceforth to this repository please note that if I go out of this directory there is no repository it is only in my project that this exists and inside my project everything can be tracked I can make sub directories sub sub directories all of that can be taken care of okay so I will repeat .hg space init will create a new repository it creates a .hg directory your working directory and this .hg directory you should not touch okay it is a secret directory so now first thing is we need to learn how to use the tool more effectively there are always man pages but one very useful command is .hg status which will tell us the status of our repository okay and we will be using it a lot so get comfortable using .hg status the second thing that you should learn is how to use .hg's help system so if I say .hg help some command or just .hg help it will show me information if I want to scroll it I pipe it to less it will tell me list of available commands okay so the left hand side column here indicates the command name this is a short description if you look at .hg help command so let us look at add .hg help add pipe to less so it tells me that the option is .hg add some option some files both of which are optional and then it gives me a description of the feature of the command and the various options that are applicable to that command so it says minus i minus x minus n so on and so forth okay so recapping .hg init creates the repository .hg status allows you to see the status of the repository at this time and .hg help gives you help so I will give you a minute okay so you want me to go slow for terminal sessions okay I will do that thank you for your feedback anyway I have repeated myself enough this session so I now want you to experiment I will give you two minutes it is now 10 47 when do we break 11 okay fine so two minutes I will give you by 10 50 I will resume I want you to make to do the things that I have done number one make a directory in slash 10th or anywhere you want where you have right access call it whatever you want this my project that I have used is just the name that I have picked you can use any name you want any valid directory will work okay so there is no sanctity to my project call it anything you want cd into that directory use .hg init type .hg help type .hg status and be comfortable with using all of these commands I will give you two minutes I hope all of you are doing this because very important you actually do it now because at the end of the session there will be 10 different commands and if you have not done the first few you will be stuck in the subsequent ones which is important you know how to do this first okay so we are done with the time I am going to proceed no one has any questions I think I have repeated myself enough that it is clear to everyone anyways the test will reveal whether it has been clear or not so I will repeat again .hg init creates a .hg directory which has your entire repository .hg status will give you status information I will explain the details of the .hg status command shortly .hg help will give you information about the command yes yes you had a question as I said that mercurial is local and we do not need servers to actually connect to repositories yes but we have a unique utility called rcs that is also local and that can be used as we use the mercurial I am sorry can you actually elaborate on the advantages of using mercurial over rcs over rcs are you talking of revision control system the original rcs tool yeah okay rcs can be used as we use mercurial yes well but rcs is file centric it is not repository centric that is also local we do not need a server repository to connect it but rcs is like it is like asking a dinosaur as far as we are concerned rcs does not allow you to serve your files rcs is file centric it is not repository centric so let me explain the question is rcs is also a tool that you can use locally does not require a server it is a very valid point it is a very valid question hg is also local but remember that they are completely different beast if you have used rcs it will actually create the revision file in the same directory with one special file name rcs is file centric which means for every file you will have to do the revisioning yourself for every file which means it only is file centric it is not entire directory or entire project centric hg is project centric i make a commit it reflects the state of the entire repository rcs also typically gets in your way i have used rcs before it is a it is a clunkier tool it is a more old-fashioned tool but it is very convenient we have one single file that you are trying to revision control the other thing with rcs is it does not have all the other nice features that hg offers it is very difficult to collaborate i cannot start a server for hg for rcs trivial well you will have to build a separate server hg comes built in with it there are no models by which i can clone that easily its merge model is non-existent you have to basically use patches and merge it whereas here there is a notion of merges and if you start using git there is the notion of pull request there is a there is a lot more involved with hg and git and the other modern tools that rcs rcs is even worse than cvs basically if you are talking of a serious project people will not even consider using rcs for a project for a single project let alone a distributed version control project so it is basically not even a fair comparison does that answer your question so the dot hg is simply a directory think of it as a magic directory and that you do not have to worry about it contents do not touch the directory do not remove it and do not touch anything inside that that is the directory which contains all of the the revision control information of your entire repository and the configuration a bunch of things are stored in dot hg that you do not have to worry about it so do not worry about it it is just a directory okay are we all clear no I will finish a little more okay so I will just do one more little concept I will just do one more important thing just take five minutes is to discuss status codes and the hg status so notice that if I do hg status it prints out this peculiar line saying question mark hello dot sh what hg is telling us is I do not know anything about this file hello dot sh now instead of this question mark you can have a variety of other codes they are called status codes there is capital M capital A R C exclamation mark question mark and I each of these means something different what you are seeing now is not track it means this hello dot sh hg is not tracking you have not told it to track it hg is not magic it cannot read your mind what it will do is what you tell it to do so you have to tell it hg pay attention to this file then it will start keeping track of it okay once you have told it hey these are my files then it will tell you oh this file was modified oh this file was added oh somebody removed this file okay oh this file has a conflict and you have to manage that conflict see typically means you have to clean up this file it is a mess something happened somebody else made something you made something they are now conflicting you have to fix exclamation mark means that file is missing that file you deleted it it is missing you did not tell me you are going to remove a file if you tell hg saying remove this file he will say okay I will not bother you but if you remove it behind hg is back he will say array this file is gone so hg keeps track of what files are there you have to tell it keep track of these files so until you do that it will say I do not know anything about this file it will give you a question mark okay so for example if I touch another file it says test.sh also I do not know anything about now if I remove test.sh it won't say anything because it doesn't know anything about it won't say oh that file was removed until I actually tell it this file was you take this file add this file it will not bother about that file okay final tag is ignored so you can tell hg ignore all .out like a.out I want ignore all .out files I don't want unnecessarily have it so any question mark question mark so you can tell it to ignore in which case sometimes if you say hg status verbose it will say these files were explicitly ignored and then it will show you okay so basically the status codes are explained here and question mark currently tell us that the file is not added. In the next session we will start looking at how to add files and how to commit files I will do that in the next session there are some questions that I will answer first question is is it always needed to create .hg directory the answer is no when you do hg in it so you should never create .hg yourself when you do hg in it it will create it for you you don't bother about it as I said don't worry about .hg as far as you are concerned it doesn't exist leave it don't think about it okay so .hg will be created when I run .hg in it it will create .hg directory to the current directory that you are added when wherever you did the in it that directory it will add it and that directory is the root inside which all files will be tracked okay so I will repeat myself to end this session .hg in it we motivated the need for a mercurial system showed you how to create a repository how to find the status how to get help technically this is all I should be able to if I teach you this you should be on your own but obviously in the next sessions we will look at more details I also elaborated about status codes explaining to you that question mark when you do hg status means that the file is not being tracked in the next session we will see how to add files how to make changes how to track these changes okay so there is one more question we have to install mercurial due to which we are using hg command if we change the software naturally .hg is a software like any other software it's like your bash or sh which is why I covered installation at first in case you are not paying attention I said very clearly that hg needs to be installed you can install it on a Debian system like this Tata is hg is available on I think windows and linux as well these tools will give you the hg command tool that you can use that we have been using so far so if you are using git obviously the command you will use is not hg it will be git or whatever git installs for you okay but we are using hg for the purposes of this course remember that they will always be differences so do read some documentation before you switch to some other version control just because you know hg doesn't mean you know everything about git there will be some differences some subtle difference but the overall structure the strategy the workflow will be kind of similar be very similar so if you understand one and comfortable using one switching to another is not very hard I will just quickly repeat what we did the first part very quickly the idea is we are creating a repository and this repository will contain all of our files which we want to be properly managed as a result we need to create this repository so the way you do that is to first do hg in it and the hg command is something that should be available you should basically install mercury and the way to install it depends on your platform so we won't get into the details but most of you should have it installed so if you go to the shell and create a directory I have created my project so let me create one more I have created this new folder called junk I cd into the directory called junk here I do hg in it that's all it takes to create an ls minus a reveals an empty directory with a dot hg the next command that we looked at was hg status right now status tells me nothing I created a simple shell script I will copy that shell script now we have hello.sh in this folder now hg status tells us there is some file called hello.sh with a question mark the status code for which we discussed in the subsequent slide saying it is not tracked this file is not tracked the other command that we mentioned was help so hg help will give me a lot of information but if I want to say hg help add it will give me specific information if I want to pipe it through a pager I do hg help add pipe to less repeat that that is the command I am talking about hg help add this will give me information on the add command with all the details so basically when we do hg status it will let us know whether the file is tracked or not tracked in this case the file was not tracked one important thing to note is it is perfectly fine to do rm minus rf junk except your whole directory is gone and your repository is gone you lost everything so that directory where you have your code and the dot hg directory if you delete you have no help your repository is basically gone so but remember that I had two repositories I have my project I do not want the junk anymore so I am going to remove it so basically it is just another directory my project of course is still a repository and it still has the file I just created a the point I was trying to illustrate is it is trivial to create a new repository it does not require anything you just need to do hg in it you can create them you can destroy them it is yours to do as you please with it now obviously if you want to keep it you want to keep it safe it is your responsibility to keep it safe so you want to back it up you tar it up and put it somewhere save it somewhere if better yet would be if you are going to share this on a long term basis and it is an open source project you use any well known site there is something called bit bucket which lets you host hg repositories on the web or you can use code.google.com again they have mercurial hosting that they provide for free for open source project so if you have an open source project you can always use those to host in which case you can even delete your own repository it will still be saved upstream wherever you are hosting okay so this is what we covered I did it at length I have just shortened it when you do hg status remember that the first column gives you a question mark the second column gives you the file I showed an example where I had two files so if I do touch test.sh now it shows me two files that it has no idea about both files are not tracked once I tell the thing about hg is you have to tell it what files you want it to track if you tell it to not track something it is not going to bother about it but if you tell it to modify something sorry if you told it something then it will make sure that it tells you oh this file is modified this file is removed or this file is added so on and so forth it will tell you only when you tell it to track a particular file or if you tell it to ignore a particular file. So our next task is so let me first remove this test.sh was just a sample I am going to remove it say if I do rm test.sh please note that hg is not going to complain if I do hg status it is simply going to say hello.sh is not known because I have not told it about test.sh it is not going to give me warning nothing as far as hg is concerned that file does not exist essentially is all saying so how do we now tell hg about these files so from hg status we know that none of the files are tracked what we need to do is we need to do hg add so let us do that hg add hello.sh so hg add specific filename I hit enter no problem no errors which means it went well and now if I do hg status what do you expect to see you will see question mark has become a which means this file was just added to the repository now however all you have told is there is this now there is this new file which has been added to the repository you have not actually said you have not taken that photograph remember I gave you the analogy if I have a classroom I want to know the state of this class at this time I take a photograph we have not done that yet all the hg knows is that file has been added now I have to tell hg to say I finished adding all my files take a snapshot save it how do we do that what we need to do is we need to say hg commit hg commit if I simply hit return now it will tell me you have not supplied a username for this particular user who is using hg and it says see hg help config so essentially every time I make a commit I have to tell it who I am then it will know so and so made this change the idea is if you are sharing with repositories with other people you know which person has made which change at what time so you need to supply a username so let us see hg help commit changes to the given file given set of files notice that it has a minus u given as the username and the format is as described in the slide you say minus u first name last name email so let us do that hg commit minus u so now it is asking me to use a editor to edit the commit logs I am going to choose vim which is 4 over here I basically have an editor window vim in this case and I can add a log I can say now this is a very silly message normally you will give a more meaningful commit log remember that this commit log will be stored with this change set so you know hey I have done this so if you made a bug fix it is a good idea to describe the bug fix say point it to a url saying okay there is a bug fix here so this patch whatever you want to write it is good to keep your commit logs reasonably informative this does not mean you should write a Ramayana here the idea is you write something small descriptive that gives you a sense of what has happened now you simply save it the lines below this all of these lines will not be added all these hg fellows are just information for us to know that what it says is help message here enter commit message user it is telling me that this is the user who is making the change and here it is saying it is added hello.sh these are also if I added five files those five files will be listed here so that you know what files are being changed is this clear now I save this now if I do hg status it says nothing remember last time when I did hg status it said question mark there is no question mark now it knows that hello.sh is there and the current version of hello.sh is the version that was checked in there is nothing there is no change so hg is saying everything is fine ls it still has hello.sh so if I do sh it gives me hello word so everything is fine now so hg is happy hg status gives us information that everything is fine is this okay so I will repeat what we have done we first did hg status we had one file hello.sh which it said is unpacked and now we said hg add it added that file at which point the status said question mark has become then we committed we said okay I finished adding all my files so imagine I had put one file add it put another file add that third file add that now I have a set of files now I can say hg commit it means hg will now save at this point of time these three were the files that were added to this repository so I did hg commit it gave me an error saying you have not set the username so to fix that I first did hg commit it gave me an error I looked at the help and found that the option is I have to give hg commit minus u this full name correct then it opened an editor inside which I was able to give a message saying something additional files added this fixes some bug whatever message I want to associate with this change with these set of changes from the last time I committed I continue to commit once I do that if I now run hg status it says everything is fine and the file is there so now hg is aware of the file and I have snapshot at the system at this point now I want to see what has all happened in the repository what I can do is I can say hg log let us see what it gives us so it says hg log says change set some funny looking thing tag is some again let us forget about the tag it gives me my username Prabhu Ramachandran Prabhu at posi.in the date that is the time at which that commit last commit was made and the summary and notice that it is only some it is only given me the first line okay so if I did hg log minus v it will give me a verbose log which will tell me the entire log string that I have supplied okay so it says adding out so I made a typo adding our first files this change fixes issue number blah blah blah whatever so whatever I have typed there is now available so one year from now if I come back to this directory if I do log I know that the first commit this is what I did so it is therefore makes sense to have clean log messages meaningful log messages so later on you have to understand what these things are so the first terminology we are learning here is what is this change set so a change set this is a definition so I will repeat exactly what the slide says is an atomic collection of changes to the files between successive commits okay so if I make another commit now the change set basically records all of the set of changes between the previous commit to the current commit okay and it has a number that you see here the first number is the revision number the 0 you see here the second is called a change set id which is not of too much relevance to you so you do not have to remember this too much you can use the revision number for all practical purposes in this case okay the 0 is the important identifier you should keep in mind and as we have seen the log information gives us change set the identifier the user the date and the summary for this particular change set okay now let me do this again let me create another file okay simple file now I have hello.sh and test.sh what should I do now hg status now it says test.sh I do not know anything about so what do we do now we add this file say hg add test.sh now hg status gives us what test.sh what should hg log give me now hg log will list all of the commits not the ads so hg log will still only tell me 0 I will repeat what I did I created a file okay vim test.sh I added the file looked at the status and the log now I have to commit hg commit so I am going to use the previous commit so I can do this hg commit blah blah blah instead of going into an editor if I just have a single line I can always type minus m and give the commit log also in this one line supposing it is just a one line the minus m will allow me to give the commit message in the same that command rather than it open a separate editor however I always prefer using the editor because then I can write a nice log message but if sometimes for a single commit you can just do minus m to go slow okay so let me edit this now it is added the file I will repeat what I did clear why it is not doing this I will repeat exactly what I did I first created this test.sh so I did vim test.sh I created this file then I did hg add test.sh to add the file it got added then I did hg commit minus u blah blah blah minus m some message okay and it was committed now if I do hg status again it shows me nothing means all the files are tracked now if I look at hg log it shows me two things adding out first files and adding test articles is this clear so the first one is one this is the first this is the current latest version this is the original version is this clear so I am repeating myself many times so if you miss something once you will get the hang of it don't worry about if you just generally get the idea don't worry about it so now we have saved two versions of our project okay so there is one small problem every time it is irritating to say hg commit minus u blah blah blah blah and I have to write my full name and I have a long name so it is not very convenient to be able to do this every time I have to keep typing my name my email address so there is a file called in your home directory dot hg rc is a file where we can add our user name permanently okay so let's do that to do this I am going to edit tilde slash dot hg rc okay over here I will say add a UI section so I am saying in the UI section that is the user interface my user name is Prabhu Ramachandran with my email address I made a mistake here okay so create your own file with your own user details now I am closing this file it has this information I will give you a second to write your own give you 10 seconds so you can write your own file okay so I assume you have looked at that carefully enough that you understand what is going on now if I want to make a fresh commit I don't have to supply this minus u every time so what is with this commit what are these commits and how do we utilize these things well every commit is atomic which means it's one unit it's an indivisible thing something that's atomic means it's indivisible I can't break it down any further a commit is one unit of changes okay so atomic changes for every set of changes that you think is one concrete unit you make a fresh commit you typically give a single line summary the first line should be a single line summary remember when you do HG log it only prints the first line it doesn't print the whole line remember okay as an example if you look at HG log so let me since I made the same mistake you should not make the same mistake it should you should not have a space there I unnecessarily indented that's why there was an error it should look like this username is aligned at the left now if you look at the log messages notice on the second line it basically says it has truncated the log message and I had to do log space minus V to get the full message so a good idea is for you to make sure that you have a single line summary and then subsequent lines you have an elaboration if you need an elaboration so if it's a trivial commit you don't have to write more if it requires more detail you supply the detail in the next paragraph okay so you can say the next why the change what does it affect known bugs all of that you can specify in whatever detail you want to do and it's a good idea to have this detail because then you will be able to use that detail later on someone has added as a question about no hgrc file in home directory well you have to add one there is no .hgrc in your home directory but you will have to create one as I did I clearly showed you that you win that file save it and then you create it that file only then will you be able to use you don't have to supply the minus u if not every time you make a commit you will have to do with the minus u so let's make one more edit so let's move on and make a change firstly what is our current status hg status says nothing means everything is fine all the files are intact as against the last version they are all at the latest version there is no problem so now let me edit the file so now let me I don't like this white space and I'll capitalize this and I'll put a punctuation mark at the end this is my new version now notice notice that the file now says the status is clearly saying m you see in the first column clearly indicates that so if you go back to the slides m means modified so what it's saying is the file hello .sh alone has been modified test.sh has not been modified now if I want to save this now I can continue to make changes that I want but if I want to tell hg saying okay I am done record this currents change what should I do if I want to tell hg that this is my current state of directories that I am happy with I have to do commit so I do hg commit notice that in this time it didn't give me any error because I have set the username already and it has filled that out for me so now I can add the summary line okay so now I have given a detailed error message log message saying summary is better hello message details are they were punctuation and case problem is the previous version and now I save quit commit is done hg status empty which means now it is recorded now if I say hg log it tells me that the latest is better hello message previous one is test.sh and the last is the original commit the first commit is adding files that are initial commit so all these three versions are now recorded fully now if I want to add more files I can continue to do that I want to add a directory add a file I can continue to do that very easily with this system with the same strategy you add the file commit add commit you want to remove something we look at that in a short while okay so some questions people are asking if more than one file is in the directory is there any provision to distinguish by name in the log distinguish what by name in the log your commit message applies as a whole to all files there is if you want to distinguish between each file change you have to explicitly only commit those files or add those files okay so for example if you do hg help commit you can say commit either a specified file so if I want to say I do not want to commit all the other changes I want to only commit 3 4 this file hello I do not want to commit test.sh even though there are changes it is modified you say hg commit hello and only hello will be commit so you can do things like that however you cannot distinguish between the files once you make the commit the commit as a whole records changes to all of the files the second question is I typed hg-u your formatting of the string is wrong and it is not hg-u you have to give it as hg some command minus u and I am not sure why you are getting a waiting for the lock on working directory something you must probably have done a previous commit that is broken that is not completed and someone wants me to repeat the win.hgrc okay so I will just cat the file screen this is how the file should look bracket square bracket open ui close square bracket use a name equals use a name and email


I'm Chairman Allison McFarlane, and as many of you know, my background is in earth science. As a geologist, I value the insights that earth science provides from simply understanding why mountains exist to being able to anticipate coming climate changes. As a regulator, I believe the results of research and development in the earth sciences directly apply to the work we do. The earth sciences teach us that the natural world in which we live is full of complex processes, many of which we don't fully understand or even have knowledge of yet. While the untrained eye may see the earth as unchanging, earth scientists know it is dynamic, constantly remaking itself. Our understanding of the dynamic complex earth has a direct impact on the work we do to ensure the safe and effective use of nuclear materials for energy, research and medicine. I fell in love with earth science as an elementary school student and spent most weekends at the local science center where I was introduced to geology. At the beginning of my academic career, I was drawn to the earth sciences because of their real-world applications and eventually became a field geologist for that very reason. I plan to work with the talented earth scientists at the NRC to apply research results and insights to improve the way we regulate. As the body of knowledge surrounding the civil nuclear industry evolves, so must our approach to regulation. The information gained through our work in the earth sciences is paramount to our ability to guarantee a safe nuclear industry.


the technical introductory of technical kind of like advanced talk on GossipServe. There's been a lot of interest in GossipServe. They have around 130 people outside there for this particular talk, right? I don't think everybody will fit in this group if they happen to show up. But yeah, we have a really little time and a lot of ground to cover, so I'm gonna get started. I'm Rahul Pradhani, I'm the techie for the B2B project from Modular Labs. And this is what we're gonna be talking about. In this defined GossipServe. So, GossipServe is a scalable and extensible peer-to-peer gossip protocol. And our agenda for today is, first of all, I wanna make sure that we all have kind of like a common base night to talk about these technical concepts. So, I'm gonna do a very quick introduction to peer-to-peer bops up. Who here is familiar with these concepts? Maybe a five and above in a scale of 10. Fantastic, okay. So, I'm gonna move through this pretty quickly. Then we're gonna talk about what is GossipServe. So, we're gonna talk about how GossipServe operates and what's up next. Because as you'll see, GossipServe is a stepping stone in a rule that includes a normal functionality that's coming in the future.  All right, so let's move on. What is bops up? Bops up is a message oriented communication pattern. This is in stock contrast with stream orientation. So, here we're not interested with bops up. We're normally interested in sending transactional messages and small units that are actually messages and not streams over the wire between a bunch of peers that are not necessarily talking to each other. So, the interaction model of bops up is M to M. This means that N peers are publishing messages about a particular subject and a lot of other peers in the network are interested in consuming messages from that particular subject. This is as I said, in contrast to RBC, I reply with Westworld patterns, which are mostly one to one. Now, bops up communication is asynchronous and decoupled in nature. This means that whatever I send a message as a producer, I have no guarantee, first of all, when who is actually gonna receive that message? Because peers don't have a complete view of the network and a complete view of the subscription state. And it's also asynchronous because there is no time dependency. I have received no explicit confirmation from any peer that they've actually received my message. Processes act as publishers and consumers of messages. And in a peer-to-peer network, this is important because a process can act as both things. And they congregate around topics of interest. Now, bops up is quite popular in enterprise software and if you've heard of products and projects like Apache Ante-MQ or Kafka-Rabbit-MQ, then that's it. But in those contexts, it's usually centralized around brokers in private networks and it's definitely not. These approaches are not suitable for public message partners. So what does decentralized peer-to-peer help? First of all, it's broker-less. It means that we have no central authorities to keep track of subscribers, publishers' topics, it's self-recognating. Whenever we deal with peer-to-peer networks, we have to monitor it, right? And peer-to-peer networks can rotate in presence very rapidly, so there is no global knowledge. There is no single peer that is an authority that has a complete view of the network. And the network behavior actually emerges from small, tiny, local decisions that peers are taking along the way, right? So peer-to-peer Popsil is usually constructed as an overlay network with peers collaborating to ensure message-deliverability, right? And when we say overlay, there's usually an underlay, right? So it's an underlay network that actually makes sure that messages and traffic gets relevant. And usually, algorithms will assume that the underlay is one kind of network. So this means that I can always find a path from A to B and if I can, that's a pathology. So just to set a baseline for terminology, a topic is a subject around which peers congregate and they commit to receive messages. Subscription is the act of expressing interest on a particular topic. Publishing is the act of creating a message and pushing it out to the network. Forwarding is the act of propagating a message to other peers in the topic. And hand-mealed discovery is something I'll talk about in a second. So the disciple properties in peer-to-peer Popsil are reliability, resilience, efficient dissemination, altruism-free routing. This means that only those peers that are actually participating in a particular topic will actually contribute to forwarding that topic and we're not burdening the rest of the peers of the network that are not invested in a particular topic and disseminating that. It has to be scalable across various axes. So we're talking about number of nodes, number of topics, messages, subscriptions, subscribers. All of these are different axes for scalability. It has to be a low overhead for maintenance. As I say, we are relying on peers making local decisions so that messages are clearly routed in the network. And ideally, we'll have the protocol that is simple and easy to understand. So we'll see if we've actually managed to do this for GossipServe. So what is GossipServe? The key elements of GossipServe is that, first of all, it's a scalable and extensible PubServe culture. So GossipServe in itself is not necessarily intended to be a final usage of a peer-to-peer protocol or for peer-to-peer PubServe protocol. It is a protocol on top of which we can overlay different routers to take different decisions. And GossipServe actually provides the primitives to make sure that, first of all, messages are delivered. And second, there's enough gossip metadata circulating on the network so that different and alternative decisions can be taken along the way. It was envisioned and specified initially by a developer called Viso. He's in the LVTB core team. And as I said, it provides a base layer and primitives to build adaptive, self-optimizing routing algorithms capable of repair and rearrangement in the network in the process of churn. So the key aspect of GossipServe is that it combines stable, reciprocal messages with gossip about message flow metadata. We'll dig into this in a second. And it succeeds a protocol that we had in the LVTB step, which is called FlotServe. And it's basically the dumbest protocol in terms of you're to be a PubServe. You disseminate a message to every peer that you connected to that. And you know it's interesting what you're telling me, right? Which is great because it's robust, it's resilient. And it can take minimal latency parts because you just push the message out. And those peers that are closely connected to you and have a fast link with you could receive it first. But it also creates a lot of right amplification. And it basically clubs up the bandwidth because you're creating a lot of duplication in the network. As I said, GossipServe is the stepping stone towards the grand vision of MSR, which is I'll introduce it a bit later, but basically concoct ideas from Plum Tree, Hyper-V, or Go-Best. Warning, the stickiness of GossipServe is currently off. And this is very important for people to understand. It is a protocol that we're going to continue iterating on over and over again. And as I said, it's a stepping stone towards this more stable and featureately protocol called EBSA. There are three implementations. There is the reference implementation in Go that the Libby2B core team produced. There is a implementation by the Sigma Prime guys who are just here. Raise your hands, please. Get some credit. Fantastic. It's currently sitting in a fork. And I don't know if the chain-save guys are here. I don't think they are, but they also contributed and they created a GossipServe a protocol to change this. Cool. So how does it work? I'm going to go through different layers of the protocol to kind of like do a whole thing. So the first thing that you need to understand is that GossipServe is actually a hybrid of two different networks that are on the same protocol, that are on the same boundary. So there is a full message network formed by reservable links through which messages are forwarded. And this is, the word reservable is very important because this is supposed to be a stable mesh where peers are actually exchanging messages with one another. So if I'm pure A and I'm interacting with pure B in a topic, these two peers will actually be exchanging messages with one another consistently. And then there is a metadata-only network that carries GossipS, about which peers, what peers are actually seeing. So as I said, the full message network, we call it Mesh, is a sparsely connected network of reservable links between peers that are actively consuming and interested and therefore forwarding a particular topic. The construction of the mesh is actually randomized and is self-stabilizing because it has a number of stabilizing parameters. So peers are configured, the mesh is configured with a target degree, which by default is 6. There is a high and low watermark, which by default is 4 and 12. And peers will strive to maintain the connectedness for a particular topic at an optimal level of 6, taking compensating action whenever it goes above the low watermark or above the high watermark. This is a way to keep that leeway to avoid drastic down-cutting and up-regulating. So the stable mesh is complemented by a metadata-only network, which is a densely connected network that augments the mesh with Gossip propagation about which messages are actually available. So this enables writing decisions to be made. If I have, the easy way to put this is in a particular topic, if I have 50 peers that are interested, that are consuming, so 15 neighbors of mine, are interested in a particular topic, only allowed to keep 6, in theory, based on the stable mesh, the remaining nine will turn into gossip peers. So I will not exchange messages with them, but I will collaborate with them, telling them what messages I've seen without actually pushing messages to them. We'll go through this in a second. So how does topic membership work? As I said, a peer can be subscribed and be emitting messages on various topics at once. So peers can participate in many topics, either as subscribers, publishers, and both. And peers keep a view of all neighbor subscriptions whether they overlap with ours or not. So if I'm subscribed to topic A, and another peer is subscribed to topic C, but I'm not interested in C, I will still note that the other peer is subscribed to topic C. As subscribers, as I said, only engage in message propagation and gossip for virtual topics. So I will only actually participate, and this is one of the key properties, if you remember, that are desirable in Pub-Sub systems, in peer-to-peer Pub-Sub systems, which is only those peers that are invested in a topic should be making effort towards disseminating that topic, so that the gossip does satisfy them. So we have a concept that's called subscription evening, which is basically on every new connection, peers will exchange the topics that they subscribe to, and as the application that is using the Libby-to-peer stack joins four-leaves topics, they will send updates to all of the peers. So as I'm participating, as I become a participant in a new topic, I will send an update to all of the peers. Now, we don't want to be very chatty, so we've introduced the concept of piggybacking. So this means that we will try to coalesce updates, metadata updates to peers on top of messages that we anyway need to send them, such as graphs and proofs and so on, as you see. And this kind of weakening enables us to create about metadata flows and to do also a terminal topic sending, which is also called final, I'll explain this in a second. So with regards to topic membership, there is two key concepts to understand here. There is the concept of grafting and proof. I said that the stable mesh is actually a self-regulating mesh, and these two messages are key to regulating that mesh. So graph control messages, graph control message, proposes a two-way full message stable link with a peer. So it basically, when one peer sends a graph to another peer, it's basically telling it, hey, I want to be part of your reciprocal mesh for this topic, right? This means that I'm going to send you messages and you promise to send you messages as well, right? Now, the other peer can reject that because they're already beyond their target degree, right? And if they're rejected, they send back a clue. However, the other peer knows that I'm interested in that topic, right? Because we can do subscription to that topic. Therefore, even though I'm not part of the stable mesh, that will send me metadata, right? So this is where the aspects, these two networks started making sense, right? Now, a prune control message dissolves a two-way message, a two-way stable mesh, stable between two peers. And this could be, in this could be sent and respond to a graph that we want to reject or if I'm down-regulating my degree, right? Now, one key, another key aspect to try to understand is that by itself, BOSP sub sub right now does not include a mechanism for peer discovery, right? So if we want to, whenever we want to subscribe to a topic, we need to find a set of peers that are already subscribed to that topic. This specification is called ambient peer discovery, right? We rely on the peer discovery mechanism which is present in the audience, right? This is going to change as we go forward. Where there's currently a PR to add active peer discovery so that whenever you, the application subscribes to a topic, there will be a, a pop-up will actually do a lookup of peers in that topic for them, for the application. And we also plan on introducing something that we call collaborative peer exchange. Let's talk about message flow. When a peer wants to send a message as a message source, they just push the message to a wall stable, to all peers in the application, they're full of message flow, right? Super simple. Now, peers that receive that message are actually message routers. So whenever they receive that message, they will forward that message to all other peers that are part of that mesh, of that view of the network, right? And we follow here as to interbreak silence because we don't want to send the message back and forward, back and forward, back and forward, right? Now, we can also publish messages on topics that we don't subscribe to, right? And this is interesting for things like, for example, IPNAS, the Interplanetary Naming Service where we want to send updates from whatever name, the mapping of a name changes to a different app, for example, right? So you don't necessarily the peer that's watching, for example, the DNS server, a DNS name server somewhere, and then it's noticing this change, doesn't necessarily want to be subscribed to the Starbucks, right? So as the possibility of sending those messages and when we do that, we basically are, remember that we keep in track of what peers are actually subscribed to, the network, we're not forming stable meshes with them, but we keep in track of them. So if the local application tries to send that message, we will immediately find what we call a fan-up group from those peers that we know are already subscribed to them, right?  So once we found that group, we push out the message, those peers we know are already part of the mesh, therefore they will forward that message internally because the message has arrived inside the mesh for the topic. And after two minutes, we just dissolved that fan-up group because that was just an ephemeral set. So we don't want to keep it along for too long because that would be aggregating state that we don't. We also have the concept of topic validators and message validators, so we can, so when a peer, when an application sends a message, sorry, the application can configure, it can attach predicates, validation predicates to topics, right? And either to point out, for example, is using this for validating signatures in blocks that are getting propagated and so on, right? And transactions. So when a message is published locally or before forwarding a message, this predicate will be called. If it succeeds, then the message will continue dissemination. Otherwise, it will just be dropped. We have the concept of asynchronous validators for heavy logic and Goss himself can also be configured to sign outbound messages and to, and to strictly validate dynamic signatures as well. Now, how do we regulate the mesh? There's a concept called happy, which by default happens every second. This is a very popular concept in distributed systems. And this basically performs mesh and Goss at maintenance functions, right? There's three things that happen. We regulate the mesh degree for every topic. We emit Goss in and we slide the message. So this is kind of like how degree regulation works. As already explained, if we're below a certain threshold, we will try to add peers to the mesh for that particular topic. If we're above a certain threshold, then we will try, we will prune peers from that topic to try to keep the degree at a stable constant. To be able to do this, we keep a bunch of local states or topics that I subscribe to, topics that I recently sent a message to. This is the found out groups, peers that we currently connected to and what kind of links we maintain with them, whether it's a full link, message data link or if the found out peers, and what messages we've recently seen. Why is this important? This is this last bit. Because we send Gosset. So this is where the Gosset comes in. So every single peer that we know is interested in a particular topic that is not part of our stable mesh, we will collaborate in the network by Gosseting what messages we've seen in that particular topic. So we don't send a message to them, but what we do is with every tick and every heartbeat, we will, with the message, we keep in a message cache and we keep in kind of like a sliding window of the messages that we've seen in the last 30 seconds, two minutes, this is configurable. We will send them a list of all the messages of the messages that we've seen. And this usually happens as well. We try to piggyback this because we don't want to create excess overhead in the network, but sending this message around every time that we see a message. So we try to piggyback. If we have a message to send them anyway, then we try to piggyback these control messages. Now, if a peer spots a message that they haven't seen, they can ask for that message, they can pull that message by sending an I want control message. So in that I want control message, there will be listing the messages that they want us to push to them. Why is this important? This is important because it allows us to take round decisions.  This means that your, that deliverability towards you is not 100%. Because in your mesh, you haven't received that message yet. So you can use that as a sign, as a hint to try to repair that pathology by pruning peers that you believe are unhealthy and grafting with peers, with the peer that sent the message who probably has a better route to the rest of the mesh. You have one meeting next. Okay, fantastic. I think I'm almost done. So this is kind of like a bit of a schematic view of what's on the wire. By the way, all of these images and so on, you can find them on the web, so don't worry. I'll just show you where they are. I just want to talk quickly about what's next. For a gossip sub, first of all, we want to formalize a gossip sub into an academic paper. We want to harden the reference implementation and go to the database to enable pluggable routers. This is, for us, very important for the vision of gossip sub itself. And formalizing a gossip sub into an academic paper is going to be also a robust step in allowing other downstream projects to actually build on top of that analyze it and to get all this work peer reviewed because it's essentially a new contribution to the state of the art. We want to integrate discovery mechanisms and there are various benchmarking efforts underway. Important aspect is said, gossip sub is not the final destination. And gossip sub is a step along the way. Really, the key aspect here is and where we want to get to is a protocol that we call MSU, MSU, which is a combination of geometry, high-par view for membership maintenance and vocals for the proximity awareness machine and so on. And this will allow us essentially to model the kind of behavior that I describe. So if we, so with MSU, we'll be able to build dynamic dissemination trees that are mutating and that are adapting to the conditions of the network by keeping track of the peers that are better connected to the network and as well those peers that happen to present pathologies with us. So whenever we find messages that we haven't seen that are gossip, that are incoming gossip from another peer, we can rebalance the tree and make sure that we always have a good connection to them. So this is what we also call the self-healing mesh. We want to introduce adaptive cache modules and things like collaborative and passive membership peers. So something that's key here is the ability to send advisories over the network of what peers are available in which time. So ideally, you want to use an ambient discovery mechanism like the DHT, for example, to find a seed, a limited number of peers that acts as a seed to bind to that topic and once you have those few peers which are probably overloaded because they are being advertised, right? You want to inquire them for other members that they know about in the mesh and you want to create gossip not just about the messages that are available but about what peers are present in that topic. So this is something that's going to be cool. That's going to be, that's coming down the pike. It also has notions of peers. Cool. So as I said, all of these time terms and these schematic views, which are pretty nice and very beautiful, they are available under the Docs website. So make sure that you check out the new snazzy docs for Gossips of which we just released one week ago. Just in time for that. In time for more to do this.


It's about 8 o'clock now and if I'm quick I can sneak in a couple loads of laundry before I have to go to school so let's do that. I don't even have a beverage I feel like I usually wake up and make a beverage and cheers to you guys but I kind of want some Starbucks today so I'm probably not going to make coffee at home but let's get this laundry going. The idea of vlogging is that you guys cannot see the floor because the floor of my apartment is like a mess. Look at all of that laundry. It's so bad. I'm going to stuff and they actually sell a really big jar at Marshall's in Soho for $30 so I'd like a mental note thing to go pick that up that you know I'm just gonna put it here because you gotta moisturize your hair before you so I never wash all my clothes at once. All my clothes are going to fit on this rug. I'm going to eat that and pick them up and then we're heading straight to campus. This is such a weird vlog. I really thought it was going to be like first day of the U.N. vlog now it's like first day of the U.N. and like eighth day at the U.N. and now it's going to be a student I guess. I don't know. The attention is still there but I'm just like playing this kind of crazy. Vlogmas because December is actually coming up really quick and last year I don't know if you guys were following me last year. Honestly you guys are all probably pretty new because I think I have like 400 more subscribers than I did at that time but last year I got 8 videos done and honestly one of them came out in January. This year I think my goal is going to be to do 12 videos for Vlogmas and I wanted to start thinking about and like planning what videos I want to do for Vlogmas and all that fun stuff and honestly I think I need a little bit more of a strategy on YouTube. I think this year I really focused on just like getting good at making content so like shooting it and editing it and like posting it and next year I really want to think about ways to strategically grow my audience. If you guys watched my old video, my life update video, I shared that I also want to launch a podcast in 2024 oh my god I graduated from Columbia next year that's crazy. Yeah so I also want to launch a podcast in 2024 so I kind of want to think about how that's going to influence my YouTube channel and vice versa and yeah so I'm going to be doing some of that and try and pick it well because I don't really feel the bust. I have like a weird head cold like I literally feel like I'm on an airplane like me but I love you make sure you subscribe and I will see you in the next video.


The mysteries of Islam fascinate us time and time again. This is no different from the life story of the Prophet. Who was Muhammad sallallahu alaihi wa alihi wa sallam? An illiterate dozen merchant who one day stumbled upon amazing Arabic rhetoric. Or was he the creation of Allah's greatest light? Sent down to earth to pull man out of ignorance and bring them to the purest of truths. I Ali Burji am on a journey to discover the real story behind the Prophet. The real story behind our religion, the roots, the beginning, the cradle of civilization. In the name of Allah, the Gracious, the Merciful, the Merciful. Peace be upon you. Peace be upon the honorable prophets and messengers of Muhammad sallallahu alaihi wa sallam. Wa ala aalihi al-tayyibin al-taahireena l-ghurra al-mayameen wal-anatullah ala a'adaihim ajma'een min al-an ila qiyam yawm al-din. Peace be upon Muhammad sallallahu alaihi wa sallam. And peace be upon you and the blessings of Allah and the blessings of the Prophet. So with regards to our journey, the journey of our holy Prophet's life, sallallahu alaihi wa alihi wa sallam, we've reached to the point chronologically where Rasulullah sallallahu alaihi wa alihi has left Mecca after 13 hard years with the Quraysh and all his efforts for them to at least give him the freedom to express his beliefs and pass the message. He travels to Medina and from here also we have the beginning of the Islamic calendar where we calculate the years from Hijrah and the holy Prophet also we discussed this incident with the cave. Now the holy Prophet sallallahu alaihi wa alihi wa sallam are heading to Medina with Abu Bakr and Amirul-Mu'mineen is left behind in Mecca. Now there are certain jobs, assignments, tasks for Amirul-Mu'mineen. One of them is for him to protect Fatima al-Zahra alaihi sallam, his mother Fatima bint Asad, and I believe a third Fatima as well amongst the Fawat and the three Fatimas. I do not remember the third, inshallah if you could inform me about that. So the first task was to return the Amanat, the goods. What would it be a proper word Amanat in English? Trust. The trust. So the trustees that people left with the holy Prophet as known as Sardek al-Amin, people would trust him so much they'd leave things with him like a bank. So Amirul-Mu'mineen alaihi sallam had to return them before eventually leaving with the holy Fawat. Inshallah if we can begin with Amirul-Mu'mineen alaihi sallam and we can go through the events. Inshallah. Inshallah. I seek refuge with Allah from the accursed Satan. I seek refuge with Allah from the accursed Satan. May Allah protect us all. Yes, when the Prophet sallallahu alaihi wa alayhi wa alayhi left Makkah for Medina of course he stayed in the cave for three days until dust settled so that they could continue their journey without Quraish being on their trail. Amirul-Mu'mineen alaihi sallam stayed behind. He stayed in the Prophet s bedroom on his bed as a decoy if you like so that the Prophet could escape. And after they discovered this of course there were some skirmishes between the warriors of Quraish, Imam alaihi sallam. So they came after Amirul-Mu'mineen. Yeah. Were they planning to assassinate Amirul-Mu'mineen since the holy Prophet escaped? Well, they wanted to punish Amirul-Mu'mineen at least in some instances. They did punish but what happened according to some narrations that the first one who came forward to hit the Prophet thinking that he was a prophet was Amirul-Mu'mineen alaihi sallam and Amirul-Mu'mineen stood up to him. The first one who came to him was Khalid al-Nuwalid and Amirul-Mu'mineen alaihi sallam grabbed him by his arm and twisted his arm and firmly holding or grasping his hand so that he could make him to let go of his sword and to say that he was screaming in pain because Amirul-Mu'mineen was twisting his arm. So he was known at that stage in his life Amirul-Mu'mineen was he known for his extraordinary power? He certainly became known. He became known in that instance. But was it from that night? It's just quite out of curiosity just to know regarding the recognition of the Qur'an amongst the Quraysh regarding his extraordinary powers because of course by the time we reach the khaybar which insha'Allah will cover that shows truly... Well, before khaybar it was in Badr and then in Ahud in the battles of Badr and Ahud which shows the bravery and heroism that Ma'ala alaihi sallam showed. So that, yeah, but at least this is the first instance when he confronted Khalid al-Nuwalid and Khalid al-Nuwalid was screaming in pain because Ma'ala alaihi was twisting his arm and he made him let go of his sword and he took his sword and he threatened him. So that really demoralized the warriors of Quraysh at that instance. And some narration say they wouldn't let him go. They sort of kept him there. Some narration say they said, okay, we'll let him go. We are after someone else. We're not after him. We're after Muhammad. Not to waste time and sort of try to see which direction he's gone. In fact, they said to him, where is Muhammad? He said, you didn't want him here so he's left. You didn't leave me to watch over Muhammad. Why are you asking me? So there was some... that kind of strong conversation between them if you like. And they were very anxious not to lose time and immediately Rush made a decision as to which way to go. And of course they got some guides, if you like, or those people who can track. Trackers, if you like. So they went after that. At least in that instance, in his confrontation with Khalid al-Nuwalid, he was one of the warriors of the kuffar, of the disbelievers of Quraish. He really... Imam Ali al-Salam gave him a good lesson to Khalid al-Nuwalid and he humiliated him in that instance. At least in that case he became known for his bravery. There is another instance when he was leaving Medina. He was confronted with someone else. He probably will come to it. And there was a confrontation as well. And again they saw the bravery of Imam Ali al-Salam in that instance. But as you mentioned, the following day he had three tasks to do. Imam Ali al-Salam, which the Prophet sallallahu alayhi wa alayhi had instructions to do. One is to return back all the goods that the Prophet sallallahu alayhi wa alayhi had been given for safekeeping and trust, to return them to their owners. And to settle any debts that the Prophet had, sallallahu alayhi wa alayhi, to go to the creditors and make sure everything is sorted. Another third thing is to get all the women and children, the Prophet s family, if you like. And as well as Imam Ali s mother, Fatima bin Asad, to take them with him and head for Medina. So it wasn't just Fawat, it was women and children left behind? Yeah, the wives of the Prophet, if you like, at that time he didn't have any wives, so the wives wouldn't be correct because Sayyid al-Khadeej al-Salam had passed away and he didn't marry in Mecca, if you like, after the death of Sayyid al-Khadeej al-Salam. He married in Medina. So yes, they wanted to get the women and children who they were with him, so he got them with him. And that was on road to Medina. So his task there was to settle the debts and to give any goods that they had given any items that were given to the Prophet sallallahu alayhi wa alayhi and he declared that he used to go around or study in Mecca and declare that whoever wants anything from the Prophet sallallahu alayhi wa alayhi he should come to me so that I can settle these with him. And he made that his job and of course, and he did declare that after I finished this I'm leaving Mecca for Medina. And of course this was unique in the sense that Imam alayhi al-Salam, all the Muslims who were persecuted in Mecca, they left Mecca secretly at night one by one so that they don't draw attention. They had to leave all their belongings there. That's why, I mean for future reference, all their belongings and property and wealth and so on of the Muslims who were persecuted in Mecca were confiscated by Quraish. We need to remember this inshallah when we talk about the beginning of the battle of Badr we see the causes, the reasons for some of the actions that were taken. So they had to leave in secret. They couldn't carry their property or their belonging with them. The Prophet did the same thing, sallallahu alayhi wa alayhi, he left at night secretly but Imam alayhi al-Salam, he left if you like in broad daylight and openly he declared He announced it as well. He said, and this was a challenge to Quraish. And this was a challenge to Quraish. That's why, of course, they pursued him and they tried to assassinate Imam alayhi al-Salam on route to Medina which is showed in that instance. Amir al-Mu'minin al-Salam was all by himself or he had any other companions? No, he didn't have any other companions. All by himself with the women and children? With the women and children. So one would think if he was all by himself it would be a very important reason to leave secretly as well. But by announcing it, does this show that Amir al-Mu'minin because of his exemplary bravery and also extraordinary power which was proven on the battlefield, he didn't know. Wary, he wasn't worrying the fact that all they're going to come after us. He knows he can control the situation and protect the children and the women. And would this show, is there anything more to this other than that? Well, there are various narrations. In one instance, Quraish, they came up with a plan to discredit Imam Ali and the Prophet, and the sense that they said to one of them that you go and make false claims that you'd given something to the Prophet and he went back. And so he did. So Imam Ali al-Salam, someone by the name... Could you remind me which book you're quoting us from? There are various books. I mean, this is Jawahir al-Tariqa. It's a compilation of various hadiths, if you like, and incidences and narrations and so on. It is said that Abu Sufyan and others, they instructed Umair ibn Wabi al-Sakfi that go and make false claims that you'd given the Prophet, 80 misqal of gold. Now that he's a floodmaker and you are his representative here, I want you to give that gold back to me. And I have witnesses for that. And of course, Imam Ali al-Salam checked and his name didn't appear. And he said that my witnesses were Abu Jahl, Akrima, Abu Sufyan and Hanzala. So if you like well-known people, Abu Jahl is on Akrima, Abu Sufyan, Hanzala and so on. Leading people of Quraysh. And these are my witnesses. I've given this gold to the Prophet. Now that you're saying that you want to return back all the items that had been given to the Prophet for safekeeping, I want you to give me back that 80 misqal of gold. Imam Ali al-Salam knew that this was a trick. And they want to discredit him and the Prophet, sallallahu alaihi wa alaihi. And he said, okay, let's go buy the Ka'bah and bring your witnesses so that I can ask them. So Omeir came and the witnesses came and he asked Abu Sufyan. He said, did you see that Omeir gave him 80 misqal of gold? He said, yes. He said, what time was that? And Abu Sufyan said this was about sunset. By the way, before Imam Ali asked Omeir as to what time it was. That he gave them the gold too. And they were all giving different answers because obviously it was a lie. That's right. So he said by sunset. He asked Hanzala and he said at midday. And he asked Al-Qubay and he said it wasn't the afternoon. He asked Akram and he said it was about sunrise. So everyone was giving a different answer about the time that Omeir gave the money to the Prophet, sallallahu alaihi wa alaihi. And of course in this way, and Omeir was standing and he got these witnesses one by one to come and tell Imam Ali as to when was this done at what time. And Omeir could see that they were giving different timings. And Imam Ali turned to him and he said, why have you gone pale? And of course he said that to be honest, they instructed me to do this. In fact, they gave me money to say this. And he apologized for this. And it is said that he declared the two Shahada. Omeir bin Wa'il. And he said that I can see your honesty and of course the honesty of the Prophet, sallallahu alaihi wa alaihi. We know that he was the Sadiq al-Ameen, the trustworthy. But that's the thing, that's what's staggering about that his enemies were aware of his attributes. They were aware of what kind of human being he is, but still they denied him. Unfortunately, yes, they knew that they hadn't seen anything wrong, absolutely anything wrong from him. It's just that basically they were seeing that he's coming with a different religion. They were looking at their interests, they put their interests over anything else. If it was a religion that would not have an effect on the economical side of things, they might have even accepted it or left it at least to be as it is. Unfortunately, it's not only that. Of course it came again because Islam was against a lot of the culture and traditional practices. The Prophet, sallallahu alaihi wa alaihi, told them that say la ilaha illa Allah Muhammadur Rasulullah and you will become leaders and your religion, that is Islam, will become the leading religion. So even materially you don't have anything to lose. Unfortunately, they didn't think straight. It was a win-win, there was nothing to lose. They would lose the idols that they had in the Kaaba, Lat and Minaad and so on. Other than that, they would have gained everything. But unfortunately, eventually they did. But after the battles of Badr and Ahud and so on, and after the conquest of Mecca, they saw the behavior of the Prophet, sallallahu alaihi wa alaihi, they thought that he would cause a slaughter in Mecca given the fact that he has the upper hand in Mecca, but the Prophet, sallallahu alaihi wa alaihi, didn't do anything and they saw still his good behavior, his honorable behavior and his conduct towards them and he forgave them despite all the wrong things that they had done to him, all the killings that they had caused.  But despite that, he forgave them. So eventually they embraced Islam, if you like, but some of them still had this arrogance. Of course. Which can be seen even today. Yes. Okay, so after this, a middlemenin should be preparing to leave. Once everything was sorted, taking care of all the responsibilities, anything, hanging, now a middlemenin is getting ready to leave to go to Medina. What happens? Well, obviously they left, if you like, Mecca. They didn't block his path, they let him go. They left in the middle of the day, you said? Yes. Given the station of Amir Mumni, alaihi salam, and the fact that they have already lost once in the sense that they lost, they didn't manage to kill the Prophet, alaihi salam, so they demoralized there. They didn't manage to find him. So they didn't want to openly fight Imam alaihi salam. When he left Mecca, there was an assassination attempt against Imam alaihi salam by a group leading by one of the, if you like, worries of Quraish, but Imam Ali could repel that attack and continue his way to Medina. But, of course, this took place after the Prophet, alaihi salam, had arrived at the outskirts of Medina, if you like, had arrived at a village called Quba, and they stayed in the tent of a woman called Umm Ma'bet. And they waited, the Prophet, alaihi salam, and Abu Bakr together, and the Prophet decided to wait until Imam Ali arrives. Abu Bakr said to him, he might not come for another month. So the people of Medina are very happy, the news has reached that you've arrived, and so let's go. The Prophet, alaihi salam, said, I will not enter Medina without my brother Ali. Why would he say that? Why would he say that? Why would who? Yeah, why wouldn't the Holy Prophet enter Medina without Amir al-Mu'minin, alaihi salam? What was so important that he had to enter with Imam Ali? A number of reasons, one of them, at least in the Prophet, alaihi salam, is that he is the one who protected me and shielded me, and he sacrificed himself for my sake. He put himself in grave danger, in imminent danger, and he knew that 40 warriors, the best warriors that Quraish had to offer, 40 of them were coming that night with their swords, and they're going to attack him. And yet he stayed in my place, allowing me to leave with such a huge sacrifice and imminent danger of being killed. At least I could return courtesy by waiting for him until he arrives so that we both arrive in Medina in Yathrib. Is that the only reason why he would wait before entering the city? Or is there another reason as well to emphasize something very important with regards to Islam itself? Yes. This is the reason he gave, the Prophet, alaihi salam, gave to Abu Bakr. And of course, I want to say that Abu Bakr said that he didn't like all this weight that the Prophet, alaihi salam, is giving to Imam, alaihi salam. And he insisted that they should leave. So you can imagine that he is telling the Prophet what to do and he should be there taking instructions from the Prophet, alaihi salam, because he knows that the Prophet, alaihi salam, he should know that the Prophet, alaihi salam, doesn't do anything except according to instructions from Allah, alaihi salam. So even staying at Quba or leaving from Medina is according to what Allah has instructed him. Whatever, which is the sunnah of the Prophet, whatever the Prophet does is in line with the instructions of Allah, alaihi salam. So, yeah, Abu Bakr was not happy with this. He kept insisting and the Prophet, alaihi salam, said to him that he is not leaving. He is staying until Imam Ali arrives and so this angered Abu Bakr and Abu Bakr left the Prophet there in Quba and he headed for Medina. Okay, I feel with regards to this, I just wanted us to touch a couple of issues here. So we see the stressfulness of Abu Bakr. Now, we discussing the biography of the Holy Prophet, his lifetime and his mission, we see that the Holy Prophet throughout his time always tries to emphasize and show to the people that after me, my successor is Amir al-Mu'mineen. And how I see it is that it was so important for him to enter Medina with Amir al-Mu'mineen as a statement to the people. And Abu Bakr wanted that. So that shows, now if there is a conspiracy against the Holy Prophet, alaihi salam where did it start? Because you can see the signs that the plotting did not start at the last era, at the last years of the Holy Prophet. It could have been from the very beginning and it's quite disturbing. Now, whatever we can expose, insha'Allah, I would like to expose it because at the end of the day, we want to expose the truth and be objective where we have to be objective. And obviously, we have to give credit when it's due to give credit. Not being biased or anything. So, Abu Bakr leaves, he goes to Medina. That doesn't happen, he won't enter. And we'll discuss about Medina, insha'Allah, we'll go into that because that's quite exciting as well. Now, Amir al-Mu'mineen left Mecca and he's on his way. As you mentioned that the Quraysh, they try, they send people to stop him. He brought them back, he continues. The Holy Prophet, sallallahu alaihi wa sallam, is in Quba and he's waiting. And insha'Allah, we're going to discuss about Amir al-Mu'mineen arriving to Masjid al-Quba and entering Medina, insha'Allah, and we'll go through that. Alhamdulillah, our Lord is upon us. The Prophet, sallallahu alaihi wa sallam, threw out from the moment that the first revelation took place, he used every opportunity to show that Imam Ali is along with me, he is supporting me, and he is the one who is going to lead the ummah as my successor. He is going to lead the ummah after me. So the Prophet, sallallahu alaihi wa sallam, used every opportunity to show, to express this and show that message to the people. Even by just arriving at the city of Medina along with Imam Ali, rather than anyone else.


This research has revealed that smooth muscle cells are present in the meniscus from early developmental stages through adulthood. These cells express notch 3, which is a key regulator of cell differentiation and proliferation. When these cells are inhibited, they can reduce the production of collagen eye, which is associated with fibrosis. Additionally, notch 3 inhibition can also reduce the effects of transforming growth factor beta, TGF beta, and connective tissue growth factor, CTGF, both of which are known to cause fibrosis. As such, notch 3 may be a promising therapeutic target for treating meniscal fibrosis. This article was authored by House Sun, Fumjolu, Jinsun Lin, and others.