Principal Architect ( Data & AI) Over 22 yrs. of experience in IT. Global Delivery Models.
Sunday, September 2, 2018
Hyperledger Fabric and Composer
Monday, August 27, 2018
ECOMMERCE TOOLS or VENDORS
• Tealium
• Monetate
• Strongview
• Coremetrics
• Border Free
• Hawk Search
• Moxie
•
• Bazaarvoice
• Reflektion
• Arroweye
•
• Conductor
• OpinionLab
• Telapart
• Bluecore
•
Extole
• Curalate
• Tealeaf
• Qualtrix
• Foresee
• Offer Pop
• Monetate
• Strongview
• Coremetrics
• Border Free
• Hawk Search
• Moxie
•
• Bazaarvoice
• Reflektion
• Arroweye
•
• Conductor
• OpinionLab
• Telapart
• Bluecore
•
Extole
• Curalate
• Tealeaf
• Qualtrix
• Foresee
• Offer Pop
Saturday, August 18, 2018
Angular 6 - Material Module Usage
1) @angular/material is one of the new feature in Angular 6.
- Add "@angular/material": "^6.3.0", in package.json and run npm install
- after npm install run ng add @angular/material
- generates Navigation component using
- ng generate @angular/material:material-nav
- Add below import to app.component.ts
- ng generate @angular/material:material-nav
import { BreakpointObserver, Breakpoints, BreakpointState } from '@angular/cdk/layout';
import { Observable } from 'rxjs';
- Add below variable after an existing variable in app.component.ts file
isHandset: Observable<BreakpointState> = this.breakpointObserver.observe(Breakpoints.Handset);
- Add the constructor after that variable.
constructor(private breakpointObserver: BreakpointObserver) {}
- open and edit `src/app/app.component.html` then replace all HTML tags with this tags.
<mat-sidenav-container class="sidenav-container">
<mat-sidenav
#drawer
class="sidenav"
fixedInViewport="true"
[attr.role]="isHandset ? 'dialog' : 'navigation'"
[mode]="(isHandset | async)!.matches ? 'over' : 'side'"
[opened]="!(isHandset | async)!.matches">
<mat-toolbar color="primary">Menu</mat-toolbar>
<mat-nav-list>
<a mat-list-item href="#">Link 1</a>
<a mat-list-item href="#">Link 2</a>
<a mat-list-item href="#">Link 3</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content>
<mat-toolbar color="primary">
<button
type="button"
aria-label="Toggle sidenav"
mat-icon-button
(click)="drawer.toggle()"
*ngIf="(isHandset | async)!.matches">
<mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
</button>
<span>Application Title</span>
</mat-toolbar>
</mat-sidenav-content>
</mat-sidenav-container>
Next, give it a style by open and edit `src/app/app.component.css` then add this lines of CSS syntax.
.sidenav-container {
height: 100%;
}
.sidenav {
width: 200px;
box-shadow: 3px 0 6px rgba(0,0,0,.24);
}
IBM Blockchain platform
IBM Blockchain Platform makes use of the most prevalent and popular open source Blockchain technologies, and is big supporter and contributor to OS projects.
https://ibm-blockchain.github.io/develop/
Hyperledger is the Open Source platform for Blockchain technology managed by Linux Foundation.
IBM Blockchain Typical Solution Architecture
High Level Components
- Execution Runtimes
- Hyperledger Fabric, Web, Embedded Node JS, Connection Profiles
- JavaScript SDK
- Node JS npm modules like composer-client, composer-admin
- CLI
- REST Server
- LoopBack Connector
- Playground Web User Interface
- Yeoman Code generator
- Angular Web App, Node JS app, Skeleton business network
- VSCode and Atom editor plugins
Installation Steps
Step-1: CLI Tools
- npm install --global --production windows-build-tools
- npm config set PYTHON "C:\Users\stalam0\Python\python.exe"
- npm install -g composer-cli@0.20
- npm install -g composer-cli
- npm install -g composer-rest-server
- npm install -g generator-hyperledger-composer
- npm install -g yo
- Hyperledger Fabric, Web, Embedded Node JS, Connection Profiles
- Node JS npm modules like composer-client, composer-admin
- Angular Web App, Node JS app, Skeleton business network
Installation Steps
Step-1: CLI Tools
- npm install --global --production windows-build-tools
- npm config set PYTHON "C:\Users\stalam0\Python\python.exe"
- npm install -g composer-cli@0.20
- npm install -g composer-cli
- npm install -g composer-rest-server
- npm install -g generator-hyperledger-composer
- npm install -g yo
Step-2: Install Playground
- npm install -g composer-playgound
Step-3: Setup IDE
- install VSCode and install Hyperledger composer extension
Step-4: Install Hyperledge Fabric
- mkdir ~/fabric-dev-servers
- cd ~/fabric-dev-servers
- curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
- tar -xvf fabric-dev-servers.tar.gz
- cd ~/fabric-dev-servers
- ./downloadFabric.sh
Starting and stopping Hyperledger Fabric
- cd ~/fabric-dev-servers
- ./startFabric.sh
- ./createPeerAdminCard.sh
- ~/fabric-dev-servers/stopFabric.sh, and start it again with
- ~/fabric-dev-servers/startFabric.sh.
Start the web app ("Playground")
Thursday, August 16, 2018
Bitcoin
Bitcoin
https://bitcoin.org/bitcoin.pdf
It is A Peer - to - Peer Electronic Cash System
1) Transaction
We define an electronic coin as chain of digital signatures. Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of coin. A Payee can verify the signatures to verify the chain of ownenrship
2) Timestamp Server
3) Proof-Of-Work
4) Network
5) Incentive
6) Reclaiming Diskspace
7) Simplified Payment Verification
8) Combining and Splitting Value
9) Privacy
10) Calcualtions
Wednesday, August 15, 2018
Blockchain
Blockchain
Blockchain is chain of BLOCKs where each Block contains value data without any central super vision. It is cryptographically secure and immutable.
Blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.
Blockchain Technology is a decentralized database that stores the registry of
assets and transactions across Peer to Peer Network and these transactions are secured through cryptography.
Decentralized:
It is said that Blockchain is decentralized because there is no central authority to supervise anything
Consensus Mechanism
Mechanism by which decentralized red reaches on over certain matters specific
Miners
Users who use their computational power to extract blocks
Facts about Blockchain
Transaction history is locked in the blocks of data that are then photographically linked together and secured.
This creates an immutable and unforgeable record of all of the transactions across this network
This Record is replicated on every computer that uses the network.
Its not an app, Its not a company, I think its closest in description to Wikipedia.
We can see everything in Wikipedia.Its composite view that constantly changing and being updated.We can also track those changes over time on Wikipedia and we can created our own wikis,
On Blockchain, we can think of it as open infrastructure that stores many kinds of assets.
It stores the history of custodianship, ownership and location for assets like the digital Currency Bitcoin, title of owner ship like IP.
With all this, How Blockchain lower Uncertainty and how they therefore promise to transform our economic systems in radical ways ?
Uncertainties in economics are like
1) not knowing who we are dealing with ( Identity Management)
2) not having visibility into a transaction ( Asset Tracking)
3) not having recourse if things go wrong. (Reneging on deals )
Using Blockchain, we can create shared reality across non-trusting entities.
All of these nodes in the network do not need to know each other or trust each other, because all of those have ability to monitor and validate the chain for themselves.
Blockchain is persistent, transparent, public append only ledger.
It does this through mechanism creating consensus between different parties that need not to trust.
Industries that are using Blockchain
- Supply Chain
- Trade Finance
- Healthcare
- Identify Access Management
- Banking
Sunday, June 17, 2018
Express JS
Express JS is flexible NODE.JS web application framework that provides a robust set of features to develop mobile and web applications.
It also facilitates the rapid development of Node based Web Applications.
Features of Express JS
- Allows setting up of middle-ware to respond to HTTP Requests.
- Defines a routing table which is used to perform different actions based on HTTP Method and URL
Pre-Requisites
1. Node JS
2. MS SQL Database (for demo - any database can be used)
Step-1
Step 1: Create a package.json file.
{
"name": "<Application Name>",//e.g. – node_app
"version": "0.0.0",
"description": "<Description about your application>",
"main": "server.js",
"dependencies": {
"express": "4.14.0",
"body-parser": "1.15.2",
"mssql":"3.3.0"
},
"scripts": {
"start": "node server.js"
},
"author": {
"name": "<Your Name>",
"email": "<Your Email>"
}
}
Step-2
Step 2: Create server.js file.
//Initiallising node modules
var express = require("express");
var bodyParser = require("body-parser");
var sql = require("mssql");
var app = express();
// Setting Base directory
app.use(bodyParser.json());
//CORS Middleware
app.use(function (req, res, next) {
//Enabling CORS
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, contentType,Content-Type, Accept, Authorization");
next();
});
//Setting up server
var server = app.listen(process.env.PORT || 8080, function () {
var port = server.address().port;
console.log("App now running on port", port);
});
//Initiallising connection string
var dbConfig = {
user: "<username>",
password: "<password>",
server: "<severName>",
database: "<database",
port: "<port>",
requestTimeout: '10000',
debug: true,
dialect: "mssql",
options: {
encrypt: true // Use this if you're on Windows Azure
}
};
var pool = function(){
var conn = new sql.Connection(dbConfig, function(err){
var request = new sql.Request(conn);
//console.dir(request);
return request;
});
return conn;
}
//Function to connect to database and execute query
var executeQuery = function(res, query){
var dbConn = new sql.Connection(dbConfig);
dbConn.connect().then(function () {
var request = new sql.Request(dbConn);
request.query(query).then(function (recordSet) {
//console.log(recordSet);
res.send(recordSet);
dbConn.close();
}).catch(function (err) {
console.log(err);
dbConn.close();
});
}).catch(function (err) {
console.log(err);
});
}
app.get("/api/dpc", function(req , res){
var query = "select count(*) as count from [schema].[table]";
executeQuery(res,query);
});
Step -3
npm install
Step-4
node server.js
The node server will start running into port number 8080 with corresponding API Routes; you can point to the below URL to test the application.
Node JS
Node.JS is powerful JavaScript framework built on top of Google Chrome's JS V8 Engine.
It is used to develop I/O intensive web applications like video streaming sites, single-page applications, etc.. Node.JS is open source and used by thousands of developers around the world.
Advantages
- Quick & easy development
- High performance
- Run on single thread to handle multiple concurrent requests
- Easy to write API and interaction code
- Streaming support
- Monitoring possibilities
- Authentication support
- Lightweight, fast, and scalable
Saturday, June 16, 2018
Micro Service Introduction
A microservice is a single self-contained unit which, together with many others, makes up a large application. By splitting app into small units every part of it is independently deployable and scalable, can be written by different teams and in different programming languages and can be tested individually.
PROs of Microservices architecture:
- The application takes lesser time to start, which increases developers productivity and speeds up deployments.
- The system can be scaled easily and boost system performance.
- Each service can be deployed without affecting other services, which allows deployment of new versions of services frequently.
- Microservices are independent of each other and have a specific role. Changes made to one microservice does not affect other.
- No restriction of technology in developing any service, there by making system technologically independent.
CONs of Microservices:
- Deployment complexity increases as the need to manage a system comprised of many different service types.
- The developer needs to handle complexity for creating separate distributed system.
Microservices versus monolithic architecture when application grows
Monolithic
- Understanding huge code base becomes difficult, especially for new developers.
- Large code files make development environment slow like IDE.
- Changing technology or language becomes complicated as the code base is tightly coupled.
- CI/CD becomes challenging and time-consuming and needs a dedicated team to manage it.
Microservices
- Microservices are small and specific to business requirements.
- Microservices are loosely coupled and can be easily developed and deployed.
- Development can be done using different technologies.
- Microservices can be built with new technology stack enabling faster development cycle.
- Microservices can be easily scaled on demand.
Why Microservices with Node.JS
- Productivity – Node.js uses NPM (node package manager) which comes up with tons of ready to use modules which speed up the development process. Node.js uses javascript as interface language so that same language can be used for back end and front end. This saves lots of development time.
- Performance – Node.js event driven I/O model along with microservices strategy which can handle an extreme amount of load with lesser response time.
- Developer Friendly – Node.js has vast community support and is backed by millions of developers across the globe. Node package manager (NPM) contains more than 4 million ready to use modules which serve as heaven for developers. Node.js enables faster development of applications which are easily scaleable, there by making the developer happy through out application development life cycle.
Node.js supports multiple Microservices framework which enables development of application based on microservices strategy. Most popular among them are Senaca js. Senaca js provides a complete environment for the development of the microservice based application.
x
Saturday, March 24, 2018
Java, J2EE Training with real time projects
15 years of real time experience with Java, J2EE technologies
Core Java, JSP, Servlets, Struts, JSF
Spring, Spring MVC
Hibernate
Web Services (SOAP and REST)
Micro Services with SpringBoot
Angular JS and Angular 2+
Mongo DB (No SQL)
Hadoop (Big Data)
Azure and AWS
Kubernetes and Docker
Core Java, JSP, Servlets, Struts, JSF
Spring, Spring MVC
Hibernate
Web Services (SOAP and REST)
Micro Services with SpringBoot
Angular JS and Angular 2+
Mongo DB (No SQL)
Hadoop (Big Data)
Azure and AWS
Kubernetes and Docker
Subscribe to:
Posts (Atom)