Friday, December 20, 2019

Blockchain

A blockchain is a growing list of records, called blocks, that are linked using cryptography. Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data. At its most basic level, blockchain is literally just a chain of blocks, but not in the traditional sense of those words. When we say the words “block” and “chain” in this context, we are actually talking about digital information (the “block”) stored in a public database (the “chain”).
Blockchain is a cryptographically secured, time-stamped, public and distributed database of every bitcoin transaction that has ever occurred on the network. "Distributed" here means that the information in the blockchain is broadcast to and recorded by every node in the network. There is no one central database. Any user can refer to this list of transactions and check exactly what how many bitcoins have ever belonged to any specific address at any point in time. This way the system is transparent, double-spending is prevented, and there is no need for a trusted central authority.
The goal of blockchain is to allow digital information to be recorded and distributed, but not edited. That concept can be difficult to wrap our heads around without seeing the technology in action, so let’s take a look at how the earliest application of blockchain technology actually works.
Blockchain technology was first outlined in 1991 by Stuart Haber and W. Scott Stornetta, two researchers who wanted to implement a system where document timestamps could not be tampered with. But it wasn’t until almost two decades later, with the launch of Bitcoin in January 2009, that blockchain had its first real-world application.

Friday, November 1, 2019

Integrate Qlik Sense with Web Application

Qlik Sense apps, sheets and visualizations can be embedded in for example:
  • Portals
  • Web applications
  • Intranet and Extranet sites
There are different ways of embedding the Qlik Sense content:
  • iFrame integration using the URL Integration APIs
  • Div integration using the JavaScript libraries
  • Standard Qlik Sense charts and custom visualization extensions can be created programmatically without having to be built in the Qlik Sense UI first, using the qlik-visual web component
Mashups overview
In the context of web development, a mashup is a web page or web application that uses content from more than one source to create a single new service displayed in a single graphical interface.
The Capability APIs enable you to easily and quickly integrate with your Qlik Sense objects to produce enriched results that were not necessarily the original reason for producing the source app in Qlik Sense. You can reuse Qlik Sense visualizations, including your custom extensions, and you can also make use of Qlik Sense data and calculations.
By using active content, your visualizations are updated when state changes. You can also subscribe to data and change the state through the visualizations.
In short it works like the following:
    You open a WebSocket to Qlik associative engine using the qlik.openApp method.
    Objects use the same WebSocket, that is the same session, which means they are connected.
    Qlik Sense objects work just as they do in the Qlik Sense client.

Tuesday, October 22, 2019

Qlik

Qlik (formerly known as Qliktech) is a software company whose main products are QlikView and Qlik Sense, both software for business intelligence and data visualization.
Qlik View:
QlikView is a data analysis and visualization tool which enables users to fetch, integrate, process and analyze data from varied sources. We can use it for developing data models, analytical applications, dashboards, visualizations to create analytical reports and deliver it to end-users via Access point. Through the access point, end-users can access data, carry out searches, create data models, associations, visualizations etc. to analyze data and discover data trends.
Features of QlikView
    Dynamic BI ecosystem (Interaction with dynamic apps and dashboards)
    Default and custom connectors
    Data visualizations
    Capable of building guided analytics applications and dashboards
    Guided and advanced analytics

Qlik Sense:
Qlik Sense is a self-service data discovery and analysis tool which focuses on ease of use for the user. It provides a modern and interactive user interface where you can use the tools for modeling and managing data, creating visualizations, layouts, and stories. It is not very technical in its approach and thus very user-friendly.
Features of Qlik Sense:
    Smart search options like Google and associative functions
    Fast and reliable connections to multiple data sources
    Drag and drop visualizations
    Generate personalized reports and detailed, interactive dashboards
    Self-service data discovery

Friday, September 6, 2019

