<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jainnehaa</title>
    <description>The latest articles on DEV Community by jainnehaa (@jainnehaa).</description>
    <link>https://dev.to/jainnehaa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F703032%2F3f8eb565-ded7-4d83-8c39-2e6dc40b66b7.png</url>
      <title>DEV Community: jainnehaa</title>
      <link>https://dev.to/jainnehaa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jainnehaa"/>
    <language>en</language>
    <item>
      <title>Microservices : From Principles to Patterns</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Thu, 18 Aug 2022 10:58:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/microservices-from-principles-to-patterns-2h4e</link>
      <guid>https://dev.to/jainnehaa/microservices-from-principles-to-patterns-2h4e</guid>
      <description>&lt;p&gt;&lt;strong&gt;Microservice Architecture&lt;/strong&gt; is a variant of the &lt;em&gt;Service Oriented Architecture&lt;/em&gt; structural style, which decompose an application into a collection of loosely-coupled services, interacting with each other using communication mechanisms like API. &lt;br&gt;
Microservices aims to provide Scalability, Decentralization, Availability, Isolation from Failures, Real-time Load Balancing etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IDEALS Principles&lt;/strong&gt; incorporates key &lt;strong&gt;Principles of Microservice-based Architecture&lt;/strong&gt;. It includes some of the SOLID principles. IDEALS stand for &lt;em&gt;&lt;u&gt;Interface Segregation : Deployability : Event-Driven : Availability Over Consistency : Loose-Coupling : Single Responsibility&lt;/u&gt;&lt;/em&gt;&lt;br&gt;
Adhering to these principles poses implementation challenges which are solved with the help of different design patterns.&lt;br&gt;
&lt;strong&gt;Design Patterns&lt;/strong&gt; are reusable solutions to commonly occurring problems within a given context in software design. Context here is microservices architecture. These patterns complement each other catering to different layers and problems in an application's architecture, as illustrated in image below :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4aqr7hwfcnyg1kvpcyse.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4aqr7hwfcnyg1kvpcyse.png" alt="Azure Architecture Design Patterns" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image Details can be referred at : &lt;a href="https://docs.microsoft.com/en-us/azure/architecture/microservices/design/patterns" rel="noopener noreferrer"&gt;docs.microsoft.com/microservices-design-patterns&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once we decide to Refactor our application from Monolithic to Microservices, first question in our minds is : &lt;em&gt;"So, what's the plan, how we gonna do it ?"&lt;/em&gt;, as we have an existing function business application in Prod along with multiple new requirements lined up.&lt;br&gt;
One way to do so is via &lt;strong&gt;Strangler Fig Pattern&lt;/strong&gt;. Strangler Fig, also called Strangler is named after any of numerous species of tropical figs (genus Ficus, family Moraceae) named for their pattern of growth upon host trees, which often results in the host's death. &lt;br&gt;
Strangler Fig supports &lt;u&gt;&lt;em&gt;incremental refactoring&lt;/em&gt;&lt;/u&gt; of a legacy application into a new (strangler) microservice application, by gradually replacing specific pieces of functionality with new services via &lt;u&gt;&lt;em&gt;steady and frequent releases&lt;/em&gt;&lt;/u&gt;. &lt;br&gt;
It consists of two types of services. One, those which implement functionality that previously resided in the monolith, which shrink over time. Second, services that implement new features. &lt;/p&gt;

&lt;p&gt;Another pattern for refactoring is &lt;strong&gt;Anti-Corruption Layer&lt;/strong&gt; which implements a &lt;em&gt;&lt;u&gt;façade between new and legacy applications&lt;/u&gt;&lt;/em&gt;, to ensure that the design of a new application is not limited by dependencies on legacy systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  I
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Interface Segregation Principle&lt;/strong&gt; suggests each microservice interface to attend to a specific need of a client's program. In other words, clients should not be forced to depend on an interface they don't use.&lt;br&gt;
One way to implement the principle is through an API gateway. &lt;br&gt;
&lt;strong&gt;API Gateway&lt;/strong&gt; address the problem of &lt;u&gt;&lt;em&gt;how an individual service is accessed&lt;/em&gt;&lt;/u&gt; in Microservices-based application by helping understand various communication protocols, translate them as needed, modify the request and response to suit the service and the client programs, etc. API gateway &lt;u&gt;&lt;em&gt;acts as the single entry point for all clients&lt;/em&gt;&lt;/u&gt; and handles requests by proxying or routing to the appropriate service or by fanning out to multiple services.&lt;/p&gt;

&lt;h2&gt;
  
  
  D
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Deployability Principle&lt;/strong&gt; acknowledges critical design decisions and technology choices developers need to make regarding packaging, deploying and running microservices.&lt;br&gt;
Deployability involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuring the runtime infrastructure including containers, pods, clusters, persistence, security and networking&lt;/li&gt;
&lt;li&gt;Scaling microservices in and out or runtime environment migration&lt;/li&gt;
&lt;li&gt;Expediting the commit+build+test+deploy process&lt;/li&gt;
&lt;li&gt;Minimizing downtime&lt;/li&gt;
&lt;li&gt;Synchronizing version changes&lt;/li&gt;
&lt;li&gt;Monitoring microservices health to identify and remedy faults&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each service is deployed as a set of service instances for throughput and availability.&lt;br&gt;
The Single Service per Host and Multiple Services per Host patterns are two different deployment strategies, addressing ways to package and deploy them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single Service per Host&lt;/strong&gt; deploys each single service instance on its own host. &lt;br&gt;
This pattern provides &lt;u&gt;&lt;em&gt;service instance isolation&lt;/em&gt;&lt;/u&gt; avoiding resource conflicts and making monitoring and management straightforward, but stands comparatively less efficient to Multiple Services per Host in resource utilization.&lt;br&gt;
&lt;strong&gt;Multiple Services per Host&lt;/strong&gt; run &lt;u&gt;&lt;em&gt;multiple instances of different services on a shared host&lt;/em&gt;&lt;/u&gt;. This could be done by deploying each service instance as a JVM process or by deploying multiple service instances in the same JVM.&lt;br&gt;
There are further refinements to this Single Service per Host pattern like &lt;strong&gt;Service Instance per VM Pattern&lt;/strong&gt; and &lt;strong&gt;Service Instance per Container Pattern&lt;/strong&gt;. &lt;br&gt;
&lt;strong&gt;Serverless deployment Pattern&lt;/strong&gt; is an alternative solution to those mentioned above.&lt;/p&gt;

&lt;h2&gt;
  
  
  E
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Event Driven Principle&lt;/strong&gt;&lt;br&gt;
One of the critical design decisions to make microservices fault-tolerant is to avoid cascading failures caused by downtimes of dependent services. &lt;br&gt;
Event-driven Principle helps in this aspect as the producer and consumers of the event are not tightly coupled. The messaging channel used for communication keeps both ends of it independent and hence keeps them loosely coupled. This principle improves reliability, scalability and throughput of the entire system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Event Sourcing&lt;/strong&gt; is a design pattern implementing this principle, which helps &lt;u&gt;&lt;em&gt;reliably, atomically update the database and send messages/events&lt;/em&gt;&lt;/u&gt;. For example, a service that participates in a saga (explained below) needs to atomically update the database and sends messages/events. Similarly, a service that publishes a domain event must atomically update an aggregate and publish an event, which can be done implementing Event Sourcing. &lt;/p&gt;

&lt;h2&gt;
  
  
  A
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Availability over Consistency&lt;/strong&gt;&lt;br&gt;
The CAP theorem essentially gives two options: Availability OR Consistency, along with partition tolerance. &lt;br&gt;
For microservices, the main strategy that enables the availability choice is &lt;u&gt;&lt;em&gt;data replication&lt;/em&gt;&lt;/u&gt;, which can be achieved via &lt;strong&gt;Service Data Replication pattern&lt;/strong&gt;, &lt;strong&gt;Command Query Responsibility Segregation (CQRS)&lt;/strong&gt; pattern etc. CQRS separates the design and implementation of operations that change data (commands) from the ones that only read data (queries).&lt;br&gt;
Message replication through &lt;strong&gt;Event Sourcing&lt;/strong&gt; Pattern (event-driven architecture) generally works on &lt;u&gt;&lt;em&gt;Eventual Consistency&lt;/em&gt;&lt;/u&gt;, keeping Availability over Consistency.&lt;/p&gt;

&lt;h2&gt;
  
  
  L
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Loose Coupling&lt;/strong&gt; is a coupling technique used to &lt;em&gt;&lt;u&gt;describe the degree and intent of interconnected but non-dependent components&lt;/u&gt;&lt;/em&gt; within an information system. Loosely coupled with other services - enables a team to work independently the majority of time on their service(s) without being impacted by changes to other services and without affecting other services.&lt;/p&gt;

&lt;p&gt;Several strategies can be used and combined to promote afferent (incoming) and efferent (outgoing) loose coupling. &lt;strong&gt;Afferent coupling&lt;/strong&gt; is a measure of how many other services use a specific service as Incoming and &lt;strong&gt;Efferent coupling&lt;/strong&gt; is a measure of how many different services used by the specific service as Outgoing.&lt;br&gt;
Single responsibility is the idea that enables modeling microservices that are not too large or too slim because they contain the right amount of &lt;u&gt;&lt;em&gt;cohesive functionality&lt;/em&gt;&lt;/u&gt;.&lt;/p&gt;

