Explain the basic idea of Collaborative Filtering algorithm of Machine Learning used in recommendation systems.
For each user, we start with a large set of other users. We try to find people who have similar tastes to the user under consideration. Then we try to find what are the items that these users have used but, the current user has not. And then we recommend these items to the current user under the presumption that the user would have a similar taste. This is a good algorithm to begin with recommendation systems. To improve accuracy we can use a combination of complex algorithms and concepts: Normalization of Global Effects, Removing temporal effects, Use of Restricted Boltzmann Machines, Matrix Factorization, Regression and Neighborhood models
Explain the principle of Dependency Injection.
Dependency Injection promotes the idea of loose coupling between modules in an application. Lets say we have a client class and two interfaces - IDBRead (For reading from databases) and IDBWrite (For writing to databases). Now, lets say one service A implements the IDBRead and the other service B implements the IDBWrite. These services define the functions for the said interfaces. The client wants to read and write from the databases. But, the client does not directly access the service class objects. The client only references the interface and objects of the service classes are passed as parameters to the client by some intermediate function. This is loose coupling because any changes made at the service side does not require re-compilation of the client code. If the objects of the service classes were instantiated in the client class, then changes made in the service class would require recompilation of the client class. This is the principle of Dependency Injection.
Why is Software Defined Networking possibly going to change the future of Computer Networking?
At present, the 'brain' of a switch or the 'Controller' is made a part of each switch - in other words each switch has its own controller. Companies have been designing their own proprietary switches which require experts to configure. With the advent of SDN, the controller is taken out of the switch - essentially making the switch 'dumb'. Only a single controller will now control multiple switches and software developers will be able to design applications on top of the controller. Applications will now only be limited by imagination. A very good use case: Lets say there is an armed attack in an office building. We would like to stream video from the surveillance cameras to all the users computers in the office building. This wont be possible initially as only a certain part of the bandwidth is assigned to video - rest is assigned to VoIP, Internet etc. For assigning the entire bandwidth to just video, you would require a network engineer to configure the changes. But, with SDN, a software could be developed that does this assignments with the click of a button on the User Interface. The software would tell the main controller what needs to be done and the controller will make changes in the switches accordingly. Hence, proprietary switches would loose meaning. Only controllers and Software Applications would matter. Which makes SDN a revolution in the networking domain.