HttpClient - a closer look (C#.Net)

HttpClient is the new and improved way of doing HTTP requests and posts, having arrived with .Net Framework 4.5. It provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
HttpClient is preferred over HttpWebRequest due to async methods available out of the box and you would not have to worry about writing begin/end methods. Basically when you use async call (using either of the class), it will not block the resources waiting for the response and any other request would utilize the resources to make further calls. Another thing to keep in mind that you should not be using HttpClient in the 'using' block to allow reuse of same resources again and again for other web requests.
Recommend use:
  • If all the operations for a service share the same set of default headers, then have an instance of HttpClient for each endpoint that your application is communicating to.
  • If an endpoint requires different header for each HTTP method, then you’ll need to create an instance of HttpClient for each combination of verb+ endpoint.
These client classes should be made Singleton across the application or the HttpClient variable should be declared private static readonly within the Client class. This will allow you to:
  • Benefit from the performance optimizations provided by connection pooling;
  • Avoid running out of available ports due to connections in TIME_WAIT state if the server gets heavy load;
  • Use default BaseAddress and HTTP Headers for each service your application integrates to
If you are getting either below errors, you may need to check the default security protocol used by HttpClient:
  • One or more errors occurred.
  • An error occurred while sending the request.
  • The underlying connection was closed: An unexpected error occurred on a receive.
  • The client and server cannot communicate, because they do not possess a common algorithm.
To resolve this issue, you can use:
using System.Net;
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
As,
  • It needed for .Net 4.5 because Tls12 is not a default protocol.
  • You need to write the above code only once within the application. (For example within Global.asax > Application_Start within Web application or equivalent in Winforms application)
  • For .Net 4.6 and above, Tls12 is a default protocol so it is not needed.

Wednesday, August 14, 2019

Data Warehouse vs Database

Data warehouses and Databases are both relational data systems, but were built to serve different purposes. A data warehouse is built to store large quantities of historical data and enable fast, complex queries across all the data, typically using Online Analytical Processing (OLAP). A database was built to store current transactions and enable fast access to specific transactions for ongoing business processes, known as Online Transaction Processing (OLTP).
ParameterDatabaseData Warehouse
PurposeIs designed to recordIs designed to analyze
Processing MethodThe database uses the Online Transactional Processing (OLTP)Data warehouse uses Online Analytical Processing (OLAP)
UsageThe database helps to perform fundamental operations for your businessData warehouse allows you to analyze your business
Tables and JoinsTables and joins of a database are complex as they are normalizedTable and joins are simple in a data warehouse because they are denormalized
OrientationIs an application-oriented collection of dataIt is a subject-oriented collection of data
Storage limitGenerally limited to a single applicationStores data from any number of applications
AvailabilityData is available real-timeData is refreshed from source systems as and when needed
UsageER modeling techniques are used for designingData modeling techniques are used for designing
TechniqueCapture dataAnalyze data
Data TypeData stored in the Database is up to dateCurrent and Historical Data is stored in Data Warehouse May not be up to date
Storage of dataFlat Relational Approach method is used for data storageData Ware House uses dimensional and normalized approach for the data structure Example: Star and snowflake schema
Query TypeSimple transaction queries are usedComplex queries are used for analysis purpose


Saturday, July 20, 2019

Angular 8 Features

Angular 8 was released on May 28, 2019. Angular is the most popular platform for developing client-side (front-end) mobile and desktop web apps or SPAs. With the new release, it enabled many major partner launches such as NativeScript (a framework for building native mobile apps with Angular), Angular Console (console for running Angular projects on your system),@angular/fire (for integrating Firebase with Angular) and StackBlitz (an online IDE for Angular) along with new features Differential loading for all application code, Dynamic imports for lazy routes, Web workers, TypeScript 3.4 support, and Angular Ivy as an opt-in preview.
Preview of Ivy
A preview version of Ivy is now available for testing. Ivy is a new rendering engine that will produce smaller bundle sizes. But it's not recommended to start using it in production not just yet. Angular Ivy opt-in preview includes:
  • Generated code that is easier to read and debug at runtime.
  • Faster re-build time.
  • Improved payload size.
  • Improved template type checking.
  • Backwards compatibility.
TypeScript 3.4
Angular 8.0 now supports TypeScript 3.4, and even requires it.
Web Workers
Angular CLI 8, web workers are taken into consideration when building the production bundles which helps increase the performance. Angular CLI 8 provides now one bundle for every web worker.
Differential loading
With differential loading, two bundles are created when building for production: a bundle for modern browsers that support ES2015+ and a bundle for older browsers that only support the ES5 version of JavaScript. The correct bundle will be loaded automatically by the browser, thanks to the support of ES6 modules in newer browsers.
Lazy Loading
The Angular Router has always supported lazy loading but now wiht Angular 8 the support for dynamic EcmaScript imports is added.

Tuesday, June 11, 2019

AWS Fargate

AWS Fargate is a compute engine for Amazon ECS that allows you to run containers without having to manage servers or clusters. With AWS Fargate, you no longer have to provision, configure, and scale clusters of virtual machines to run containers. This removes the need to choose server types, decide when to scale your clusters, or optimize cluster packing. AWS Fargate removes the need for you to interact with or think about servers or clusters. Fargate lets you focus on designing and building your applications instead of managing the infrastructure that runs them.

Amazon ECS has two modes: 
  • Fargate launch type
  • EC2 launch type
With Fargate launch type, all you have to do is package your application in containers, specify the CPU and memory requirements, define networking and IAM policies, and launch the application. EC2 launch type allows you to have server-level, more granular control over the infrastructure that runs your container applications. 
With EC2 launch type, you can use Amazon ECS to manage a cluster of servers and schedule placement of containers on the servers. Amazon ECS keeps track of all the CPU, memory and other resources in your cluster, and also finds the best server for a container to run on based on your specified resource requirements. You are responsible for provisioning, patching, and scaling clusters of servers. You can decide which type of server to use, which applications and how many containers to run in a cluster to optimize utilization, and when you should add or remove servers from a cluster. EC2 launch type gives you more control of your server clusters and provides a broader range of customization options, which might be required to support some specific applications or possible compliance and government requirements.

Link: https://aws.amazon.com/fargate/

Thursday, May 23, 2019

Visual Studio 2019

Version Number: 16.1
Summary of What's New in Visual Studio 2019:
  • IDE
    • Visual Studio IntelliCode is now generally available and comes installed with any workload that supports C#, C++, TypeScipt/JavaScript, or XAML.
    • We have added Per-Monitor Awareness support.
    • New codefixes are available for C#.
    • Most Recently Used has been added to Visual Studio Search.
  • Debugger
    • Source Link authentication improvements have been implemented.
    • We have added nuget.org symbol server to the list of default symbol servers.
    • Time Travel Debugging preview now includes exception stepping support.
  • Extensibility
    • We have removed the need for .resx file in VSIX projects (BuildTools update).
    • VSIX Project template now uses the new SDK version.
  • Performance
    • You can now experience optimizations to improve the solution load time of very large solutions.
    • Template authors can add custom tags to their templates.
    • There is now CodeLens support for custom UI.
    • We have provided updates to Language Server Protocol implementation.
    • We have updated behavior for switching between solutions, folders, and other views.

Thursday, April 11, 2019

Snowflake : Data Encryption

Snowflake provides best-in-class key management, which is entirely transparent to customers.

End-to-end encryption (E2EE) is a form of communication in which no one but end users can read the data. In Snowflake, this means that only a customer and the runtime components can read the data. No third parties, including Snowflake’s cloud computing platform or any ISP, can see data in the clear. E2EE minimizes the attack surface. In the event of a security breach of the cloud platform, the data is protected because it is always encrypted, regardless of whether the breach exposes access credentials indirectly or data files directly, whether by an internal or external attacker.

Client-side encryption provides a secure system for managing data in cloud storage. Client-side encryption means that a user encrypts stored data before loading it into Snowflake. The cloud storage service only stores the encrypted version of the data and never includes data in the clear.

Document Link: https://docs.snowflake.net/manuals/user-guide/security-encryption.html

Wednesday, March 27, 2019

Sharing Data Securely in Snowflake

Secure Data Sharing enables sharing selected objects (tables, secure views, and secure UDFs) in a database in your account with other Snowflake accounts. The principle participants in any data sharing relationship are the provider and one or more consumers. Snowflake enables the sharing of databases through shares, which are created by data providers and "imported" by data consumers. All database objects shared between accounts are read-only (i.e. the objects cannot be modified or deleted, including adding or modifying table data).
With Secure Data Sharing, no actual data is copied or transferred between accounts. All sharing is accomplished through Snowflake’s unique services layer and metadata store. This is an important concept because it means that shared data does not take up any storage in a consumer account and, therefore, does not contribute to the consumer’s monthly data storage charges. The only charges to consumers are for the compute resources (i.e. virtual warehouses) used to query the shared data.
In addition, because no data is copied or exchanged, Secure Data Sharing setup is quick and easy for providers and access to the shared data is instantaneous for consumers:
  • The provider creates a share of a database in their account and grants access to specific objects (i.e. tables, secure views, and secure UDFs) in the database. One or more accounts are then added to the share, which can include your own accounts (if you have multiple Snowflake accounts).
  • On the consumer side, a read-only database is created from the share. Access to this database is configurable using the same, standard role-based access control that Snowflake provides for all objects in the system.
Shares are named, first-class Snowflake objects that encapsulate all of the information required to share a database. Each share consists of:
  • The privileges that grants access to the database and the schema containing the objects to share.
  • The privileges that grant access to the specific objects (tables, secure views, and secure UDFs).
  • The consumer accounts with which the database and its objects are shared.
Once a database is created (in a consumer account) from a share, all the shared objects are accessible to users in the consumer account. Shares are secure, configurable, and controlled 100% by the provider account:
  • New objects added to a share become immediately available to all consumers, providing real-time access to shared data.
  • Access to a share (or any of the objects in a share) can be revoked at any time.
Link: https://docs.snowflake.net/manuals/user-guide/data-sharing-intro.html