This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================================================== | |
source: https://dzone.com/articles/6-data-management-patterns-for-microservices-1 | |
Data Management Patterns for Microservices in Microservice Architecture | |
Database Per Service: | |
In this pattern, each microservice manages its own data. What this implies is that no other microservice | |
can access that data directly. Communication or exchange of data can only happen using a set of well-defined APIs. | |
Saga Pattern: | |
The Saga pattern is the solution to implementing business transactions spanning multiple microservices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Directive] | |
https://medium.com/swlh/anatomy-of-angular-attribute-directive-selector-a1d83a73242 | |
[Virtual Table] | |
https://github.com/diprokon/ng-table-virtual-scroll/blob/master/projects/ng-table-virtual-scroll/src/lib/fixed-size-table-virtual-scroll-strategy.ts | |
https://stackblitz.com/edit/nahgrin-virtual-scroll-table?file=src%2Fapp%2Ftable%2Ftable.component.ts | |
[Custom Form Control] | |
In order to register a Angular component as a Form Control we need to implement ControlValueAccessor and we tell angular that current | |
component is Custom form control by adding to NG_VALUE_ACCESSOR provider token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Referance : https://exploringjs.com/es6/ch_modules.html | |
Modules are singletons. Even if a module is imported multiple times, only a single “instance” of it exists. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- <router-outlet></router-outlet> --> | |
<div > | |
<div > | |
<mat-toolbar color="primary" class="example-hSeader"> | |
<button mat-icon-button > | |
<mat-icon>menu</mat-icon> | |
</button> | |
<h1>Application Portal</h1> | |
</mat-toolbar> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduction | |
As an Application Developer, you will lead IBM into the future by translating system requirements into the design and development of customized systems in an agile environment. The success of IBM is in your hands as you transform vital business needs into code and drive innovation. Your work will power IBM and its clients globally, collaborating and integrating code into enterprise systems. You will have access to the latest education, tools and technology, and a limitless career path with the world's technology leader. Come to IBM and make a global impact! | |
Your Role and Responsibilities | |
Who you are: | |
As MS Cloud Developer, you will be responsible to work with client and project managers to interpret business requirements with experience in building / architecting cloud based applications. Using Agile methodologies, you will be working in an innovative cross-functional team responsible for using cutting edge technologies to enhance and support web based analytical solutions. | |
What you will |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
referance : https://scotch.io/tutorials/understanding-hoisting-in-javascript | |
concept: all the declaration of var , let , const , function declaration, class declaration is moved up in run time. | |
var: variable hoisted and get (initialized) default value of "undefined" [variable declared without var are added to global scope] | |
let/ const : variable is hoisted but not assigned to any value | |
function declaration: function declaration is hoisted to upward. | |
Note: function and variable with same name then there will be preferance given to variable assignment over but when variable declaration | |
only then preferance given to function declaration no matter what order they are defined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduction: | |
Aggregation framework is just an alternative for a find method, here there is more controle given to find data in custom format by using | |
$match, $sort, $group, $project | |
This is type of data is only gathered for smaller audiance as we design database based on larger audiance | |
In aggregation we create a pipeline where in data of one operator is passed to other operator | |
Aggregation method: | |
for aggregation we use Aggrigate() method which takes multiple parameter in sequence. Note this aggregation method can take advantage of | |
mongodb indexes. | |
Note: for this tutorial persons.json is used |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>Introduction | |
Indexes are to optimize read, update and delete operation. | |
Indexes load a extra funcnionality while inserting data into DB, mongoDb update indexes whenever a record in inserted | |
db.contacts.getIndexes() // to get all the indexes | |
> Why index are needed | |
By default MongoDB do COLLECTION lookup while read, update and delete operation which is time consuming in sense that | |
Thare is unknown number of records that match condition | |
records position is unknown to mongoDB , HENCE mongoDB iterate over each document looking for matching condition | |
Solution : we can create an index on the column which is frequently used to access records. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Delete one or many items from collection > db.collection.deleteOne/deleteMany(--findCondition--) | |
Delete Collection > db.collection.deleteMAny({}) | |
Delete Entire Collection [Admin task] >>>> db.collection.drop() | |
Delete entire Database [Admin TAsk] >>>> db.deleteDatabase() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>$set Operator | |
this is used to add update an existing field or add a new field | |
Sysntax : db.collection.updateOne/updateMany({--findQuery--},{$set:{fieldName:"value"}}) | |
> $inc Operator for Increment and Decrement | |
this isus ed to increment / decrement the value | |
Systax : db.collection.updateOne/updateMany({--findQuery--},{$set:{fieldName:"value"} , $inc:{age: INCREMENT_VALUE}}) | |
Note: $inc can be combined with other operator | |
IMP : You can not put $set and $inc on same field , it will throw an error ie updating and incrementing age will cause an error |
NewerOlder