Skip to main content

Posts

Adapter design pattern

Run the following code in Linqpad: void Main() { IBowler bowler = new Bowler(); IBatter allRounder = new AllRounderAdapter(bowler); allRounder.Bat(); } // IBowler and IBatter are incompatible interfaces internal interface IBowler { void Bowl(); } internal interface IBatter { void Bat(); } // Adapter internal class AllRounderAdapter : IBatter { private IBowler bowler; public AllRounderAdapter(IBowler bowler) { this.bowler = bowler; } public void Bat() { Console.WriteLine("Batting..."); } } // Adaptee internal class Bowler : IBowler { public void Bowl() { Console.WriteLine("Bowling..."); } } Output: Batting...

AWS Server Migration Service (SMS)

used to migrate 1000s of on-premises workloads to AWS used to migrate Hyper-V machines to AWS cloud used to migrate VMs (virtual machines) to AWS cloud we can automate/schedule/track incremental replications of live server volumes used for large scale server migrations

Amazon RedShift enhanced VPC routing

When Amazon RedShift enhanced VPC routing is enabled --> RedShift forces all COPY and UNLOAD traffic b/w cluster and data repositories via VPC When Amazon RedShift enhanced VPC routing is NOT enabled --> RedShift routes the traffic via internet (including traffic to other AWS services within AWS network)

AWS - Route53 routing policies

Multi-value answer - Use when you want to use ALL web servers randomly Geolocation - Use web servers based on user location Latency - Use when you want to route traffic to a region which provides the best latency Weighted - Use when you want to route traffic to multiple web servers in proportions