Sunday, February 26, 2017

Overview of WebPack



How is webpack different?


Code Splitting
webpack has two types of dependencies in its dependency tree: sync and async. Async dependencies act as split points and form a new chunk. After the chunk tree is optimized, a file is emitted for each chunk.

Thursday, February 16, 2017

Hypervisors

A hypervisor or virtual machine monitor (VMM) is computer software, firmware, or hardware, that creates and runs virtual machines.

A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine. The hypervisor presents the guest operating systems with a virtual operating platform and manages the execution of the guest operating systems.


There are 2 types of hypervisor

Dockers Overview


Docker is an open-source project that automates the deployment of applications inside software containers

Wednesday, February 15, 2017

Node as web server using HTTP

HTTP

To use HTTP server and client one must use ('http');

The HTTP interface in node are designed to support many features of the protocol which have been traditionally difficult to use.
In particular large chunk-encoded, messages.The interface is careful to never buffer entire requests or responses.

Monday, February 13, 2017

Folder dependencies in Node.js

Create file with folder

  • We need to create an external file and use module.exports. We can emit module.
  • Create a new folder and the a new file named as index.js
  • Create a function which accepts an input parameter as string and then logs it to the console

Export functions in node



  • We need to create an external file and use module.exports. We can emit module.
  • Create a function named as firstName and lastName assign string values as shown below

Using export in node




  • We need to create an external file and use module.exports. We can emit module.
  • Create a property named as firstName and assign string values as shown below

//We can also specify it as module.exports
exports.firstName="My firstName is Prathap"


Services and dependency injection in angular 2



Service

  • Is a class with a focused purpose
  • Used for features that
    • Are independent from any particular component
    • Provides shared data or logic across components
    • Encapsulates external interactions

Angular 2 HTTP Requests with Observables



We use an http client to talk to a remote server.
  • The Angular Http client communicates with the server using a familiar HTTP request/response protocol. The Http client is one of a family of services in the Angular HTTP library.
  • Before you can use the Http client, you need to register it as a service provider with the dependency injection system.

Subscribing to an observable in angular2


  • Observable are similar to promises but with major difference that make them better.
  • Observables is an ES7 feature which means you need to make use of an external library to use it today. RxJS is a good one. RxJS also provides Observable operators which you can use to manipulate the data being emitted. Some of these operators are:

Tuesday, February 7, 2017

Measures for cost saving in the cloud

It is usually a better choice to select Paas (Platform as service) over Iaas (Infrastructure as service).If we spin off a VM in the cloud we need to start paying for it as soon as it is ready and running.

If we choose Paas we need to be smart for cost saving in the cloud.
  • Scale down resource if we can
  • Turn off or decommission resources
  • Develop with cost in mind
  • Measure the usage of the applications

Need for Azure File storage and Redis Cache





  • We are used to In-memory cache for session state or used to store local files to serve as temp files.In azure we cannot rely on this, the reason ,when we use azure platform as a service we would not have single dedicated server. 
  • Resources are abstracted using Azure service fabric.This would take care of the web application running. Even if one of the data center fails, it would magically move to a different data center. This would make sure that our web applications are always running
       In memory cache and local files has to be shifted to Azure local File Storage or Redis cache


Sunday, February 5, 2017

Overview of Apache Spark



             Speed
    • Run programs up to 100x faster than Hadoop MapReduce in memory, or 10x faster on disk (Apache Spark has an advanced DAG execution engine that supports acyclic data flow and in-memory computing.)
           

Friday, February 3, 2017

MongoDB cheat sheet


Steps involved to see the existing database

We need to know that MondoD is the command line and Mongo runs the command line

1) We need to start the mongoDB daemon
2) Go the the bin folder and type mongo
C:\Program Files\MongoDB\Server\3.4\bin>mongo

CSS Preprocessors


Advantages of using CSS Preprocessors

  • Speed
  • Organization ( Can use different files for different screen widths )
  • Modification ( Small changes that cascade through entire style sheets )
  • Minification 
  • Errors

Wednesday, February 1, 2017

First run for mongodb

Steps involved for the first run of mongodb

1) Download the desired flavor of mongodb from https://www.mongodb.com/download-center#community

2) Install mongodb by following the instructions

NodeMon for monitorng Node.js applications


Nodemon: Monitors for any changes in node.js application and automatically restarts the server

Nodeman installation command
C:\Development\NodeProjects\bookstore>npm install -g nodemon

Installation and validation for Express


Installation


1.we can Install express globally or locally
$ npm install express -g

2 .Create package.json file