Java ForkJoin Pool

# Java ForkJoin Pool

1. As it sounds, assist distribute work

2. From java 7

3. Based on Doug Lea's work

4. As it sounds, break to simpler tasks

1.  Ideally, no worker thread idle

1.  Threads steal work

5. Classes you use

1.  ForkJoinPool

1.   Implements ExecutorService

2.   `ForkJoinPool = new ForkJoinPool(int parallelism)`

1.   With no arg by default, numProcessors

3.   Pool adjusts its size! (though you specified number)

1.   Send ForkJoinPool Tasks with

1.    Execute() - asynchronous

2.    invoke() - sync awaits

3.    submit() - Async get Future

2.  ForkJoinTask

1.  isDone() - true when complete

2.  isCompletedNormally() - finished without exception

3.  isCompletedAbnormally() - true cancelled / exception

6.  How to use

1.

1. DynamoDb Max Item Size is 400KB

2. 1 RCU is ~1 Read request from the DB

3. Why is it only roughly 1 read request because we could have multiple types of read requests

4. We could have a consistent read request

5. We could have an eventual consistent read request

6. We could have a transactional read request

4. If the item we read is up to 4kb and we read with eventual consistent than we could actual make 2 such items read with 1 RCU

5.

RelevanceYour content is relevant to keywordsOn-page optimizationIn the past, could just repeat keywordsToday, content keywords should be relatedThink TOPIC Not keywordsDivide web pages by topics not by keywordsMany pages same topic—google will get confusedAggregate keywords to topicsIdentify primary keyword within topicTopic inUrl'sNot good too deep – isn't that important http://programminghacks.com/java/tips/interview/best-java-interview-tips.htmlshttp://programminghacks.com/java/java-intervie

Problem

Given a string s, find the length of the longest substring without repeating characters.

ie.

What is stagflation? Stagflation is an economic state where we have both below economical states happening simultaneously, inflation and no growth.  We can have periods of inflation, we can have periods of no growth, but when we have them together, we call this stagflation.

Partitions and Performance

For a single partition:

- For a single partition key

- You can have a hard limit around 3000RCU (Read Capcity Units)

- You can have hard limit around 1000WCR

- Partition key should evenly distributed among partitions

- Accessing frequently a partition is called "hot partition" can cause performance issues.

Long gone are the days where you actually wanted to optimize your domain name for SEO.  Just think of it, if we could optimize our domain name and gain big time in SEO wouldn't everyone do this?

This is just what happened in the past, today it's more important to have consistent data, to have your website existing over the internet for a long period of history, to have a reliable website without errors.

Below is a brief diagram of a summary of chapter 12 of the great book 3 months to SEO.
Popular Posts
Popular Posts
Contributors
Contributors
Archive
Labels
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.