Posts

Showing posts from February, 2024

CQRS

Image
  Stack doesn't follow CQS as it both deletes and reads at the same time. FileExists on left can become stale as file may be deleted after FileExists is called.  Code on right is safer method however it doesn't follow CQS. Scalability  Always far more Reads than writes, so the separation allows you to scale both independently.  For instance you could have 1 server for all writes and 10 servers for all reads. Performance You can add in customised performance enhancements to the read side such as caching and highly optimised queries. Simplicity Rather than have one model that is trying to account for reading and writing, CQRS allows you to have one optimised for the specific task of reading or writing.  Allows you to make different decisions for reads and writes. We've only model that does one thing well. CQRS solves a lot of problems with CRUD based interface. How many features are in this UI? The solution to solve a CRUD based interface is a Task based interface...

Interview prep links

 https://shahedbd.medium.com/principles-every-developer-should-know-c8f098fff8f5  https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed https://leetcode.com/discuss/general-discussion/662866/dp-for-beginners-problems-patterns-sample-solutions https://leetcode.com/discuss/general-discussion/969327/graph-algorithms-one-place-dijkstra-bellman-ford-floyd-warshall-prims-kruskals-dsu https://leetcode.com/problems/subarray-sum-equals-k/solutions/301242/General-summary-of-what-kind-of-problem-can-cannot-solved-by-Two-Pointers/ https://leetcode.com/problems/find-all-anagrams-in-a-string/solutions/92007/sliding-window-algorithm-template-to-solve-all-the-leetcode-substring-search-problem/ https://leetcode.com/problems/add-two-numbers/solutions/1340/a-summary-about-how-to-solve-linked-list-problem-c/ https://leetcode.com/discuss/general-discussion/494279/comprehensive-data-structure-and-algorithm-study-guide https://leetcode.com/discuss/career/449135/How-to-...