RSS feed [root] /design /weblog



title search:


Thu Jan 25 22:38:50 GMT 2024


(google search) (amazon search)
download zip of files only

Sat Feb 24 12:45:36 GMT 2024 From /weblog/design/examples


System Design Interview Question: Design Spotify -[..]iew-question-design-spotify-4a8a79697dda

(google search) (amazon search)

Tue Jan 16 11:38:09 GMT 2024 From /weblog/design


Top Ten Software Architecture Mistakes -

Discussion about the balance of upfront design -[..]4/25/the-scatology-of-agile-architecture

There is no conflict in agile and architecture -[..]s-no-conflict-in-agile-and-architecture/

Experience of build instead of buy -[..]uy-one-companys-decision-to-go-it-alone/

Problem of too many layer -[..]/10/the-madness-of-layered-architecture/[..]are-architect-here-is-your-reading-list/

Sometime it is worth to build to throw -

Business Transactions
External Dependencies
Caching Strategy
Garbage Collection
Application Topology[..]s-to-capture-in-enterprise-applications/

invent a solution the majority of whose components depend on no others with those few components whose task it is to compose those other components being left largely to coordination roles. -[..]ting-started-with-big-data-architecture/

Twitter -[..]tter-handles-3000-images-per-second.html

Suning, more on HTTP -[..]oduct-details-system-architecture-design

Decision -

Some suggestion of making system simple, well, but the suggestion itself it is that simple -[..]ural-patterns-in-a-nutshell-a0b47a1e9013

Explaining common different architecture patterns -[..]l-patterns-you-need-to-know-a1f5ea7e4e3d

Software Architecture Patterns -[..]ecture-patterns-5-mins-read-e9e3c8eb47d2

12 Software Architecture Pitfalls and How to Avoid Them -

(google search) (amazon search)

Sat Dec 09 14:48:16 GMT 2023 From /weblog/design/examples


Why Disney Plus’s new Hulu integration was such a huge, high-stakes challenge -[..]993539/disney-plus-hulu-integration-beta

(google search) (amazon search)

Sat Nov 11 12:39:05 GMT 2023 From /weblog/design


Elevate developer experiences with CLI design guidelines -[..]eloper-experiences-cli-design-guidelines

(google search) (amazon search)

Wed Nov 01 14:03:03 GMT 2023 From /weblog/design/examples


How I scaled Amazon’s Load Generator to run on 1000s of machines -[..]to-run-on-1000s-of-machines-4ca8f53812cf

(google search) (amazon search)

Mon Oct 23 12:56:49 GMT 2023 From /weblog/design/examples


Data engineering at Meta: High-Level Overview of the internal tech stack -[..]-of-the-internal-tech-stack-a200460a44fe

(google search) (amazon search)

Sun Apr 30 14:05:15 GMT 2023 From /weblog/design/pattern


7 Architecture Design Patterns — You wish you knew before interview -[..]h-you-knew-before-interview-e9806bc01b6f

(google search) (amazon search)

Mon Mar 06 11:58:46 GMT 2023 From /weblog/design


The World's Smallest Hash Table -

(google search) (amazon search)

Tue Feb 28 00:53:04 GMT 2023 From /weblog/design/interview

Jeff Dean

How Google’s Jeff Dean became the Chuck Norris of the Internet. -[..]me-the-chuck-norris-of-the-internet.html

谷歌最好的程序员 Jeff Dean:我用过 18 种编程语言 -

The Friendship That Made Google Huge -[..]/10/the-friendship-that-made-google-huge

(google search) (amazon search)

Tue Feb 28 00:51:13 GMT 2023 From /weblog/design


Tired with duplicating Try-Catch for resource acquisition? Can try to create proxy method -[..]clarative-synchronization-with-java.html

Discussion of naming of if block -

Factors for choosing a strategic technology stack, runtime performance is not a factor for him, probably good idea -[..]1/04/factors-for-choosing-strategic.html

Don't think , stay focus -

Using class name as variable name is a bad thing? I doubt about it, but interesting idea -

The problem of using generic name -

Beware of where memory allocated, sometime there is no off side for lazy initalization -[..]ou-dare-to-change-hashmap-implementation

Some suggestion of how to code in order to prevent unreproducible bugs -[..]4/02/minimizing-unreproducible-bugs.html

More careful to check null -[..]et-paranoid-java-programming-techniques/

The fewer conditions you test for, the better your code “tastes”. -[..]ding-requirement-99749f37684a#.1glkhe7np

Think twice before running a loop -

Example of how to remove mutation status -

The Best Algorithm No One Knows About, linear randomization -[..]0/the-best-algorithm-no-one-knows-about/

Small change can make big difference -[..]ars-with-a-single-character-code-change/

Eager is Easy, Lazy is Labyrinthine -[..]s-easy-lazy-is-labyrinthine-b12605f13048

How to organize your code? -

When you have to -[..]r-tutorial-from-basics-to-best-practices

Ask HN: What's the most elegant piece of code you've seen? -

(google search) (amazon search)

Mon Feb 13 14:02:04 GMT 2023 From /weblog/design/distribute


