TOPIC – 1
Hadoop MapReduce vs Spark –
Hadoop and Spark are the popular open source platforms for real-time data processing. These tools have some enthralling functionalities and these have the different roles to play. Traditional data warehousing conditions were costly and also had high latency towards batch operations that’s why organizations were not capable to welcome the power of real-time business intelligence and big data analytics in the real time. It is very difficult to discriminate these two because there are various similarities between these two but there are also some distinctions between these two –
Ease of Use –
Spark has comfortable APIs for Java, Scala, and Python, and also includes Spark SQL (which is sometimes known as Shark) for the SQL savvy. With the help of Spark, it is simple to build block and is also easy to write user-defined functions. Likewise, it also includes an interactive mode for running commands with immediate feedback. Some Hadoop tools can also run MapReduce jobs without any programming.
‘Hadoop and Spark’ are compatible with each other where Spark shares all MapReduce’s compatibilities for data sources, file formats, and business intelligence tools such as JDBC and ODBC. Hadoop affects the functionality of Hadoop. Spark reads data and also writes data to ‘Hadoop Distributed File System’ which is abbreviated as HDFS. Therefore we can assume that Apache Spark is Hadoop-based data processing engine and it can take over batch and streaming data overheads.
Although Spark is faster than Hadoop in most of the iterative applications it is constrained by memory requirements that’s why ‘Spark’ processes anything in the memory. Spark’s in-memory processing produces near real-time analytics for data from marketing operations and machine learning. These can also use the disk for data that doesn’t all fit into memory. MapReduce alternatively employs batch processing and is not built for blinding speed. It also has been originally set up to continuously gather information from websites and there were no requirements for this data in or near real-time.
‘Spark’ needs a lot of RAM to run in-memory due to which it increases the cluster as well as its cost while ‘Hadoop MapReduce’ is a cheaper than Spark in terms of its cost. The memory in the Spark cluster is as large as the amount of data you need to process because the data has to fit into the memory for optimal appearance. So, if you need to process really Big Data, Hadoop will definitely be the cheaper option since hard disk space comes at a much lower rate than memory space.
The security of the ‘Spark’ is not as better as the ‘Hadoop MapReduce’ due to its support for password authentication. The security bonus that Spark can experience is that if you run Spark on HDFS, it can use HDFS ACLs and file-level permissions. Moreover, Spark can run on YARN by giving it the ability to use Kerberos authentication.
Failure Understanding –
Hadoop is usually flexible to the system faults or failures since data are written to disk after every operation, but Spark has similar built-in adaptability due to the fact that its data objects are stored in something called resilient distributed datasets that are distributed across the data cluster. Hadoop MapReduce and Spark solve the problem of ‘Fault Tolerance’from two different directions.
MapReduce Hadoop uses TaskTrackers that provide heartbeats to the JobTracker. If a heartbeat is dropped then the JobTracker reschedules all pending and in-progress operations to another TaskTracker. This is a very effective method for providing fault tolerance. It also can significantly enhance the conclusion times for the operations which have even a single failure.
The speed of the Apache Spark processes data in-memory while Hadoop MapReduce is adhered to the disk after a map or reduce action, so Spark will beat Hadoop MapReduce. Apache Spark is one of the fast and general engines for big data processing, with made-in modules for streaming, SQL, machine learning and graph processing. Also, the general execution engine of Spark is much faster than Hadoop MapReduce with the use of memory.
Easy Management –
With Hadoop Spark it is possible to perform Streaming, Batch Processing and Machine Learning all in the same cluster. With the help of ‘Spark’, you can also control different kinds of workloads, so if there is a communication between various workloads in the same process it is comfortable to manage and ensure such workloads which come as a limitation with Hadoop MapReduce.
Language Support and Developed –
‘Hadoop ReduceMap’ supports various languages such as Primarily Java, C, C++, Ruby, Python, Groovy, Perl, while ‘Spark’ supports Java, Scala, Python type of languages. ‘Hadoop’ is basically developed in Java while the ‘Spark’ is developed in Scala.
Spark assures lower latency calculations by caching the partial outcomes over its memory of distributed workers while Hadoop MapReduce is disk-oriented completely. Hadoop Spark gradually turns out to be a huge potency if we compare to write complex Hadoop MapReduce pipelines.
TOPIC – 2
‘Kotlin’ vs ‘Java’ for Android Development –
Null Pointer Exceptions are a huge source of disappointment for Java developers. Java language enables you to designate null to any variable, but if you are trying to use an object reference which has a null value then you must have to support to encounter a Null Pointer Exception. There are all types are non-nullable values exist in ‘Kotlin’ which are incapable to endure a null value by default. Also, if you trying to assign or return null in the ‘Kotlin’ code then it will not be able to do that at compile-time.
Raw Types –
Before coming to the generics, raw types were employed generally that allows you the backward compatibility. Raw Types can throw a ‘Cast-Class-Exception’ and after this, the error will also occur during execution and not at the compiling stage. Kotlin does not allow raw types that’s why it produces more safe code.
The Kotlin language is concise but Java is not known for it. The concise nature of ‘Kotlin’ is not so complicated for a developer. There is also a less possibility of error with it. It has long-winded code that leads to more bugs and wasted time to try to identify them.
Native support –
Kotlin supports the ‘composition over inheritance’ design pattern, via the first-class delegation which is also sometimes known as implicit delegation while Java doesn’t. Delegation is where a receiving object represents operations to a second delegate object, which is known as a helper object with the original context.
Extension functions –
Kotlin gives the ability to the developers by extending a class with new functionality, which is ideal if there’s a class that you always felt was fumbling a significant method. These ‘extension functions’ aren’t available in Java, although they are available in other programming languages that you can use for Android development.
Smart casts –
Kotlin uses the features that are called Smart Cast for understanding how ‘Smart Cast’ work in Kotlin. A smart cast doesn’t work for uncertain characteristics of a class. It works only for immutable features that don’t have a system of getting. With the help of Java, you can also check type and then cast an object in that locations where it’s already clear that the object can be cast.
Data classes –
While developing an application, we often need to create classes whose primary purpose is to hold data/state. Generally, it is required to define a constructor, fields to store the data, getter and setter functions for each field while in Kotlin, you include the ‘data’ keyword in your class definition, then the compiler will perform all of this work which includes all the necessary getters and setters. Writing can also be found with the many such codes for these classes in Java which have very little functionality in Java.
Easy Learning Curve –
Kotlin aims to be an enhancement to Java. There are many skills which you’ve acquired and smoothed throughout your Java career should still be applicable to your Kotlin projects. Kotlin is also designed to have a gentle learning curve for Java developers. Java developers should find that most of the Kotlin syntax feels familiar.
Concise Code –
If you relate a Java class and a Kotlin class that produce the same results but which is written in Kotlin is typically more succinct and compact than the one written in Java. Also, you should know that less code has fewer bugs.
Developers can very simply write modules in Kotlin that work flawlessly within existing Java code. By emitting Bytecode, a Kotlin compiler allows the two languages to work in unison on the identical project.
TOPIC – 3
AngularJS vs ReactJS –
Data Binding –
AngularJS combines ‘Document Object Model (DOM)’ which accounts to Model data through the Controller by using two-way data binding. Besides this, there are various benefits of React over AngularJS with regards to data binding such as React uses one-way data binding which means that we are able to direct the flow of data in one direction only.
Determining Dependencies –
It’s inconvenient to create a dependency directly on an object. AngularJS does a basic ‘Object Oriented Programming (OOP)’ where we write dependencies in a separate file. In AngularJS, dependency injection is essential to any standard functions so that we can declare for an AngularJS as a factory or service. The difference between React and AngularJS with regards to dependency injection is that React doesn’t offer any notion of a built-in container for dependency injection while the AngularJS offers.
AngularJS model doesn’t allow to add any big model where the developer requires to break-down each coding in the AngularJS. AngularJS simplifies development by providing a reliable framework for Client-side Model View Controller (MVC). AngularJS is a full-fledged framework which uses MVC architectural pattern and separates an application into three main components such as the model, the view, and the controller. AngularJS is fitted with small to the mid-range application that updates single view at a time while ReactJS is suitable for large-scale application that updates multiple views at a time.
Learning Curve Comparison –
The lifecycle of Angular is much complicated so if want to master it then you need to read the code. Compile and link are not natural, and specific cases can be confusing in compiling and collisions between directives. React, on the other hand, has only a few lifecycle methods, and they are self-explanatory. The best feature we found with React is that there is no necessity to read its code.
ReactJS is pretty manageable and easy to understand. It might take some time to launch the program in the ReactJS but it is for the developer to learn as compared to AngularJS. On the other hand, AngularJS is not as easy to learn. Its inherent complexity sometimes makes trouble.
Time of Development –
There is very tough to compare these two. In AngularJS, the amount of redundant syntax requires doing simple things that put angular in the last place. React takes longer time in setting-up, but then you can start to make an app and it should be relatively easy to add new features.
Packaging is the ability to run and deploy your code in the way that you want it. In order to achieve fast loading time then we want to load the bare minimum at first and continue on demand. React is a plain JS that allows us to use requires to lazy load parts of the code. It also allows for working with other solutions like as web-pack.
The Angular is an event-driven system, which is easier to write and harder to debug as the stack-traces end up longer and it is much different than your expectation. However Angular does a good job of providing constructs that are logical. Angular also makes the code easier to examine and debug, but any good programmer will try to classify code and logic with or without them.
TOPIC – 4
Dot net Concepts –
.NET is a general purpose software development platform which is much similar to the Java. .Net is Microsoft’s application development platform that allows developers to quickly build a wide variety of applications that runs on windows operating system like web applications, windows applications, console applications, web services etc. Now we are going to discuss the .net concepts in detail which will definitely help the beginners –
An object is a representative of the class which is responsible for memory allocation of its data members and member functions as well. An object is a real-world object having properties which are known as ‘Data Types’ and behaviors which are known as functions. An object can also be considered a “thing” that can perform a set of similar activities. The set of activities are the objects which perform defines the object behavior.
Assembly is a physical unit of deployment which consists of one or more files and is used for versioning and code security. Assemblies are DLL or EXE files that get generated when the code is written in .NET Language like C# which is compiled and therefore it contains IL code.
Encapsulation or Data Hiding –
Encapsulation is a mechanism of binding the data part & a member function into a single unit which is known as class. Encapsulation grants us a way of abstraction. In OOP the encapsulation is significantly obtained by performing classes where the classes expose public methods and attributes. The class is kind of a package or capsule or a block, which encapsulate the set of techniques and characteristics for providing its organized functionalities to other classes. Data hiding is also a way to execute data abstraction.
There are a lot of built-in types that come with the framework and these are widely used in programming. When we make use of methods that are in these built-in classes, we need to provide a reference to these classes. Classes are present in different logical groupings. A fully equipped name needs to be referenced.
Common Language Runtime (CLR) –
The Common Language Runtime (CLR) is a very significant part of the .NET Framework. Common Language Runtime is responsible for executing the .NET code on the Windows operating system. It abstracts (hides the complexity) code execution by providing different services like memory management and security.
Base Class Library –
.Net Framework Class Library (FCL) is also called as ‘Base Class Library’ and it is common for all types of applications i.e. the way you access the Library. Base Class library is a set of pre-built code for handling common programming tasks like Request processing, Rendering (output) data, file operations, database operations, XML operations and graphical operations.
Define variable and constant –
A variable can be defined as a significant name that is given to a data storage location in the computer memory which contains a value. Every variable that is associated with a data type determines the type of value can be stored in the variable. A constant is similar to a variable except that the value, which you assign to a constant, cannot be modified, as in case of a variable. Constants must be initialized at the equivalent time when it is declared.
Explain keywords with example –
Keywords are those words that are reserved to be used for a specific task. These words cannot be used as identifiers. Also, a keyword can’t be used to define the name of a variable or method. Keywords are used in programs to use the features of object-oriented programming.
In real life, we can observe that children acquire certain characteristics from their origins. So inheritance allows us to pass characteristics from one entity to another entity. In programming, it is also similar to that where inheritance is a way to reuse things which belongs to any particular entity.
Value Types and Reference Types –
Value types are types which hold both data and the memory in the same location. While a reference type has a pointer which points to the memory location. In other words, if we change one of them, the other object is also affected which is termed as ‘Reference types’.