&lt;p&gt;Few Design Patterns promoting loose coupling are Database per Microservice, Saga, API Gateway, BFF, Saga etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backends for Frontends (BFF)&lt;/strong&gt; creates separate backend services for different types of clients, such as desktop and mobile. That way, a single backend service doesn't need to handle the conflicting requirements of various client types. This pattern can help &lt;u&gt;&lt;em&gt;keep each microservice simple, by separating client-specific concerns&lt;/em&gt;&lt;/u&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database per Microservice&lt;/strong&gt; suggests each microservice’s persistent data private to that service and accessible only via its API. A service’s transactions only involve its database. &lt;br&gt;
Here, tight coupling is being handled at database layer. &lt;br&gt;
Separate data store doesn't imply only a database for each service, rather &lt;u&gt;&lt;em&gt;Private-tables-per-service&lt;/em&gt;&lt;/u&gt;, &lt;u&gt;&lt;em&gt;Schema-per-service&lt;/em&gt;&lt;/u&gt; or &lt;u&gt;&lt;em&gt;Database-server-per-service&lt;/em&gt;&lt;/u&gt;, as per requirement.&lt;br&gt;
When we implement Database per Microservice, some business transactions span multiple services, hence need to implement transactions that span services arises, which is addressed yet another patter known as &lt;strong&gt;Saga Pattern&lt;/strong&gt;. &lt;br&gt;
Saga is &lt;u&gt;&lt;em&gt;a long lived transaction that can be broken up into transactions, but still executed as a unit, ensuring eventual consistency&lt;/em&gt;&lt;/u&gt;.&lt;br&gt;
Few other database related patters are &lt;strong&gt;API Composition&lt;/strong&gt; and &lt;strong&gt;Command Query Responsibility Segregation (CQRS)&lt;/strong&gt; pattern which provide ways to &lt;u&gt;&lt;em&gt;implement queries&lt;/em&gt;&lt;/u&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  S
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Single Responsibility Principle (SRP)&lt;/strong&gt; is about having cohesive functionality in an OO class. The notion of single responsibility can be extended to the &lt;u&gt;&lt;em&gt;cohesiveness of services within a microservice&lt;/em&gt;&lt;/u&gt;. The microservice architecture style dictates that the deployment unit should contain only one service or just a few cohesive services. If a microservice is packed with responsibilities, that is, too many not quite cohesive services, then it might bear the pains of a monolith.&lt;/p&gt;

&lt;p&gt;Here, we have seen only a bunch of design patterns with only few microservices principles. It is wider topic which cater to variety of domains, use-cases and challenges.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;References :&lt;/u&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://microservices.io/" rel="noopener noreferrer"&gt;microservices.io&lt;/a&gt;&lt;br&gt;
&lt;a href="https://martinfowler.com/" rel="noopener noreferrer"&gt;martinfowler.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/architecture/" rel="noopener noreferrer"&gt;docs.microsoft.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Microservices" rel="noopener noreferrer"&gt;wikipedia.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cs.cornell.edu/andru/cs711/2002fa/reading/sagas.pdf" rel="noopener noreferrer"&gt;cs.cornell.edu&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.lokajittikayatray.com/post/the-ideals-principles-every-microservice-developer-should-know" rel="noopener noreferrer"&gt;lokajittikayatray.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.infoq.com/articles/microservices-design-ideals/" rel="noopener noreferrer"&gt;infoq.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Interface_segregation_principle" rel="noopener noreferrer"&gt;wikipedia.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.britannica.com/plant/strangler-fig-tree" rel="noopener noreferrer"&gt;britannica.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.techopedia.com/definition/639/loose-coupling" rel="noopener noreferrer"&gt;techopedia.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/a/15289401" rel="noopener noreferrer"&gt;stackoverflow.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Image References :&lt;/u&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/architecture/microservices/images/microservices-patterns.png" rel="noopener noreferrer"&gt;docs.microsoft.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>architecture</category>
      <category>design</category>
      <category>refactoring</category>
    </item>
    <item>
      <title>Network Authentication Protocols</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Tue, 16 Aug 2022 18:23:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/network-authentication-protocols-2dk2</link>
      <guid>https://dev.to/jainnehaa/network-authentication-protocols-2dk2</guid>
      <description>&lt;p&gt;Authentication keeps invalid users out of databases, networks, and other resources. &lt;br&gt;