Sample chater of REST book , which contain a nice discussion of why Idempotence is important -[..]dson-ruby-restful-ws/en/resources/04.pdf

New Acid:
* A – Associative
* C – Commutative
* I – Idempotent
* D - Distributed

Idempotency patterns -[..]

Detailed discussion about how to design Idempotence -

Discuss about clock in distributed environment -[..]e-bad-or-welcome-to-distributed-systems/

Idempotent operations -[..]

(google search) (amazon search)

Wed Jan 11 14:13:27 GMT 2023 From /weblog/design


What is the hardest thing in software development? -

(google search) (amazon search)

Fri Jan 06 03:17:18 GMT 2023 From /weblog/design

flow condition

i wonder if it makes sense to refactor from this:

public void someMethod(SomeClass someObject) {
if(someObject != null){
do something ...
to this:
public void someMethod(SomeClass someObject) {
if(someObject == null) return;
do something ...

The other discussion about flow control presentation -

A Response to “Stop Using If-Else Statements” -[..]op-using-if-else-statements-c3d4c64c69af

(google search) (amazon search)

Thu Nov 03 23:37:56 GMT 2022 From /weblog/design


When XP says "go for the simplest possible design", what does that mean?
1. Simplest possible design to IMPLEMENT?
1. Simplest possible design to UNDERSTAND LATER?

An thread discuss how far should we go. Seen most people agree what should be done is "Simplest possible design to TEST and IMPLEMENT"

It apply on feature, not on quality -

Don’t write reusable code -[..]sb/dont-write-reusable-code-a857e925b683

(google search) (amazon search)

Fri Oct 21 00:58:05 GMT 2022 From /weblog/design/pattern

Best pattern

Discussion about which pattern is most important -[..]page/abien?entry=most_important_patterns

Pattern Language Titles -

10 Design Patterns every Software Architect and Software Engineer must know -[..]oftware-architect-must-know-b33237bc01c2

Strategy, Singleton, Observer -[..]very-developer-should-learn-71a51568ac9d

(google search) (amazon search)

Thu Oct 20 13:12:35 GMT 2022 From /weblog/design/pattern


Non-Software Examples of Software Design Patterns -[..]vers/nonSoftwareExample/patexamples.html[..]hain-of-Responsibility-Pattern-in-C.aspx

Patterns to replace switch -

Design pattern in JDK -

Pattern examples in java -

How to use the Command pattern in Java -[..]-to-use-the-command-pattern-in-java.html

static factory -[..]-instead-of-public-constructors-in-java/

(google search) (amazon search)

Tue Jun 21 00:19:50 GMT 2022 From /weblog/design

High level software design discussion

A nice table:
Do Don't
1. Focus on interfaces. 2. Be worried about the implementation.
3. Mention semantic contract using interfaces. 4. Let subtypes break this semantic contract of their parent types.
5. Service decoupling using interfaces. 6. Be coupled with specific concrete implementation.
7. Family extension using interfaces. 8. Break the family relationship using concrete implementation.
9. Establish a family rule by abstract classes. 10. Impose your own rule through concrete classes.
11. Let interfaces answer all "what" about the system. 12. Forget to mention "how" are you answering all "what" from interfaces.
Also a good introduction of Strategy pattern[..]/03/28/testing-java-object-oriented.html How to determine the levels of abstraction -[..]w-to-determine-the-levels-of-abstraction Simple and clear, good design -> Correct, clear, easy to change -[..]rrectness-clarity-and-changeability.html Data Oriented Programming in Java -
(google search) (amazon search)

Sat May 21 13:43:53 GMT 2022 From /weblog/design/examples


Experience of using AWS Redshift -[..]on-events-a-day-the-shift-to-redshi.html

腾讯信息流内容理解算法工程全流程实践 -

(google search) (amazon search)

Sat May 21 13:06:44 GMT 2022 From /weblog/design/examples


Open Sourcing Twitter’s Algorithm Part 1: How Twitter Works -

(google search) (amazon search)

Thu Apr 21 23:34:15 GMT 2022 From /weblog/design/examples


DB Locking in Reservation Systems -[..]king-in-reservation-systems-3b3d574c7676

(google search) (amazon search)

Sat Apr 09 12:18:32 GMT 2022 From /weblog/design/distribute


Partitioning GitHub’s relational databases to handle scale -[..]ning-githubs-relational-databases-scale/

A Distributed System Interview Question: How to Avoid Read Inconsistency During a Transaction -[..]stency-during-a-transaction-6ac3b4a8f92a

(google search) (amazon search)

Mon Mar 14 04:40:26 GMT 2022 From /weblog/design


Nothing specific, mostly code clean up, refactoring and simplification, the performance boost was a surprise. <- This is a good one -[..]12/07/disruptor-v3-faster-hopefully.html

Is there anything we can do about this when designing algorithms and data-structures? Yes there is a lot we can do. If we perform chunks of work on data that is co-located, and we stride around memory in a predictable fashion, then our algorithms can be many times faster. For example rather than using bucket and chain hash tables, like in the JDK, we can employ hash tables using open-addressing with linear-probing. Rather than using linked-lists or trees with single items in each node, we can store an array of many items in each node. -[..]emory-access-patterns-are-important.html

Skip lists are used instead of b-trees because b-trees don’t scale. -[..]ast-mvcc-inmem-lockfree-codegen-and.html

Beware about the performance issue of static initalization -[..]-cause-problems-with-multi-threading-how

Experiment show why arraylist is better in most cases -

How to design low latency application in java -[..]5/chronicle-and-low-latency-in-java.html[..]ciples-of-high-performance-programs.html[..]principles-of-high-performance-programs/

Suggestion about how to determine number of thread pool -[..]rmine-Web-Applications-Thread-Poll-Size/

Beware the performance penalty of logging -

Keep thing dynamic -[..]ciples-of-high-performance-programs.html[..]st-rule-of-performance-optimisation.html[..]u/~rcs/research/interactive_latency.html[..]aling-data-platforms.html?SSLoginOk=true

Discuss about developing low latency financial application -

Discussion of object pooling -[..]-but-forgotten-trick-object-pooling.html[..]m_performance_part_1_object_pooling.html

Efficiency - the amount of work you need to do.
Performance - how fast you can do that work
Efficiency - governed by your algorithm
Performance - governed by your data structures.[..]e-difference-between-efficiency-and.html

Turning off power save mode on the CPU reduced brought the max latency from 11 msec down to 8 msec.
Guaranteeing threads will always have CPU resources using CPU isolation and thread affinity brought the maximum latency down to 14 microseconds.[..]eduler-jitter-using-cpu-isolation-a.html[..]

About design for performance for webapi -[..]y-decision-as-a-service-design-patterns/

check list -[..]ery-software-development-team-should-ask

Beware if system utilization over 80% -[..]/20/service-latency-and-utilisation.html

scalable-io-events-vs-multithreading-based -[..]lable-io-events-vs-multithreading-based/

How to find out bottleneck -[..]entile-latencies-in-Chronicle-Queue.html

Compiler Performance and LLVM -

Know Thy Complexities! -[..]oW9D2qyCTt3qMftzYxsdz7KJs8LkSeRPWLzguwpA

10 大高性能开发宝石 -

How to detect and fix IO related performance issue -

RangeBitmap produces a RoaringBitmap of the indexes which satisfy a predicate, and can take RoaringBitmap parameters as inputs to skip over rows already filtered out. The Streams API code used before is translated into RangeBitmap API calls: -

(google search) (amazon search)

Mon Feb 14 23:37:05 GMT 2022 From /weblog/design


How to write safer concurrency code -

reentrant and thread safe functions -[..]/31/reentrant-and-thread-safe-functions/

Libraries / toolkits for multicore process -[..]intableArticle.jhtml?articleID=212900103

Introduction -[..]QQSNDLRSKHSCJUNN2JVN?articleID=212903586[..]CQSNDLRSKHSCJUNN2JVN?articleID=213001517

Collections of links -[..]rallel-Or-Get-Left-Behind.html&Itemid=29

Briefing of difference modeling of threading system -[..]intableArticle.jhtml?articleID=215900465[..]inners-guide-to-multithreaded-libraries/[..]haloms_blog/2010/08/concurrency-101.html

Saving the Failwhale: The Art of Concurrency (Page last updated December 2012, Added 2012-12-26, Author Dhanji R. Prasanna, Publisher informit). Tips:

1) Contention is unavoidable - some resources are just slower, and you must wait for them. The secrets to good concurrency are 1) ensuring that these slower resources are rarely used, and 2) during such waiting periods, giving the faster tiers other work to do so that they continue to be utilized well.
2) Overuse of synchronization constructs such as locks and mutexes leads to systems that perform poorly under load.
3) ConcurrentHashMap is an efficient thread-safe map while HashMap is not thread-safe.
4) ConcurrentHashMap doesn't do away with locks, it still uses them but it uses more than the single global lock, so that threads gain some measure of concurrency. It uses separate locks for partitions, so that multiple threads writing to the map are likely to access different partitions, using separate locks and therefore process their data simultaneously. This technique is known as lock-striping. Efficient striping uses a number of locks proportional to the number of CPU cores in a system.
5) The asynchronous processing model smooths resource spikes by adding requests to a queue which is serviced by a pool of workers - spikes in requests make the queue grow rather than overloading the workers. (The ExecutorService is essentially a thread pool accompanied by a task queue.)

Discussion of using difference model for concurrency -[..]cks-application-architecture-pros-a.html

Concurrency vs Parallelism -[..]/2013/12/concurrency-vs-parallelism.html

Compare between Actors, CSP, Disruptor and raw Threads -[..]omparision-of-different-concurrency.html

Few coding tips that should be useful for most languages -[..]erformance-scalability-and-liveness.html[..]2015/09/java-concurrency-essentials.html

Service Design
Do one thing, do it well
No shared operational state
Bound your queues
Name custom thread pools and register an UncaughtExceptionHandler
Prefer immutable data objects over mutable state[..]-to-25-billion-notifications-during.html

On Parallelism and Concurrency -[..]lism-what-is-the-difference-bdf01069b081

Solving Common Concurrency Problems -[..]

(google search) (amazon search)