 Good morning everyone, we are from team analytics and we are working on sunbird analytics here is my team I am Siddharth, Aleksha, Shivam and Tanmay. So starting off with our objective our first objective was to install sunbird portal on our local machine followed by playing around with the code getting our hands dirty and understand each of the controllers views workflow between them and then use various sunbird APIs in order to generate analytic reports and in case we do not have such APIs and create our own data APIs based on our requirements install sunbird server on our local machine and testing our own created APIs on the server. So let me give a overview of what we have done we have successfully installed sunbird portal on our local machine we faced some challenges in the beginning but they were easily fixable they were just the problem with the version of node and the dependencies and we went through the entire scripts what was nightmare for us was there was no comments in there. So we had to figure out everything on our own how each of the component work and especially ma'am helped us a lot in this phase and we successfully added an analytic section which generates four different kind of reports in there first one is content consumption followed by location wise course enrolment gender and education wise course enrolment and we tried installing sunbird server for more than 26 time failed every time except one sent over 100 emails to team sunbird and except without getting any proper reply we did not get the required API key in order to test their API so as suggested by team sunbird we created our own APIs in order to test the front end and in the end our only working server stopped working so we had to map everything from Cassandra to my SQL because we had a software which generates random data for us so in so rather than again and bring data into Cassandra we had a software to do that for us and now I will ask my friend to tell about the technologies we have used. Yeah coming to the technologies part the technologies we are we use in our project are the Cassandra, AngularJS, NodeJS, cluster module in NodeJS and ExpressJS the Cassandra the database used in the sunbird is the Cassandra and this Cassandra driver is used to access the database coming to the AngularJS AngularJS is we used to use AngularJS to create a report step that is in the front end part NodeJS and the NodeJS we used to create the data APIs cluster module in NodeJS the cluster module in NodeJS we used to increase the throughput of the system. ExpressJS is a library which is used which we created a server to accept the to get the request over to my friend Shivam to continue the session. So this was the part that took like we did this part over 26 times and just succeeded once so it is the sunbird server installation. So initially we generated the xstep API key from the jwt.io website then installed and updated the git and clone the sunbird devops folder and then we updated the config file based upon the information provided on the documentation of sunbird server installation. This step includes eight different stages of installation the first was the sanity check it just checks the prerequisites if they are prerequisites softwares if they are properly installed or not and it also checks the RAM if it is compatible. The second was the config so it installs the config and the host files the third is depth it installs all the dependencies dbs installs and configures the kasandra database APIs was used to install and deploy the cong API proxy was used for installing ngx server key clock install server key clock installs so this step used to install key clock which is used for authentication purpose and this eight stage core so all the other stages were third party of the third party but this was of sunbird and sunbird software. So we have developed some error guide and IIT Bombay X team also helped us in this. So the first error was that SSH connection failed so we will have to develop the SSH connection the RAM not enough so initially we took a local system which had 4GB RAM but we didn't check at the initial step that what was the RAM and then we faced this error. So actually the RAM should be of 8GB. Second was the refuse to connect so the database was refuse to connect so here we had to add a host in the etc slash host files. The third was this error was coming at the API stage so what we advise that it should be done before that API stage so here we had to change the pg underscore hba.config file and do the necessary as described here and in the report and final was that IP address was unreachable. So here we added host name and the IP address to the ansible slash host files. So this was the steps we did and only once we had succeeded to successfully install the sunbird server but then eventually at the end that also stopped. Good morning guys I will be explaining about the front end so this is just a flowchart for the workflow and when the APIs are called. So I will be explaining through this video so we have made this video so first you log in. So let me point out here that initially there were only this as you can see there are six tabs right now initially there were only five the analytics tab the last one is what we have added. So we had to go through a lot of code as Siddharth said earlier it was very painful and as he already said that we had added four tabs content consumption education wise and location and gender. So yeah let's start with the content consumption as you can see there are like three drop downs here. So the first drop down is for this all the courses that the user has created. So the user who is interested in seeing the analytics will choose the course for which he wants to view the analytics and as soon as he selects a course let me add this the list of courses is fetched to API that we have written it is called the get courses API. So once you select a course another API is used to fetch all the contents within the course. So the second drop down is for that so all the contents are fetched as soon as you this select the content for which you want to see the graphs and you can see the graph there are two things there is a graph and there is also table we have provided here and you can change the third drop down is for choosing the graph type you can for content consumption we have line graph and area graph and one more I can't remember. So yeah so this was content consumption the rest of the three are very similar to each other and so I will be explaining only one. Yeah so this is the area wise distribution. So yeah here we have only two rounds so the first one is again for the selecting the courses again it is fetched through get courses API and again we can select the graph type. So I like to add that we have used this Google charts for doing all these graphs and these things because I really like Google charts all the width adjustments and all it can be done very easily using Google charts and also they provide very beautiful charts. So yeah changing the graph type is also very easy so yeah so that was the front end part. So this is the education and after that finally we have the gender one. So over to Siddharth he will explain about the data APIs these are the screenshots of various reports which are being generated and then coming to the back end which is working behind all this. So first of all let me give you a little overview of how it works so basically I have created an express based Node.js server which accepts all those requests all the API calls are post which takes the user ID and when we log in into Sunbird what we get after handshake is a session token. So this should also be sent in the header along with the ID course ID and the session token which we get so generally it should be a very easy task but the problem with Cassandra is it does not provide any joints any group buys or any kind of aggregation so we have to do everything programmatically and the Node.js is a synchronous programming so before even we can fetch the data it was free processing it and we are we were getting a null response so how we managed to do this synchronous programming in a synchronous environment was something using callbacks so it is function under a function under a function it goes till D level till we get the required response and in the end we send the response to the server and first API is get course gender distribution it basically based on the course ID checks the course enrollment gets the user ID of each of them use that user ID to determine the gender and in the end performs aggregation and returns array of JSON objects in which there is a gender type and the count of the number of course enrollment belonging to that category and it is same for education area the content consumption is a little different because we had to convert the timestamp and all so the in content consumption each content has an ID followed by user ID and the timestamp when it was consumed so we had to convert the timestamp into required format and it performs aggregation over a period of a year so it shows a consumption pattern in the last year how it is basically number of times that content was viewed in that year so we just it is a simple query we just give the timestamp along with the content ID and it gets all the all the number of times it was being viewed and then the response is the JSON object array of JSON object with month and year and one thing I would like to as in the beginning you said that we do not even know how to use each course of our machine so we finally figured out how to use that so basically there is a module in Node.js called cluster Node.js was designed to use only one core of your PC so what this cluster does is it copies the program and it runs on each server so it increases your throughput it does the load balancing and it increases the stability so even if one worker goes down other are other are still responsive and what I have written is if one by any chance if one crashes one worker crashes then it creates a new folk I get folks a new one and so it basically increases the throughput and the stability so that's all so any queries. So when you wrote the API did you have a sample API to look at? Yes sir. You had and that was useful. Yes sir. How long did it take you to write the complete API test it and confirm that it is working? Lot of time sir as I said. The second point is when you are writing an API why did you not make it more generic by saying that the user can actually request a time interval during which the user wants the data you are fixing it to one year. Yes sir. It is not always that I would like a one year long history or something. Yes sir that's something which can be fixed. Because that is rather easy to fix. Yes sir. And that would make your API more generic. Was this your first time handling Cassandra and such things? Yes sir. So you learned something useful? Yes sir. You did not use Angular also? Yes sir. Even the Node.js was used earlier? Yes sir. It was time to figure out how to do this synchronously because even before our... The key for future is such new things will keep emerging. These were not there ten years ago. These will be replied by something else ten years ago, ten years later. What it means is in each of your professional career be prepared to keep learning new things. And if a new useful thing has not appeared on the horizon should keep your brains polished by just attempting as an experiment learning something new trying it out and dirtying your hands. Never let that practice go away from you. Because having done this once second time you will do it faster. But with something else. And that is why we always say learning how to learn fast is the important take away from our entire education system. It's not exactly what this or that you have learned. Good work you enjoyed I suppose. Yes sir. You unfortunately have no exposure to Open edX right? Yes sir. So there is a comparison that ought to be done in terms of the API richness of Sunbird servers versus Open edX. And there is a feedback that the Open edX architect has requested. When I mention to him that over the next year we will be examining this. So that would be useful thing. Okay thank you.