Mon Feb 14 23:37:05 GMT 2022
From
/weblog/design
How to write safer concurrency code -
http://www.artima.com/forums/flat.jsp?forum=276&thread=178345 reentrant and thread safe functions -
http://kevinrodrigues.com[..]/31/reentrant-and-thread-safe-functions/ Libraries / toolkits for multicore process -
http://www.ddj.com[..]intableArticle.jhtml?articleID=212900103 Introduction -
http://www.ddj.com[..]QQSNDLRSKHSCJUNN2JVN?articleID=212903586 http://www.ddj.com[..]CQSNDLRSKHSCJUNN2JVN?articleID=213001517 Collections of links -
http://dobbscodetalk.com[..]rallel-Or-Get-Left-Behind.html&Itemid=29 Briefing of difference modeling of threading system -
http://www.ddj.com[..]intableArticle.jhtml?articleID=215900465 http://software.intel.com[..]inners-guide-to-multithreaded-libraries/ http://natishalom.typepad.com[..]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.)
http://www.informit.com/articles/article.aspx?p=1994789 Discussion of using difference model for concurrency -
http://highscalability.com[..]cks-application-architecture-pros-a.html Concurrency vs Parallelism -
http://concurrencyfreaks.blogspot.hk[..]/2013/12/concurrency-vs-parallelism.html Compare between Actors, CSP, Disruptor and raw Threads -
http://java-is-the-new-c.blogspot.com.au[..]omparision-of-different-concurrency.html Few coding tips that should be useful for most languages -
http://www.javacodegeeks.com[..]erformance-scalability-and-liveness.html http://www.javacodegeeks.com[..]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
http://highscalability.com[..]-to-25-billion-notifications-during.html On Parallelism and Concurrency -
https://inside.java/2021/11/30/on-parallelism-and-concurrency/ https://towardsdatascience.com[..]lism-what-is-the-difference-bdf01069b081 Solving Common Concurrency Problems -
https://blog.professorbeekums.com[..]s.com/2021/solving-concurrency-problems/
(google search)
(amazon search)
Wed Jan 26 11:53:53 GMT 2022
From
/weblog/design/examples
Alright folks, gather round and let me tell you the story of (almost) the biggest engineering disaster I’ve ever had the misfortune of being involved in. It’s a tale of politics, architecture and the sunk cost fallacy [I’m drinking an Aberlour Cask Strength Single Malt Scotch] -
https://threadreaderapp.com/thread/1336890442768547845.html https://www.infoq.cn/article/asjhHAmupqtcx5oGrb4b Uber Architecture and System Design -
https://medium.com[..]hitecture-and-system-design-e8ac26690dfc Designing Uber -
http://highscalability.com/blog/2022/1/25/designing-uber.html
(google search)
(amazon search)
Wed Jan 19 00:24:47 GMT 2022
From
/weblog/design/distribute
In one sentence, here's why: humans are notoriously bad at keeping "self" distinct from "other". Egomania, projection (transference), and enmeshment are well-known symptoms of this problem. OK, so I hear you saying, "yeah, but what does this have to do with programming?" It certainly seems absurd to suggest that if we are bad at something we know the most about (our "selves"), how could we possibly say that we have a good approach for the programming analogues - objects, modules, etc. -
http://www.artima.com/weblogs/viewpost.jsp?thread=46706 Argue why space base design is better than n-tier design -
http://www.google.com[..]0The%20End%20of%20Tier-based%20Computing Some key research of google for distributed computation -
http://www.infoq.com/news/2007/06/google-scalability Someone think we are not yet (per Oct 2007) have good language support for distibuted computing -
http://kasparov.skife.org/blog/2007/10/11/ A blog contain a lot distributed computing information -
http://www.highscalability.com/ How Wikipedia manage their site -
http://dammit.lt/uc/workbook2007.pdf Google tutorial for Design Distributed System -
http://code.google.com/edu/parallel/dsd-tutorial.html http://en.wikipedia.org/wiki/Distributed_hash_table The Hadoop Distributed File System: Architecture and Design -
http://hadoop.apache.org/core/docs/r0.18.0/hdfs_design.html http://www.metabrew.com[..]-a-list-of-distributed-key-value-stores/ Applying experience from CPU design for distributed solution -
http://blog.paralleluniverse.co[..]o/post/26909672264/on-distributed-memory Distributed systems for fun and profit -
http://book.mixu.net/distsys/single-page.html Monitor and design -
http://highscalability.com[..]buted-mission-critical-applications.html Uber case study -
http://highscalability.com[..]les-their-real-time-market-platform.html Load balancer design -
http://www.thegeekstuff.com/2016/01/load-balancer-intro/ Some issues of distributing logic to difference systems -
http://blog.takipi.com[..]t-f-up-your-microservices-in-production/ https://blog.acolyer.org[..]lised-solution-to-distributed-consensus/ Two Phase Commit -
https://martinfowler.com[..]istributed-systems/two-phase-commit.html
(google search)
(amazon search)
Sat Jan 01 12:44:21 GMT 2022
From
/weblog/design
Date handling look simple but easy to fail in trap. Even worst is this is easy to have bad data which hard to fix. Here is an example -
http://blogs.msdn.com/jensenh/archive/2005/11/23/496246.aspx One tip for testing application with time dependence, treat it as random -
http://googletesting.blogspot.com[..]pot.com/2008/04/tott-time-is-random.html Explanation of issues of Joda-time, basically it still haven't map the human view of time close enough than machine view of time -
http://www.jroller.com/scolebourne/entry/why_jsr_310_isn_t Screencast of how to driven a fluent Date API -
http://tedyoung.blogsome.com[..]-apis-in-java-episode-1-comparing-dates/ 解读数据架构的 2021:大数据 1.0 体系基本建成,但头上仍有几朵乌云 -
https://www.infoq.cn/article/gHTPkmo0vZhE7vwFAGij
(google search)
(amazon search)
Sun Oct 11 13:31:07 GMT 2020
From
/weblog/design
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships." -
http://programmers.stackexchange.com[..]uote-about-good-programmer/163187#163187 Compare between schema and schema=less ( like key value mapping ) data -
http://martinfowler.com/articles/schemaless/ Simple AVL tree -
https://www.baeldung.com/java-avl-trees 逼着面试官问了我 ArrayList 和 LinkedList 的区别,他对我彻底服了 -
https://xie.infoq.cn/article/34fa38d821b065e26662e6598
(google search)
(amazon search)