&lt;strong&gt;Authentication Protocols&lt;/strong&gt; are well defined, industry standard ways to validate the identity of remote clients/users (&lt;em&gt;Authentication&lt;/em&gt;) before granting them access to server data (&lt;em&gt;Authorization&lt;/em&gt;) and in monitoring network resources and information needed for billing of services (&lt;em&gt;Accounting&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;Different Authentication Protocols used to validate users are PAP, CHAP, Oauth 2, TACACS+, RADIUS, Kerberos, SAML, LDAP/Active Directory etc. These can be used simultaneously for different purpose.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Password authentication protocol (PAP):&lt;/strong&gt; &lt;br&gt;
It is one of the oldest authentication protocols deprecated now, yet used sometimes.&lt;br&gt;
In PAP, system &lt;em&gt;compares user credentials&lt;/em&gt; (username and password) to a database to validate. Since there is no encryption, it is least secure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenge-Handshake Authentication Protocol (CHAP):&lt;/strong&gt; &lt;br&gt;
CHAP &lt;em&gt;periodically reauthenticates&lt;/em&gt; users identity using a 3-way handshake. Each challenge is different from last version and verification is done even within the same session.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extensible authentication protocol (EAP)&lt;/strong&gt;: &lt;br&gt;
&lt;em&gt;Wireless&lt;/em&gt; networks and &lt;em&gt;point-to-point&lt;/em&gt; connections uses EAP. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kerberos&lt;/strong&gt;: &lt;br&gt;
Kerberos uses symmetric keys between client-server (secret-key cryptography), pulled from a centralized key distribution center known as &lt;em&gt;Key Distribution Center (KDC)&lt;/em&gt;. &lt;br&gt;
There are few drawbacks viz, the process is time-sensitive, so devices using the Kerberos must have relatively well-synced clocks. Also, it not advised to use this protocol for networks heavy on virtual hosting because every host requires its own set of Kerberos keys.&lt;br&gt;
Further, in 2020, Kerberos stopped working after a system update.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lightweight Directory Access Protocol (LDAP)&lt;/strong&gt;: &lt;br&gt;
The Lightweight Directory Access Protocol is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an &lt;em&gt;Internet Protocol (IP) network&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Organizations using LDAP stores information like user credentials (usernames, passwords), email addresses, printer connections and other static data within directories. &lt;br&gt;
LDAP works by binding an &lt;em&gt;LDAP user&lt;/em&gt; to an LDAP server. &lt;br&gt;
The client sends an operation request that asks for a particular set of information, such as user login credentials or other organizational data. &lt;br&gt;
The &lt;em&gt;LDAP server&lt;/em&gt; then processes the query based on its internal language, communicates with directory services if needed, and responds. &lt;br&gt;
When the client receives the response, it unbinds from the server and processes the data accordingly.&lt;/p&gt;

&lt;p&gt;LDAP is the underlying protocol for directory services and is leveraged in &lt;em&gt;Directory-as-a-Service (DaaS)&lt;/em&gt;, a cloud-based software-as-a-service (SaaS) user directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OAuth 2.0&lt;/strong&gt;:&lt;br&gt;
OAuth 2 is a way for users to allow websites and mobile apps to access their credentials without giving them the passwords, implemented by various sites viz Google, Facebook, Twitter etc. OAuth 2 works with &lt;em&gt;HTTP&lt;/em&gt;. It provides &lt;em&gt;access tokens&lt;/em&gt; to be applied to a third-party with the permission of the resource owner.&lt;br&gt;
One of the possible security risk with OAuth 2 is that it uses one account for multiple applications, so, if the main account is ever compromised, users risk compromising many more instances. Such an issue was faced by GitHub in 2020. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remote authentication dial-in user service (RADIUS)&lt;/strong&gt;: RADIUS system verifies credentials (username-password) provided by client by comparing it to data in a database. RADIUS provides centralized authentication, authorization, and accounting (AAA or Triple A) management. &lt;br&gt;
In RADIUS,&lt;br&gt;
&lt;em&gt;Authentication&lt;/em&gt; data flows from NAS (Network Access Server) to RADIUS server in Access-Request packets.&lt;br&gt;
&lt;em&gt;Authorization&lt;/em&gt; data flows from the RADIUS server to NAS in Access-Accept, Access-Reject, CoA-Request, and Disconnect-Request packets.&lt;br&gt;
&lt;em&gt;Accounting&lt;/em&gt; data flows from the NAS to the RADIUS server in Accounting-Requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Diameter&lt;/strong&gt; is derived from RADIUS and provides a framework for authentication and accounting messages. &lt;br&gt;
It is a &lt;em&gt;Peer-to-Peer (P2P)&lt;/em&gt; protocol. Peers can be statically configured or dynamically discovered.&lt;br&gt;
Extensibility is an important trait of the Diameter protocol. It supports a modular architecture with the base protocol and application-specific extensions. &lt;/p&gt;

&lt;p&gt;There are many other efficient and widely used authentication protocols like &lt;em&gt;SAML&lt;/em&gt; (XML based protocol), &lt;em&gt;TACACS&lt;/em&gt; (IP-based authentication), it's enhanced versions and various others.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Reference&lt;/u&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://datatracker.ietf.org/doc/html/rfc1334" rel="noopener noreferrer"&gt;datatracker.ietf.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://frontegg.com/blog/authentication#API-Authentication-Methods" rel="noopener noreferrer"&gt;frontegg.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.auvik.com/franklyit/blog/authentication-protocols/" rel="noopener noreferrer"&gt;auvik.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.sailpoint.com/identity-library/authentication-methods-used-for-network-security/" rel="noopener noreferrer"&gt;sailpoint.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.okta.com/identity-101/authentication-protocols/" rel="noopener noreferrer"&gt;okta.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.getkisi.com/blog/authentication-protocols-overview" rel="noopener noreferrer"&gt;getkisi.com/blog&lt;/a&gt;&lt;br&gt;
&lt;a href="https://jumpcloud.com/daas-glossary/directory-as-a-service-daas" rel="noopener noreferrer"&gt;jumpcloud.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/a/37707516" rel="noopener noreferrer"&gt;stackoverflow.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Authentication_protocol" rel="noopener noreferrer"&gt;Wikipedia - Authentication Protocol&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Point-to-Point_Protocol" rel="noopener noreferrer"&gt;Wikipedia - PPP&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol" rel="noopener noreferrer"&gt;Wikipedia - LDAP&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>protocols</category>
      <category>authentication</category>
      <category>authorization</category>
    </item>
    <item>
      <title>Web Accessibility Primer</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Sun, 14 Aug 2022 18:50:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/web-accessibility-primer-2f7d</link>
      <guid>https://dev.to/jainnehaa/web-accessibility-primer-2f7d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Web Accessibility&lt;/strong&gt; is designing and developing websites, tools and technologies such that people with disabilities can also &lt;em&gt;perceive, understand, navigate, interact and contribute&lt;/em&gt; on them.&lt;/p&gt;

&lt;p&gt;Web accessibility encompasses &lt;em&gt;auditory, cognitive, neurological, physical, speech and visual disabilities&lt;/em&gt; that could affect access to the Web.&lt;/p&gt;

&lt;p&gt;Web accessibility also benefits people without physical disabilities but with situational disabilities, socio-economic restrictions on bandwidth or speed etc, viz:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;people using &lt;em&gt;devices with small screens&lt;/em&gt;, different input modes, etc&lt;/li&gt;
&lt;li&gt;people with &lt;em&gt;temporary disabilities&lt;/em&gt; such as a broken arm or lost glasses&lt;/li&gt;
&lt;li&gt;people with &lt;em&gt;situational limitations&lt;/em&gt; such as in bright sunlight or noise around hindering listening to audio&lt;/li&gt;
&lt;li&gt;people using a &lt;em&gt;slow internet connection&lt;/em&gt; or having &lt;em&gt;limited or expensive bandwidth&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Accessibility is the practice of making websites usable by as many people as possible and is the right thing to do. Providing accessible sites is part of the law in some countries, which can open up some significant markets that otherwise would not be able to use your services or buy your products.&lt;/p&gt;

&lt;p&gt;Accessibility, Usability, and Inclusion are closely related aspects. &lt;br&gt;
&lt;strong&gt;Accessibility&lt;/strong&gt; addresses discriminatory aspects in user experience for disabilities.&lt;br&gt;
&lt;strong&gt;Usability&lt;/strong&gt; is about designing products to be effective, efficient, and satisfying. Usability practice and research often does not consider the needs of people with disabilities.&lt;br&gt;
&lt;strong&gt;Inclusion/Universal Design/Design For All&lt;/strong&gt; is about diversity and ensuring involvement of everyone to the greatest extent possible, addressing broad range of issues including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;accessibility for people with disabilities&lt;/li&gt;
&lt;li&gt;access to and quality of hardware, software, and Internet connectivity&lt;/li&gt;
&lt;li&gt;computer literacy and skills&lt;/li&gt;
&lt;li&gt;economic situation&lt;/li&gt;
&lt;li&gt;education&lt;/li&gt;
&lt;li&gt;geographic location&lt;/li&gt;
&lt;li&gt;culture&lt;/li&gt;
&lt;li&gt;age, including older and younger people&lt;/li&gt;
&lt;li&gt;language
Accessibility focuses on disability and does not try to address broader issues as Inclusion.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Implementing Accessibility is a topic of wide range. So, listing down only few strategies and tips to give a big picture on how to to implement it (based, on documentations and approaches adopted by various organizations)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Ensure readability when using color&lt;/u&gt;&lt;/em&gt; by highlighting content changing fonts to make to noticeable and readable by all including those with color blindness.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkyaits1k7yi5rt6mut8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkyaits1k7yi5rt6mut8.png" alt="Ensure readability when using color" width="713" height="89"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Avoid usage of color alone to convey information&lt;/u&gt;&lt;/em&gt;, instead provide additional identification that does not rely on color perception. For example, asterisk along with color to indicate required form fields, labels along with color in graphs&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu1ngbahyfa3zzye18070.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu1ngbahyfa3zzye18070.png" alt="Avoid usage of color alone to convey information" width="800" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;u&gt;&lt;em&gt;Descriptive hyperlink text usage&lt;/em&gt;&lt;/u&gt; to help recipients understand who use a screen reader or for anyone who would like to know exactly where the link will take them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;&lt;em&gt;Provide sufficient contrast between foreground and background&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmj732j0abxh1duko3gz5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmj732j0abxh1duko3gz5.png" alt="Contrast Sufficiency" width="800" height="161"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Create designs for different viewport sizes&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7aenr6ziedqal2camswf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7aenr6ziedqal2camswf.png" alt="Different Viewport Sizes Designs" width="730" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;u&gt;&lt;em&gt;Add descriptive text to images&lt;/em&gt;&lt;/u&gt; as with 'Alt Text' to help when an image won’t load or if a recipient can’t see the visual.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Ensure Forms are Keyboard Accessible&lt;/u&gt;&lt;/em&gt; : Users who cannot use a mouse, navigate web pages with the keyboard. Forms that use JavaScript to manipulate form data, set focus, change form elements or submit forms, can create interactions that only work with a mouse. Ensure that your web site forms can be understood and operated with the keyboard alone.&lt;br&gt;
Screen reader users navigate &lt;em&gt;using the Tab key&lt;/em&gt;. Although labels are announced when form inputs received keyboard focus, other text between the form controls is usually skipped. Be sure to include any instructions at the beginning of the form, or associate them with specific fields using aria-describedby.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Text to Speech&lt;/u&gt;&lt;/em&gt; : Text-to-speech (TTS) technologies read written text aloud, providing essential accommodations for users with certain impairments and is capable of synthesizing natural, human-like audio from virtually any piece of text, with applications ranging from in-home assistants (like Alexa and Google Home) to language-learning tools and screen readers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Video Captions&lt;/u&gt;&lt;/em&gt; are essential for people with disabilities and useful for all. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;u&gt;&lt;em&gt;Work using everyday language&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;u&gt;Speech to Text&lt;/u&gt;&lt;/em&gt; : Speech recognition can be used for dictating text in a form field as well as navigating to and activating links, buttons, and other controls. &lt;br&gt;
&lt;em&gt;Speech recognition&lt;/em&gt; is about recognizing words for speech-to-text (STT) transcription, virtual assistants and other speech user interfaces. This technology identifies who the speaker is, not the words they’re saying. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Reference&lt;/u&gt; :&lt;br&gt;
&lt;a href="https://www.w3.org/WAI" rel="noopener noreferrer"&gt;w3.org/WAI&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/What_is_accessibility" rel="noopener noreferrer"&gt;developer.mozilla.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Web_accessibility" rel="noopener noreferrer"&gt;wikipedia.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.microsoft.com/en-us/accessibility" rel="noopener noreferrer"&gt;microsoft.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RE4Y2lz" rel="noopener noreferrer"&gt;query.prod.cms.rt.microsoft.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://webaim.org/techniques/forms/" rel="noopener noreferrer"&gt;webaim.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.boia.org/blog/why-prioritize-text-to-speech-accessibility" rel="noopener noreferrer"&gt;boia.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.microsoft.com/en-in/accessibility/features?rtc=1&amp;amp;activetab=pivot_1:primaryr6" rel="noopener noreferrer"&gt;microsoft.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Image Resources&lt;/u&gt; :&lt;br&gt;
&lt;a href="https://www.w3.org/WAI/tips/designing/#provide-sufficient-contrast-between-foreground-and-background" rel="noopener noreferrer"&gt;Contrast Sufficiency&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3.org/WAI/tips/designing/#create-designs-for-different-viewport-sizes" rel="noopener noreferrer"&gt;Viewport sizes&lt;/a&gt;&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>inclusion</category>
      <category>usability</category>
    </item>
    <item>
      <title>Significance of Computer Specs : Processor &amp; Memory</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Sun, 14 Aug 2022 13:30:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/significance-of-computer-specs-processor-memory-3gg7</link>
      <guid>https://dev.to/jainnehaa/significance-of-computer-specs-processor-memory-3gg7</guid>
      <description>&lt;p&gt;Considering configurations mentioned in technical specifications for a typical laptop, this write-up would intend to explain meaning and significance for 2 parameters : Processor and RAM. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;# Processor :&lt;/strong&gt; &lt;br&gt;
    A processor or CPU is the brain of the computer, giving it the processing power.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example of a processor from &lt;strong&gt;AMD&lt;/strong&gt; :&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;AMD Ryzen™ 7 5825U (up to 4.5 GHz max boost clock, 16 MB L3 cache, 8 cores, 16 threads)&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
    Here, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;AMD Ryzen™ 7 5825U&lt;/em&gt; is of series - Cezanne (Zen 3, Ryzen 5000) Barcelo (Zen 3 architecture). AMD is a brand, Ryzen 7 one of the series amongst 3,6,7,9 etc. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;4.5 GHz max boost clock&lt;/em&gt; :&lt;br&gt;
&lt;em&gt;Clock Speed&lt;/em&gt; is the speed of a computer CPU, measured in hertz. One billion hertz per second = one gigahertz (GHz). It is a measure of frequency and is used to describe bus speeds and CPU clock speeds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;16 MB L3 cache&lt;/em&gt; : &lt;br&gt;
&lt;em&gt;Cache memory&lt;/em&gt; is a chip-based computer component that makes retrieving data from the computer's memory more efficient. It acts as a temporary storage area that the computer's processor can retrieve data from easily. Cache memory is sometimes called CPU memory or Hardware Cache.&lt;br&gt;
Cache is graded into different levels in increasing size order as :&lt;br&gt;
    &lt;em&gt;Level 1 (L1) &amp;lt; Level 2 (L2) &amp;lt; Level 3 (L3) &amp;lt; Level 4 (L4 - not very common)&lt;/em&gt;&lt;br&gt;
The more L2 and L3 memory available, the faster a computer can run. However, not a lot of physical space is allocated for cache. There is more space for RAM, which is usually larger and less expensive. &lt;br&gt;
&lt;em&gt;Storage Memory Hierarchy&lt;/em&gt; :&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d6dke9ndyjzpxw2rbfl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d6dke9ndyjzpxw2rbfl.jpg" alt="Storage Memory Hierarchy" width="800" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;8 cores&lt;/em&gt; :&lt;br&gt;
&lt;em&gt;Core&lt;/em&gt; is a processing unit within a CPU. CPUs can have multiple cores. More cores a processor has, the faster it can process information.&lt;br&gt;
Each CPU core has its own L1 cache, but may share L2 and L3 caches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;16 threads&lt;/em&gt; :&lt;br&gt;
&lt;em&gt;Threads&lt;/em&gt; are the virtual components or codes, which divides the physical core of a CPU into virtual multiple cores. A single CPU core can have up-to 2 threads per core.&lt;br&gt;
Hence, if a CPU is dual core (i.e., 2 cores) it will have 4 threads. &lt;br&gt;
And if a CPU is Octal core (i.e., 8 core) it will have 16 threads and vice-versa.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another example of a processor from &lt;strong&gt;&lt;em&gt;Intel&lt;/em&gt;&lt;/strong&gt; has configuration against similar parameters : &lt;br&gt;
    &lt;strong&gt;&lt;em&gt;Intel® Core™ i5-1240P (up to 4.4 GHz with Intel® Turbo Boost Technology, 12 MB L3 cache, 12 cores, 16 threads)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjc1o5n5jas5a13q34fhs.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjc1o5n5jas5a13q34fhs.PNG" alt="Intel Naming Convention" width="800" height="441"&gt;&lt;/a&gt;&lt;br&gt;
    &lt;em&gt;Image shows the naming convention adopted by Intel for it's processors&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;# RAM :&lt;/strong&gt;&lt;br&gt;
    &lt;strong&gt;Random Access Memory (RAM)&lt;/strong&gt; is the computer's short-term, working memory. The computer places data in the RAM when a program is currently using it to work on a task. Once you finish, the data is deleted from the RAM so the memory is available for other tasks. &lt;br&gt;
    The more RAM you have, the more programs you can have running at once and the faster the computer will respond. &lt;br&gt;
    When shopping for RAM, check to see what the maximum amount is that your motherboard and processor can support—RAM can only work to those limits.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example&lt;/em&gt; :&lt;br&gt;
&lt;strong&gt;&lt;em&gt;16 GB DDR4-3200 MHz RAM (2 x 8 GB)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;3200 MHz&lt;/em&gt; :&lt;br&gt;
RAM is measured by how many &lt;em&gt;cycles per second it can perform&lt;/em&gt;. For example, if RAM is rated at 3200 MHz, it performs 3.2 billion cycles per second.&lt;br&gt;
The more cycles your RAM can perform per second translates to how much data can be stored and read – making for smoother user experiences. &lt;br&gt;
There’s usually a direct correlation between higher DDR (Double Data Rate) RAM and the clock cycles those modules accommodate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;16 GB DDR4&lt;/em&gt; :&lt;br&gt;
RAM has evolved from DRAM to SDRAM and now to DDR.&lt;br&gt;
&lt;em&gt;Dynamic Random-Access Memory (DRAM)&lt;/em&gt;, introduced in the 1970s, is an asynchronous memory and not regulated by a clock. This posed a problem in organizing data as it comes in so it can be queued for the process it’s associated with. Also, DDR being asynchronous could work as fast with processors that were just getting faster.&lt;br&gt;
&lt;em&gt;Synchronous Dynamic Random Access Memory (SDRAM)&lt;/em&gt; is synchronous and relies on a clock to synchronize signals, creating predictable orderly cycles of data fetches and writes. However, SDRAM transfers data on one edge of the clock. &lt;br&gt;
DDR SDRAM means that this type of SDRAM fetches data on both the leading edge and the falling edge of the clock signal that regulates it, thus the name &lt;em&gt;DDR (Double Data Rate)&lt;/em&gt;. Prior to DDR, RAM would fetch data only once per clock cycle.&lt;br&gt;
DDR is not flash memory like the kind that is used for Solid State Drives (SSDs), Secure Digital (SD) cards, or Universal Serial Bus (USB) drives. DDR memory is volatile, which means that it loses everything once power is removed.&lt;br&gt;
DDR has faster transfer rates and high capacity. &lt;br&gt;
DDR has progressed from DDR to &lt;em&gt;DDR2&lt;/em&gt;, &lt;em&gt;DDR3&lt;/em&gt;, and now &lt;em&gt;DDR4 SDRAM&lt;/em&gt; (as in Table below). &lt;br&gt;
&lt;em&gt;DDR2&lt;/em&gt; – DDR4 evolved to require lower supply voltages saving power and some changes to increase the speed. &lt;br&gt;
&lt;em&gt;DDR2&lt;/em&gt; SDRAM reduced operating voltage to 1.8 volts and a clock multiplier was added to the memory module to again double data transfer speeds while operating at the same bus speed. &lt;br&gt;
&lt;em&gt;DDR3&lt;/em&gt; RAM integrated a 4x clock multiplier, again doubling the memory transfer rate for the same bus speed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Comparison of SDRAM in order of release. Clock and transfer rates are approximate and vary by manufacturer :&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfmks9zaxs41xw4jvwkz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftfmks9zaxs41xw4jvwkz.png" alt="Comparison of SDRAM Releases" width="800" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;2 x 8 GB&lt;/em&gt; :
2 &lt;em&gt;slots&lt;/em&gt; of 8GB RAM each&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Reference&lt;/u&gt; :&lt;br&gt;
&lt;a href="https://www.amd.com/en/products/apu/amd-ryzen-7-5825u" rel="noopener noreferrer"&gt;amd-ryzen-7-5825u&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.amd.com/en/product/11601" rel="noopener noreferrer"&gt;amd.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.androidauthority.com/amd-cpu-guide-1222438/" rel="noopener noreferrer"&gt;androidauthority.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.bbc.co.uk/bitesize/guides/zmb9mp3/revision/1" rel="noopener noreferrer"&gt;bbc.co.uk&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.intel.com/content/www/us/en/processors/processor-numbers.html" rel="noopener noreferrer"&gt;intel.com/processor-numbers&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.intel.com/content/www/us/en/business/small-business/resources/small-business-computer-basics.html" rel="noopener noreferrer"&gt;intel.com/resources&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.intel.com/content/www/us/en/products/overview.html" rel="noopener noreferrer"&gt;intel.com/products&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ark.intel.com/content/www/us/en/ark/products/series/217839/12th-generation-intel-core-i9-processors.html" rel="noopener noreferrer"&gt;12th-generation-intel-core-i9-processors&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.techtarget.com/searchstorage/definition/cache-memory" rel="noopener noreferrer"&gt;techtarget.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/what-are-threads-in-computer-processor-or-cpu/" rel="noopener noreferrer"&gt;geeksforgeeks.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.wepc.com/tips/ram-speed/" rel="noopener noreferrer"&gt;wepc.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.microcontrollertips.com/understanding-ddr-sdram-faq/" rel="noopener noreferrer"&gt;microcontrollertips.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Image/Table Resource&lt;/u&gt; :&lt;br&gt;
&lt;a href="https://cdn.ttgtmedia.com/rms/onlineImages/storage-memory_hierarchy.jpg" rel="noopener noreferrer"&gt;Storage Memory Heirarchy&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.intel.com/content/dam/www/public/us/en/images/illustrations/RWD/10th-gen-sku-graphic-wht.png.rendition.intel.web.864.486.png" rel="noopener noreferrer"&gt;Intel Naming Convention&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.microcontrollertips.com/understanding-ddr-sdram-faq/" rel="noopener noreferrer"&gt;DDR and SDRAM Comparision&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cpu</category>
      <category>dram</category>
      <category>processor</category>
      <category>specs</category>
    </item>
    <item>
      <title>FaaS : Function as a Service</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Sat, 13 Aug 2022 09:00:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/faas-function-as-a-service-31bb</link>
      <guid>https://dev.to/jainnehaa/faas-function-as-a-service-31bb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Function as a service (FaaS)&lt;/strong&gt; is a cloud computing services providing a platform to customers to develop, run, and manage application functionalities, without the complexity of building and maintaining the infrastructure associated with developing and launching an app.&lt;/p&gt;

&lt;p&gt;Building an application following this model is one way of achieving a &lt;strong&gt;serverless architecture&lt;/strong&gt; and is typically used when building microservices applications. Use cases for FaaS are associated with &lt;em&gt;&lt;u&gt;"on-demand" functionality&lt;/u&gt;&lt;/em&gt; that enables the supporting infrastructure to be powered down and not incur charges when not in use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt; was the first FaaS offering by a large public cloud vendor, followed by Google Cloud Functions, Microsoft Azure Functions, IBM/Apache's OpenWhisk (open source) in 2016 and Oracle Cloud Fn (open source) in 2017.&lt;/p&gt;

&lt;p&gt;Let's understand how a function work with a serverless framework, taking &lt;strong&gt;Azure Functions&lt;/strong&gt; into consideration :&lt;/p&gt;

&lt;p&gt;Serverless Functions execute code—written in the language of one's choice with Azure Functions, with an &lt;u&gt;&lt;em&gt;event-driven compute&lt;/em&gt;&lt;/u&gt; experience. &lt;br&gt;
Azure Functions scales on demand and one pays only for the time your code is executed. &lt;br&gt;
Available as a managed service in Azure and Azure Stack, the open source Functions runtime also &lt;u&gt;&lt;em&gt;works on multiple destinations&lt;/em&gt;&lt;/u&gt;, including Kubernetes, Azure IoT Edge, on-premises, and even in other clouds.&lt;/p&gt;

&lt;p&gt;A Function should be written &lt;u&gt;&lt;em&gt;to perform a single job&lt;/em&gt;&lt;/u&gt; such as:&lt;br&gt;
    Saving a user to the database&lt;br&gt;
    Processing a file in a database&lt;br&gt;
    Performing a scheduled task&lt;br&gt;
&lt;u&gt;&lt;em&gt;Separation of concerns&lt;/em&gt;&lt;/u&gt; should be taken into consideration&lt;/p&gt;

&lt;p&gt;Few &lt;strong&gt;sample scenarios to implement Azure Functions&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa5wnw6a5ap4ajigdrq8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa5wnw6a5ap4ajigdrq8.png" alt="Sample scenarios set to implement Azure Functions" width="733" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anything that triggers an Azure Function to execute is regarded as an &lt;strong&gt;Event&lt;/strong&gt; or &lt;strong&gt;Trigger&lt;/strong&gt;. A trigger defines how a function is invoked and a function &lt;em&gt;&lt;u&gt;must have exactly one trigger&lt;/u&gt;&lt;/em&gt;. Triggers have associated data, which is often provided as the payload of the function.&lt;br&gt;
&lt;u&gt;&lt;em&gt;Few Triggers on Azure Functions are :&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An HTTP Trigger (e.g., for a REST API)&lt;/li&gt;
&lt;li&gt;A scheduled timer (e.g., run every 5 minutes)&lt;/li&gt;
&lt;li&gt;A Service Bus Queue trigger (e.g. a workitem from another Function)&lt;/li&gt;
&lt;li&gt;An IoT/Event Hub message (e.g., a message from a device or service)&lt;/li&gt;
&lt;li&gt;A Webhook fires (e.g., Github project update)
And many more..&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Binding&lt;/strong&gt; to a function is a way of declaratively connecting another resource to the function; bindings may be connected as &lt;em&gt;&lt;u&gt;input bindings, output bindings, or both&lt;/u&gt;&lt;/em&gt;. Data from bindings is provided to the function as parameters.&lt;br&gt;
You can mix and match different bindings to suit your needs. &lt;u&gt;&lt;em&gt;Bindings are optional&lt;/em&gt;&lt;/u&gt; and a function might have &lt;u&gt;&lt;em&gt;one or multiple&lt;/em&gt;&lt;/u&gt; input and/or output bindings.&lt;br&gt;
&lt;u&gt;&lt;em&gt;Like, Blob Storage, Queue, CosmosDB etc&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Triggers and bindings let you avoid hardcoding access to other services. &lt;br&gt;
Each function has its own code file and binding configuration file as &lt;strong&gt;function.json&lt;/strong&gt; where triggers are triggers are configured.&lt;br&gt;
(used along different languages like Java, Javascript, Python, C#).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "scriptFile": "azure-functions-example.jar",&lt;br&gt;
  "entryPoint": "com.example.Function.echo",&lt;br&gt;
  "bindings": [&lt;br&gt;
    {&lt;br&gt;
      "type": "httpTrigger",&lt;br&gt;
      "name": "req",&lt;br&gt;
      "direction": "in",&lt;br&gt;
      "authLevel": "anonymous",&lt;br&gt;
      "methods": [ "GET","POST" ]&lt;br&gt;
    },&lt;br&gt;
    {&lt;br&gt;
      "type": "http",&lt;br&gt;
      "name": "$return",&lt;br&gt;
      "direction": "out"&lt;br&gt;
    }&lt;br&gt;
  ]&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;AWS Lambda&lt;/strong&gt; has similar use case and can cater to file processing, stream processing, web applications, IoT backends and mobile backends.&lt;br&gt;
One such scenario is illustrated as below - &lt;u&gt;&lt;em&gt;File Processing&lt;/em&gt;&lt;/u&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bxty6tjduhxh3h73duv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1bxty6tjduhxh3h73duv.png" alt="AWS Lambda File Processing" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazon Simple Storage Service (Amazon S3) to trigger AWS Lambda data processing in real time after an upload, or connect to an existing Amazon EFS file system to enable massively parallel shared access for large-scale file processing.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;References :&lt;/u&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/azure-functions" rel="noopener noreferrer"&gt;docs.microsoft.com/azure-functions&lt;/a&gt;&lt;br&gt;
&lt;a href="https://aws.amazon.com/lambda/" rel="noopener noreferrer"&gt;aws.amazon.com/lambda/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.serverless.com/framework/docs" rel="noopener noreferrer"&gt;serverless.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://azure.microsoft.com/en-gb/solutions/serverless/" rel="noopener noreferrer"&gt;azure.microsoft.com/serverless/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Serverless_computing" rel="noopener noreferrer"&gt;Wikipedia - Serverless Computing&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Function_as_a_service" rel="noopener noreferrer"&gt;Wikipedia - FaaS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Microsoft_Azure" rel="noopener noreferrer"&gt;Wikipedia - Microsoft Azure&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Image Resources :&lt;/u&gt;&lt;br&gt;
&lt;a href="https://d1.awsstatic.com/product-marketing/Lambda/Diagrams/product-page-diagram_Lambda-RealTimeFileProcessing.a59577de4b6471674a540b878b0b684e0249a18c.png" rel="noopener noreferrer"&gt;AWS Lambda - File Processing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>faas</category>
      <category>azure</category>
      <category>aws</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Trade-offs of Distributed Data Stores : Theories and Theorems</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Sat, 13 Aug 2022 05:30:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/trade-offs-of-distributed-data-stores-theories-and-theorems-39mj</link>
      <guid>https://dev.to/jainnehaa/trade-offs-of-distributed-data-stores-theories-and-theorems-39mj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Distributed Data Store&lt;/strong&gt; refers to either a distributed database storing on a number of nodes (often in a replicated fashion)&lt;br&gt;
&lt;em&gt;OR&lt;/em&gt; &lt;br&gt;
a computer network storing information on a number of peer network nodes.&lt;/p&gt;

&lt;p&gt;Certain theorems describes potential limitations and trade-offs (say, in consistency) for distributed databases, CAP Theorem is one of them.&lt;br&gt;
The &lt;strong&gt;CAP Theorem&lt;/strong&gt; states that any distributed data store can provide only two of the following three guarantees :&lt;br&gt;
Consistency-Availability-Tolerance towards Network Partition&lt;br&gt;
This theorem is also named as Brewer's theorem after computer scientist Eric Brewer who gave it's hypothesis and the theorem was proved by Gilbert and Lynch.&lt;/p&gt;

&lt;p&gt;Considering a distributed system with more than one node, &lt;br&gt;
In a &lt;u&gt;&lt;em&gt;Consistent&lt;/em&gt;&lt;/u&gt; system, once a client writes a value to any of the nodes and gets a response, it expects to get the latest value next time it read back from any of the nodes.&lt;br&gt;
Being &lt;u&gt;&lt;em&gt;Available&lt;/em&gt;&lt;/u&gt; means all non-failing nodes continue to serve requests if the system is partitioned.&lt;br&gt;
System should function correctly despite arbitrary &lt;u&gt;&lt;em&gt;Network Partitions&lt;/em&gt;&lt;/u&gt;.&lt;/p&gt;

&lt;p&gt;It is important to note that Consistency in &lt;strong&gt;&lt;em&gt;CAP Theorem [Consistent-Available-Partition-tolerant]&lt;/em&gt;&lt;/strong&gt; isn't the same as in &lt;strong&gt;&lt;em&gt;ACID [Atomic-Consistent-Isolated-Durable]&lt;/em&gt;&lt;/strong&gt; database transactional properties.&lt;br&gt;
CAP comes from the distributed systems theory, while ACID belongs to database systems one.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;“C”&lt;/em&gt;&lt;/strong&gt; in the CAP Theorem refers to &lt;u&gt;&lt;em&gt;each node in the system having the same data&lt;/em&gt;&lt;/u&gt;, the &lt;strong&gt;&lt;em&gt;“C”&lt;/em&gt;&lt;/strong&gt; in ACID refers to a &lt;u&gt;&lt;em&gt;single node enforcing the same rules on every potential commit&lt;/em&gt;&lt;/u&gt;, such as the type of a field or a field not being null.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl6kbgxbj8p87hnx38bsc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl6kbgxbj8p87hnx38bsc.png" alt="CAP Theorem with Databases that chooses CA, CP and AP" width="473" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4w0kssdoddsuli2356f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4w0kssdoddsuli2356f.png" alt="Summary Table with characteristics of the selected NoSQL databases" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Database systems designed with traditional ACID guarantees in mind such as &lt;u&gt;&lt;em&gt;RDBMS&lt;/em&gt;&lt;/u&gt; choose consistency over availability, &lt;br&gt;
whereas systems designed around the BASE philosophy, common in the &lt;u&gt;&lt;em&gt;NoSQL&lt;/em&gt;&lt;/u&gt; movement for example, choose availability over consistency.&lt;br&gt;
&lt;strong&gt;Eventual consistency&lt;/strong&gt; is a consistency model used in distributed computing to achieve high availability, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value. Eventually-consistent services are often classified as providing &lt;strong&gt;&lt;em&gt;BASE semantics (Basically-available, Soft-state, Eventual consistency)&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;em&gt;Basically available&lt;/em&gt;&lt;/u&gt;: reading and writing operations are available as much as possible (using all nodes of a database cluster), but might not be consistent (the write might not persist after conflicts are reconciled, and the read might not get the latest write)&lt;br&gt;
&lt;u&gt;&lt;em&gt;Soft-state&lt;/em&gt;&lt;/u&gt;: without consistency guarantees, after some amount of time, we only have some probability of knowing the state, since it might not yet have converged&lt;br&gt;
&lt;u&gt;&lt;em&gt;Eventually consistent&lt;/em&gt;&lt;/u&gt;: If we execute some writes and then the system functions long enough, we can know the state of the data; any further reads of that data item will return the same value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consistency Model&lt;/strong&gt; specifies a contract between the programmer and a system, wherein the system guarantees that if the programmer follows the rules for operations on memory, memory will be consistent and the results of reading, writing, or updating memory will be predictable. Consistency models are used in distributed systems like distributed shared memory systems or distributed data stores (such as filesystems, databases, optimistic replication systems or web caching).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PACELC Theorem&lt;/strong&gt; is an extension to the CAP theorem. It states that an additional trade-off exists: between latency and consistency, even in absence of partitions, thus providing a more complete portrayal of the potential consistency trade-offs for distributed systems. &lt;/p&gt;

&lt;p&gt;PACELC Theorem states that in case of network partitioning (P) in a distributed computer system, one has to choose between availability (A) and consistency (C), but else (E), even when the system is running normally in the absence of partitions, one has to choose between latency (L) and consistency (C). PACELC reorders CAP into PAC and adds a statement about what happens when the network is present. That is, you may choose between increased latency and consistency (Else Latency or Consistency).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database PACELC ratings :&lt;/strong&gt;&lt;br&gt;
The default versions of &lt;u&gt;&lt;em&gt;DynamoDB&lt;/em&gt;&lt;/u&gt;, &lt;u&gt;&lt;em&gt;Cassandra&lt;/em&gt;&lt;/u&gt;, &lt;u&gt;&lt;em&gt;Riak&lt;/em&gt;&lt;/u&gt; and &lt;u&gt;&lt;em&gt;Cosmos DB&lt;/em&gt;&lt;/u&gt; are PA/EL systems: if a partition occurs, they give up consistency for availability, and under normal operation they give up consistency for lower latency.&lt;br&gt;
Fully ACID systems such as &lt;u&gt;&lt;em&gt;VoltDB/H-Store&lt;/em&gt;&lt;/u&gt;, &lt;u&gt;&lt;em&gt;Megastore&lt;/em&gt;&lt;/u&gt;, &lt;u&gt;&lt;em&gt;MySQL Cluster&lt;/em&gt;&lt;/u&gt; and &lt;u&gt;&lt;em&gt;PostgreSQL&lt;/em&gt;&lt;/u&gt; are PC/EC: they refuse to give up consistency, and will pay the availability and latency costs to achieve it. &lt;u&gt;&lt;em&gt;BigTable&lt;/em&gt;&lt;/u&gt; and related systems such as &lt;u&gt;&lt;em&gt;HBase&lt;/em&gt;&lt;/u&gt; are also PC/EC.&lt;br&gt;
&lt;u&gt;&lt;em&gt;Cosmos DB&lt;/em&gt;&lt;/u&gt; supports five tunable consistency levels that allow for tradeoffs between C/A during P, and L/C during E. Cosmos DB never violates the specified consistency level, so it's formally CP.&lt;br&gt;
Cosmos DB offers five well-defined levels. From strongest to weakest, the levels are:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Strong, Bounded staleness, Session, Consistent prefix, Eventual&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;u&gt;&lt;em&gt;MongoDB&lt;/em&gt;&lt;/u&gt; can be classified as a PA/EC system. In the baseline case, the system guarantees reads and writes to be consistent.&lt;/p&gt;

&lt;p&gt;A high availability requirement implies that the system must replicate data. As soon as a distributed system replicates data, a trade-off between consistency and latency arises.&lt;br&gt;
Thus, the choice of the system characteristics depends on the application and requirements. &lt;/p&gt;

&lt;p&gt;References :&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Distributed_data_store" rel="noopener noreferrer"&gt;Wikipedia - Distributed Data Stores&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Consistency_model" rel="noopener noreferrer"&gt;Wikipedia - Consistency Model&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/PACELC_theorem#cite_ref-csmsclvl_9-0" rel="noopener noreferrer"&gt;Wikipedia - PACELC&lt;/a&gt;&lt;br&gt;
&lt;a href="https://mwhittaker.github.io/blog/an_illustrated_proof_of_the_cap_theorem/" rel="noopener noreferrer"&gt;mwhittaker.github.io&lt;/a&gt;&lt;br&gt;
&lt;a href="https://edisciplinas.usp.br/pluginfile.php/2541318/mod_resource/content/1/TeoremaDeBrewer.pdf" rel="noopener noreferrer"&gt;edisciplinas.usp.br&lt;/a&gt;&lt;br&gt;
&lt;a href="https://medium.com/@skeller88/cap-and-acid-8bbf9b45941" rel="noopener noreferrer"&gt;medium.com/@skeller88&lt;/a&gt;&lt;br&gt;
&lt;a href="http://blog.thislongrun.com/2015/03/the-confusing-cap-and-acid-wording.html" rel="noopener noreferrer"&gt;blog.thislongrun.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Eventual_consistency" rel="noopener noreferrer"&gt;Eventual_consistency&lt;/a&gt;&lt;br&gt;
&lt;a href="https://ardalis.com/cap-pacelc-and-microservices/" rel="noopener noreferrer"&gt;ardalis.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels" rel="noopener noreferrer"&gt;Azure CosmosDB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Resources :&lt;br&gt;
&lt;a href="https://www.researchgate.net/profile/Joao-Lourenco-8/publication/282519669/figure/fig1/AS:281002732736529@1444007680733/CAP-theorem-with-databases-that-choose-CA-CP-and-AP.png" rel="noopener noreferrer"&gt;CAP-theorem-with-databases-that-choose-CA-CP-and-AP&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.researchgate.net/figure/Summary-table-with-characteristics-of-the-selected-NoSQL-databases_tbl1_282519669" rel="noopener noreferrer"&gt;Summary Table&lt;/a&gt;&lt;/p&gt;

</description>
      <category>captheorem</category>
      <category>pacelc</category>
      <category>distributedsystems</category>
      <category>nosql</category>
    </item>
    <item>
      <title>Quick Guide to Structural and Creational Design Patterns</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Wed, 10 Aug 2022 14:35:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/quick-guide-to-structural-and-creational-design-patterns-2gnn</link>
      <guid>https://dev.to/jainnehaa/quick-guide-to-structural-and-creational-design-patterns-2gnn</guid>
      <description>&lt;p&gt;This post is in continuation to &lt;a href="https://dev.to/jainnehaa/quick-guide-to-behavioral-design-patterns-32p0"&gt;Quick Guide to Behavioral Design Patterns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;USE-CASES Structural Patterns :&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Adapter&lt;/u&gt; 'adapts' one interface for a class into one that a client expects, both being incompatible.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Client -&amp;gt; Target Interface -&amp;gt; Adapter Class (for compatibility) -&amp;gt; Adoptee Interfaces&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Composite &lt;/u&gt;has &lt;strong&gt;&lt;em&gt;a tree structure of objects&lt;/em&gt;&lt;/strong&gt; where every object has the same interface. It lets clients treat individual objects and compositions of objects uniformly.&lt;br&gt;
1-to-many "has a" up the "is a" hierarchy&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Decorator &lt;/u&gt;&lt;strong&gt;&lt;em&gt;add responsibilities to objects&lt;/em&gt;&lt;/strong&gt; dynamically, without changing its interface.&lt;br&gt;
(Vocab Hint : 'Decorate' means 'Wrapping a gift, putting it in a box')&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Facade &lt;/u&gt;defines a new single &lt;strong&gt;&lt;em&gt;unified interface to&lt;/em&gt;&lt;/strong&gt; client to interact with &lt;strong&gt;&lt;em&gt;a complex subsystem&lt;/em&gt;&lt;/strong&gt; for existing objects&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Proxy &lt;/u&gt;creates an object representing another object. It uses an extra &lt;strong&gt;&lt;em&gt;level of indirection as a wrapper or delegation&lt;/em&gt;&lt;/strong&gt; to support distributed, controlled, or intelligent access.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Bridge &lt;/u&gt;&lt;strong&gt;&lt;em&gt;decouples an abstraction/interface&lt;/em&gt;&lt;/strong&gt; from its implementation so that the two can vary independently&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Private Class Data&lt;/u&gt; pattern seeks to &lt;strong&gt;&lt;em&gt;reduce exposure of attributes by limiting their visibility&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
It restricts accessor or mutator access. It allows the class designer to remove write privilege of attributes that are intended to be set only during construction, even from methods of the target class.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Flyweight &lt;/u&gt;a fine-grained &lt;strong&gt;&lt;em&gt;instance with common properties used for efficient sharing&lt;/em&gt;&lt;/strong&gt;. Flyweight explains when and how State objects can be shared.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;USE-CASES Creational Patterns :&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Singleton &lt;/u&gt;lets you ensure that &lt;strong&gt;&lt;em&gt;a class has only one instance, while providing a global access point to this instance&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
Encapsulated "just-in-time initialization" or "initialization on first use". &lt;/p&gt;

&lt;p&gt;There should be only one Singleton instance, whereas a Flyweight class can have multiple instances with different intrinsic states.&lt;br&gt;
The Singleton object can be &lt;strong&gt;&lt;em&gt;mutable&lt;/em&gt;&lt;/strong&gt;. Flyweight objects are &lt;strong&gt;&lt;em&gt;immutable&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To avoid tight coupling between the creator and the concrete products, &lt;u&gt;Factory Method&lt;/u&gt; lets &lt;strong&gt;&lt;em&gt;define an interface for creating an object but let subclasses decide which class to instantiate&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
Factory Method is based on &lt;strong&gt;&lt;em&gt;inheritance&lt;/em&gt;&lt;/strong&gt; but doesn’t require an initialization step.&lt;br&gt;
Single Responsibility Principle and Open/Closed Principle is achieved.&lt;/p&gt;

&lt;p&gt;In order to get rid of repeated initialization code, Prototype lets you copy existing objects without making your code dependent on their classes.&lt;br&gt;
&lt;u&gt;Prototype &lt;/u&gt;requires an initialization of the &lt;strong&gt;&lt;em&gt;cloned object&lt;/em&gt;&lt;/strong&gt;, which is without coupling to their concrete classes.&lt;br&gt;
This provides an alternative to inheritance when dealing with configuration presets for complex objects.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Abstract Factory&lt;/u&gt; defines &lt;strong&gt;&lt;em&gt;a Factory Method per product&lt;/em&gt;&lt;/strong&gt;. &lt;br&gt;
It produces families of related objects without specifying their concrete classes. A class delegates object creation to a factory object instead of instantiating concrete classes directly.&lt;br&gt;
Abstract Factory classes are often based on a set of Factory Methods, but you can also use Prototype to compose the methods on these classes.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Builder &lt;/u&gt;separates construction of a complex object from its representation, so that the same construction process can create different representations.&lt;br&gt;
The Builder pattern suggests that you &lt;strong&gt;&lt;em&gt;extract the object construction code out of its own class and move it to separate objects called builders&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Abstract Factories, Builders and Prototypes can all be implemented as Singletons.&lt;br&gt;
Many designs start by using Factory Method (less complicated and more customizable via subclasses) and evolve toward Abstract Factory, Prototype, or Builder (more flexible, but more complicated).&lt;/p&gt;

&lt;p&gt;&lt;u&gt;References :&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sourcemaking.com/design_patterns" rel="noopener noreferrer"&gt;sourcemaking&lt;/a&gt;&lt;br&gt;
&lt;a href="https://refactoring.guru/design-patterns" rel="noopener noreferrer"&gt;refactoring.guru&lt;/a&gt;&lt;br&gt;
&lt;a href="http://w3sdesign.com/index0100.php" rel="noopener noreferrer"&gt;w3sdesign&lt;/a&gt;&lt;br&gt;
&lt;a href="https://wiki.c2.com/?GangOfFour" rel="noopener noreferrer"&gt;wiki.c2&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Design_Patterns" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Behavioral_pattern" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Structural_pattern" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Software_design_pattern#Creational_patterns" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;/p&gt;

</description>
      <category>creational</category>
      <category>design</category>
      <category>java</category>
      <category>designpatterns</category>
    </item>
    <item>
      <title>Quick Guide to Behavioral Design Patterns</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Wed, 10 Aug 2022 14:10:00 +0000</pubDate>
      <link>https://dev.to/jainnehaa/quick-guide-to-behavioral-design-patterns-32p0</link>
      <guid>https://dev.to/jainnehaa/quick-guide-to-behavioral-design-patterns-32p0</guid>
      <description>&lt;p&gt;Design patterns are typical solutions to common problems in software design, which are tried and tested.&lt;br&gt;
Each pattern is like a &lt;u&gt;template&lt;/u&gt; that one can customize to solve a particular design problem in their code.&lt;br&gt;
However, we need to make a check before applying if it is truly required or simpler existing code would do better.&lt;/p&gt;

&lt;p&gt;Based on purpose, there are 3 categories of patterns :&lt;br&gt;
Behavioral : dealing with communication between objects&lt;br&gt;
Structural : define relationships among various entities (objects, classes etc), via composition, inheritance etc&lt;br&gt;
Creational : related to object creation mechanisms &lt;/p&gt;

&lt;p&gt;&lt;u&gt;USE-CASES :&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;When one needs to &lt;strong&gt;&lt;em&gt;decouple senders and receivers&lt;/em&gt;&lt;/strong&gt; : Chain of responsibility, Command, Mediator and Observer Patterns can be used.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Chain of Responsibility&lt;/u&gt; &lt;strong&gt;&lt;em&gt;handle or forward a request along a chain of potential receivers&lt;/em&gt;&lt;/strong&gt;, based on run-time conditions.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Command &lt;/u&gt;normally specifies a sender-receiver connection with a subclass.&lt;br&gt;
Polymorphism is important to Command. In this pattern, we can &lt;strong&gt;&lt;em&gt;encapsulate a request into a stand-alone&lt;/em&gt;&lt;/strong&gt; object that contains all information about the request &lt;strong&gt;&lt;em&gt;and pass is as method arguments&lt;/em&gt;&lt;/strong&gt;, log, delay or queue it's execution and support undoable operations.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Mediator&lt;/u&gt; reduces chaotic dependencies between objects. The pattern restricts direct communications between the objects and forces them &lt;strong&gt;&lt;em&gt;to collaborate only via a mediator object&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Observer &lt;/u&gt;distributes &lt;strong&gt;&lt;em&gt;communication by introducing observer and subject objects, with One-To-Many Relationship&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
It is similar to the publisher-subscriber pattern, but with the difference that there is no message broker or event bus as third party in Observer Pattern.&lt;br&gt;
Also, the observers and subject communicate directly, mostly synchronously and subject maintains a record of the observers.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Memento &lt;/u&gt;represents the internal state of an object at a particular time which can be &lt;strong&gt;&lt;em&gt;captured and restored later using encapsulation&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
&lt;em&gt;(Vocab Hint : 'Memento' means 'an object kept as a reminder of a person or event')&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Chain of responsibility and Command Pattern represent requests as objects.&lt;br&gt;
When we need to &lt;strong&gt;&lt;em&gt;pass requests as token and need to invoke at a later time&lt;/em&gt;&lt;/strong&gt;, Command and Memento Patterns can be used.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;State Pattern&lt;/u&gt; &lt;strong&gt;&lt;em&gt;alters an object's behavior when its state changes&lt;/em&gt;&lt;/strong&gt;. The State pattern is closely related to the concept of a &lt;strong&gt;&lt;em&gt;Finite-State Machine&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Strategy&lt;/u&gt; &lt;strong&gt;&lt;em&gt;encapsulates an algorithm inside a class&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Template &lt;/u&gt;method describes the skeleton of a program in parent class. It then &lt;strong&gt;&lt;em&gt;defer the exact steps of an algorithm to a subclass&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To select algorithm on run-time, Template method uses &lt;strong&gt;&lt;em&gt;inheritance&lt;/em&gt;&lt;/strong&gt;, while Strategy uses &lt;strong&gt;&lt;em&gt;composition&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;delegation&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Interpreter &lt;/u&gt;implement a &lt;strong&gt;&lt;em&gt;specialized computer language&lt;/em&gt;&lt;/strong&gt; to rapidly solve a specific set of problems.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Null Object&lt;/u&gt; is designed to act as a &lt;strong&gt;&lt;em&gt;default value&lt;/em&gt;&lt;/strong&gt; of an object.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Iterators &lt;/u&gt;are used to &lt;strong&gt;&lt;em&gt;access the elements of a collection sequentially without exposing its underlying representation&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Visitor &lt;/u&gt;defines a &lt;strong&gt;&lt;em&gt;new operation to a class without change&lt;/em&gt;&lt;/strong&gt;. It is a way to separate an algorithm from an object.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Iterator &lt;/u&gt;can &lt;strong&gt;&lt;em&gt;traverse a Composite&lt;/em&gt;&lt;/strong&gt;. Visitor can &lt;strong&gt;&lt;em&gt;apply an operation over a Composite&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;References :&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sourcemaking.com/design_patterns" rel="noopener noreferrer"&gt;sourcemaking&lt;/a&gt;&lt;br&gt;
&lt;a href="https://refactoring.guru/design-patterns" rel="noopener noreferrer"&gt;refactoring.guru&lt;/a&gt;&lt;br&gt;
&lt;a href="http://w3sdesign.com/index0100.php" rel="noopener noreferrer"&gt;w3sdesign&lt;/a&gt;&lt;br&gt;
&lt;a href="https://wiki.c2.com/?GangOfFour" rel="noopener noreferrer"&gt;wiki.c2&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Design_Patterns" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Behavioral_pattern" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Structural_pattern" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;br&gt;
&lt;a href="https://betterprogramming.pub/observer-vs-pub-sub-pattern-50d3b27f838c" rel="noopener noreferrer"&gt;Blogs&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern#Message_filtering" rel="noopener noreferrer"&gt;wikipedia&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>design</category>
      <category>behavioral</category>
      <category>patterns</category>
    </item>
    <item>
      <title>Quick Guide to YAML</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Fri, 05 Aug 2022 12:40:46 +0000</pubDate>
      <link>https://dev.to/jainnehaa/quick-guide-to-yaml-ncm</link>
      <guid>https://dev.to/jainnehaa/quick-guide-to-yaml-ncm</guid>
      <description>&lt;p&gt;&lt;strong&gt;YAML&lt;/strong&gt; is a &lt;em&gt;data serialization&lt;/em&gt; format and &lt;em&gt;processing model&lt;/em&gt;, used extensively for log files, Internet messaging, filtering and can be used in conjunction with other programming languages.&lt;br&gt;
In computing, serialization is the process of translating a data structure or object state into a format that can be stored or transmitted and reconstructed later possibly in a different computer environment. XML, JSON, BSON, YAML, MessagePack, protobuf are some commonly used data serialization formats.&lt;br&gt;
YAML is a superset of JSON, so JSON files are valid in YAML.&lt;br&gt;
YAML stands for '&lt;em&gt;&lt;strong&gt;Yet Another Markup Language&lt;/strong&gt;&lt;/em&gt;' or '&lt;strong&gt;&lt;em&gt;YAML Ain’t Markup Language&lt;/em&gt;&lt;/strong&gt;', which emphasizes that YAML is for data and not documents. &lt;br&gt;
YAML files can be added to source control, such as Github, so that changes can be tracked and audited.&lt;/p&gt;

&lt;p&gt;YAML uses &lt;u&gt;indentation &lt;/u&gt;to indicate nesting. Tab characters are not allowed, so &lt;u&gt;whitespaces &lt;/u&gt;are used instead. There are no usual format symbols, such as braces, square brackets, closing tags, or quotation marks. YAML files use a &lt;u&gt;.yml&lt;/u&gt; or &lt;u&gt;.yaml&lt;/u&gt; extension. &lt;br&gt;
The structure of a YAML file is a &lt;u&gt;map&lt;/u&gt; or a &lt;u&gt;list&lt;/u&gt;. It also contains &lt;u&gt;scalars&lt;/u&gt;, which are arbitrary data encoded in Unicode, that can be used as values such as strings, integers, dates, numbers, or booleans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;YAML parser&lt;/em&gt;&lt;/strong&gt; is used to read YAML documents and provide access to their content and structure. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;YAML emitter&lt;/em&gt;&lt;/strong&gt; is used to write YAML documents, serializing their content and structure. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;YAML processor&lt;/em&gt;&lt;/strong&gt; is a module that provides parser or emitter functionality or both. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;YAML Syntax Example :&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
# An employee record
name: Martin D'vloper
job: Developer
skill: Elite
employed: True
foods:
  - Apple
  - Orange
  - Strawberry
  - Mango
languages:
  perl: Elite
  python: Elite
  pascal: Lame
education: |
  4 GCSEs
  3 A-Levels
  BSc in the Internet of Things
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;Three dashes&lt;/u&gt; indicate start of a new YAML document. YAML supports multiple documents and compliant parsers will recognize each set of dashes as the beginning of a new one. The construct that makes up most of a typical YAML document is a &lt;u&gt;key-value pair&lt;/u&gt;.&lt;br&gt;
YAML supports nesting of key-values, and mixing types.&lt;/p&gt;

&lt;p&gt;YAML has been criticized for its significant whitespace, confusing features, insecure defaults, and its complex and ambiguous specification.&lt;br&gt;
Configuration files can execute commands or load contents without the users realizing it. Editing large YAML files is difficult, as indentation errors can go unnoticed. Truncated files are often interpreted as valid YAML due to the absence of terminators.&lt;/p&gt;

&lt;p&gt;The perceived flaws and complexity of YAML has led to the emergence of stricter alternatives such as &lt;em&gt;StrictYAML&lt;/em&gt; and &lt;em&gt;NestedText&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;References :&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.redhat.com/en/topics/automation/what-is-yaml" rel="noopener noreferrer"&gt;Redhat&lt;/a&gt;&lt;br&gt;
&lt;a href="https://yaml.org/" rel="noopener noreferrer"&gt;yaml.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://yaml.org/spec/history/2001-12-10.html" rel="noopener noreferrer"&gt;yaml.org&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/YAML" rel="noopener noreferrer"&gt;wiki&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.cloudbees.com/blog/yaml-tutorial-everything-you-need-get-started" rel="noopener noreferrer"&gt;blogs&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Heaps Usage : Heapify Vs Heap-Sort</title>
      <dc:creator>jainnehaa</dc:creator>
      <pubDate>Mon, 21 Feb 2022 07:50:47 +0000</pubDate>
      <link>https://dev.to/jainnehaa/heapify-vs-heap-sort-4do7</link>
      <guid>https://dev.to/jainnehaa/heapify-vs-heap-sort-4do7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Definition of Heap :&lt;/strong&gt; Heap is a Complete Binary Tree, which satisfy the property that parent node value is larger than child nodes' (in case of MAX-HEAP) or smaller (in case of MIN-HEAP). This property of Heap has to be followed by each node with it's child nodes at each level of tree.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Storage in memory :&lt;/strong&gt; Binary Tree is being stored in memory in form of array as data structure, following level traversal to order elements such that, for each index i as parent, children would be 2i+1 and 2i+2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heapify(Construct Heap)&lt;/strong&gt; is an approach (either top-down or bottom-up), which arranges elements in any array such that, when checked for any index i as parent, its child nodes values at index 2i+1 and 2i+2 would follow either MAX-HEAP or MIN-HEAP property. It doesn't sort array in ascending or descending order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heap-Sort :&lt;/strong&gt; Sort array in ascending or descending order. As name suggests, we are using Heap BT property here to rearrange array elements. Heap Sort is an application of Heap BT.&lt;/p&gt;

&lt;p&gt;Steps to sort an input array via Heap-Sort:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Arrange array elements in order as of MAX-HEAP or MIN-HEAP, using Heapify(Construct Heap) logic. (Logically it will follow Heap BT property, but storage wise it is still an array)&lt;/li&gt;
&lt;li&gt;Put a loop over array, start from root node, compare it with last leaf node, swap if required and delete leaf node. Insert deleted element in a different array. Follow this until all nodes are deleted. Now, when we delete any node in Heap, we need to do Heapify residual array as part of delete operation on Heap BT. And the deleted elements while insertion in array follows order as ascending (MIN-HEAP) or descending (MAX-HEAP). &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is similar to selection sort, which on comparison in each pass, places max/min element to final position and gets excluded in comparison in next pass.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
