Jump to ratings and reviews
Rate this book

Android Concurrency

Rate this book
Mastering concurrency is critical to developing software with the performance and responsiveness you and your users expect and this is especially true in Android mobile development. On Android, interruptions are more frequent and abrupt, and concurrency involves ordering user-visible events and synchronizing with component and process lifecycles, not just ensuring "thread safety." You need a deeper Android-specific understanding of concurrency and Android Concurrency delivers it. Top Android developer and consultant Blake Meike has created a complete cookbook of best-practice solutions for fully leveraging the multi-core processors and heavily cached architectures now widespread on Android devices, and for taking advantage of significant improvements in the new Android 5 (Lollipop) release. You'll find intensely practical solutions for everything from inter-thread communication to network communication to debugging complex concurrency issues. More than this, Meike introduces a simple but powerful architectural framework you can use to address new concurrency issues whenever they arise. Android Concurrency combines in-depth knowledge, proven patterns and idioms, and expert guidance on avoiding problems: for serious Android developers, it's an indispensable resource."

224 pages, Paperback

First published December 1, 2015

3 people are currently reading
48 people want to read

About the author

G. Blake Meike

9 books3 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
4 (44%)
4 stars
4 (44%)
3 stars
0 (0%)
2 stars
1 (11%)
1 star
0 (0%)
Displaying 1 - 4 of 4 reviews
Profile Image for Venkatesh-Prasad.
223 reviews
December 20, 2020
A thorough coverage of how concurrency occurs in Android apps. The peek under the hood of Android apps in terms of various kinds of components, starting of app processes, and how an app is started in Chapter 2 will be really helpful for folks who want to dig deep into how Android apps works; of course, more digging is required beyond this chapter/book :) The coverage of AsyncTask and various threading concerns such as UI/main vs non-UI, local vs remote services, and marshalling is pretty detailed. The exposition is fast, focused, and detailed albeit the writing style at times breaks the flow. A great book to start digging into how Android apps (and Android) works
42 reviews3 followers
June 25, 2019
Short and easy book to understand concurrency in Android (Java language).
Profile Image for John Sundman.
Author 2 books84 followers
August 30, 2016
This is a fantastic book. It's one of the best programming books I've read, ever.

Disclaimer: I was given a free PDF by the author, whom I have met, in exchange for an honest review.

I might further add that I'm not in the target audience for this book. I'm not an android developer and my knowledge of Java is not especially deep. It is a testament to Meike's skills that those things didn't matter. All of the concepts -- and some of them are quite subtle -- are so clearly explained, and the code examples are so logically laid out and expounded that at no point did I feel lost or overwhelmed.

Mieke's writing is fluid and logical. Each chapter follows the model that was taught to me by my first editor when I wrote my first software manual 3+ decades ago: "I tells ya what I'm going to tell ya, then I tells ya, then I tells ya what I told ya." The overall logic of the book is easy to grasp, as is the logic of each chapter.

Equally important, Meike has mastered the very difficult art of addressing the reader in a confident, sometimes sly, and occasionally laugh-out-loud funny voice that at no point becomes snarky or arrogant. The effect is that you both trust him and enjoy his company.

After an engaging Preface, Meike, in Chapter One, gives a very brief history of modern computer architecture and the evolution of (and distinction between) procedural and functional programming languages. Now, you might think that this kind of stuff is filler that can safely be skipped by anyone with any kind of CS background. But I advise that you don't skip it; it's there for a very good reason, and that's to show you how your naive assumptions about concurrency may be wrong, and how a slightly different mental model may be much more helpful.

The naive assumption is that it's your job to keep track of all available computing resources and structure your program to make best use of them. Wrong! That's the job of the compiler-writer.

In Meike's words,

"The purpose of the discussion, up to this point, has been to reframe the idea of concurrency. Concurrency is not a way to make a program run faster. It is not a complex juggling trick that ninja coders use to keep multiple balls in the air at one time. On the contrary, it is the apparent sequential execution of a program that is the complex trick. Sequential execution is an illusion maintained by a cabal of compiler writers and hardware architects. Concurrency is simply the relaxation of a fabricated constraint. In the developer’s environment, where time and order are rigid and implicit constraints, “concurrency” is just another word for “order unspecified”."

The rest of the book is simply an exploration of how to know, given how Android and Java work, (1) when it's OK to relax assumptions about sequential program execution, and (2) the best technique in any situation for indicating "order unspecified."

Throughout, Meike continually uses the technique of showing what one's "naive" assumption might be about how to solve a programming task, and contrasting it with the correct approach. Each example serves as an exemplar of a pattern, and the patterns are diagramed in helpful, clear diagrams. Throughout, the author demonstrates a deep familiarity with all aspects of Java development and Android programming, even down to explaining where Java documentation is wrong about the behavior of certain classes, or how Android implementation has changed ever-so-slightly from one revision to another.

I'm tempted to quote some code examples to give a flavor, but I guess this is already a bit long for one of these kinds of reviews. If you're an Android developer, do yourself a favor a pick up a copy of this book right now. And even if, like me, you just like to read books like this to get a better understanding of how things work, you should seriously consider investing in it as well. It's a real gem.
Displaying 1 - 4 of 4 reviews

Can't find what you're looking for?

Get help and learn more about the design.