Grokking Concurrency

Grokking Concurrency PDF

Author: Kiril Bobrov

Publisher: Simon and Schuster

Published: 2024-02-20

Total Pages: 436

ISBN-13: 1638354324

DOWNLOAD EBOOK →

This easy-to-read, hands-on guide demystifies concurrency concepts like threading, asynchronous programming, and parallel processing in any language. Perplexed by concurrency? Don’t be. This engaging, fully-illustrated beginner’s guide gets you writing the kind of high-performance code your apps deserve. Inside, you’ll find thorough explanations of concurrency’s core concepts—all explained with interesting illustrations, insightful examples, and detailed techniques you can apply to your own projects. In Grokking Concurrency you will: Get up to speed with the core concepts of concurrency, asynchrony, and parallel programming Learn the strengths and weaknesses of different hardware architectures Improve the sequential performance characteristics of your software Solve common problems for concurrent programming Compose patterns into a series of practices for writing scalable systems Write and implement concurrency systems that scale to any size Discover effective concurrency practices that will help you leverage multiple cores, excel with high loads, handle terabytes of data, and continue working after hardware and software failures. The core concepts in this guide will remain eternally relevant, whether you’re building web apps, IoT systems, or handling big data. About the technology Concurrency is an approach to running computer programs efficiently by separating them into tasks that can execute independently. This basic idea makes it possible to accelerate game graphics, train large AI models, rapidly scale web applications, streamline big data processing, and much more. Concurrency can get complicated, so this book gets you started gently with interesting examples, entertaining illustrations, and easy-to-follow Python code. About the book Grokking Concurrency is a perfectly paced introduction to the fundamentals of concurrent, parallel, and asynchronous programming. In it, you’ll learn the practices you’ll need to program multicore processors, GPUs, and other high-performance systems. Author Kirill Bobrov skips the math, jargon, and academic language and concentrates on clear, plain-English explanations. What's inside Writing and running concurrent programs Patterns for performance, scalability, and resilience Choosing the right hardware Asynchronous communication About the reader Examples in Python. No prior experience with concurrency or high-performance computing required. About the author Kirill Bobrov is a software engineer with a passion for data engineering. Table of Contents Part 1 The Octopus Orchestra: Introduction to a Symphony of Concurrency 1 Introducing concurrency 2 Serial and parallel execution 3 How computers work 4 Building blocks of concurrency 5 Interprocess communication Part 2 the Many Tentacles of Concurrency: Multitasking, Decomposition, and Synchronization 6 Multitasking 7 Decomposition 8 Solving concurrency problems: Race conditions and synchronization 9 Solving concurrency problems: Deadlocks and starvation Part 3 Asynchronous Octopuses: a Pizza-making Tale of Concurrency 10 Nonblocking I/O 11 Event-based concurrency 12 Asynchronous communication 13 Writing concurrent applications

Grokking Functional Programming

Grokking Functional Programming PDF

Author: Michal Plachta

Publisher: Simon and Schuster

Published: 2023-02-07

Total Pages: 518

ISBN-13: 1638350078

DOWNLOAD EBOOK →

There’s no need to fear going functional! This friendly, lively, and engaging guide is perfect for any perplexed programmer. It lays out the principles of functional programming in a simple and concise way that will help you grok what FP is really all about. In Grokking Functional Programming you will learn: Designing with functions and types instead of objects Programming with pure functions and immutable values Writing concurrent programs using the functional style Testing functional programs Multiple learning approaches to help you grok each new concept If you’ve ever found yourself rolling your eyes at functional programming, this is the book for you. Open up Grokking Functional Programming and you’ll find functional ideas mapped onto what you already know as an object-oriented programmer. The book focuses on practical aspects from page one. Hands-on examples apply functional principles to everyday programming tasks like concurrency, error handling, and improving readability. Plus, puzzles and exercises let you think and practice what you're learning. You’ll soon reach an amazing “aha” moment and start seeing code in a completely new way. About the technology Finally, there’s an easy way to learn functional programming! This unique book starts with the familiar ideas of OOP and introduces FP step-by-step using relevant examples, engaging exercises, and lots of illustrations. You’ll be amazed at how quickly you’ll start seeing software tasks from this valuable new perspective. About the book Grokking Functional Programming introduces functional programming to imperative developers. You’ll start with small, comfortable coding tasks that expose basic concepts like writing pure functions and working with immutable data. Along the way, you’ll learn how to write code that eliminates common bugs caused by complex distributed state. You’ll also explore the FP approach to IO, concurrency, and data streaming. By the time you finish, you’ll be writing clean functional code that’s easy to understand, test, and maintain. What's inside Designing with functions and types instead of objects Programming with pure functions and immutable values Writing concurrent programs using the functional style Testing functional programs About the reader For developers who know an object-oriented language. Examples in Java and Scala. About the author Michal Plachta is an experienced software developer who regularly speaks and writes about creating maintainable applications. Table of Contents Part 1 The functional toolkit 1 Learning functional programming 2 Pure functions 3 Immutable values 4 Functions as values Part 2 Functional programs 5 Sequential programs 6 Error handling 7 Requirements as types 8 IO as values 9 Streams as values 10 Concurrent programs Part 3 Applied functional programming 11 Designing functional programs 12 Testing functional programs

Kotlin in Action, Second Edition

Kotlin in Action, Second Edition PDF

Author: Roman Elizarov

Publisher: Simon and Schuster

Published: 2024-05-21

Total Pages: 558

ISBN-13: 161729960X

DOWNLOAD EBOOK →

Expert guidance and amazing examples from core Kotlin’s developers! It’s everything you need to get up and running fast. In Kotlin in Action, Second Edition you will learn: Kotlin statements and functions, and classes and types Functional programming on the JVM The Kotlin standard library and out-of-the-box features Writing clean and idiomatic code Combining Kotlin and Java Improve code reliability with Null safety Domain-specific languages Kotlin concurrency Mastering the kotlinx.coroutines library Kotlin in Action, Second Edition is a complete guide to the Kotlin language written especially for readers familiar with Java or another OO language. In it, core Kotlin language developers share their unique insights, along with practical techniques and hands-on examples. You’ll quickly progress from language basics to building production-quality applications that take advantage of Kotlin’s unique features. This new second edition is fully updated to include the latest innovations, and it adds new chapters dedicated to coroutines and concurrency. Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications. About the technology Coding with Kotlin means less hassle and more productivity. This JVM-based language offers an expressive syntax, a strong intuitive type system, and great tooling support—plus seamless interoperability with existing Java code, libraries, and frameworks. Kotlin is general purpose, safe, pragmatic, and the premier language of Android development. While the language has grown beyond its initial Java-centric focus, you can still use and integrate with your favorite Java tools and libraries, including Spring. About the book Kotlin in Action, Second Edition teaches you Kotlin techniques you can use for almost any type of application, from enterprise services to Android apps. The authors are all members of the Kotlin team, so you can trust that even the gnarly details are dead accurate. You’ll start with Kotlin fundamentals, learning how the language handles everything from statements and functions to classes and types, and about its unique features that make Kotlin programming so seamless. As you progress through this masterful book, you’ll get hands-on with the Kotlin standard library, functional programming in Kotlin, and advanced features such as generics and reflection. And this updated second edition now covers coroutines and structured concurrency to help you create efficient high-performance applications. About the author Roman Elizarov is a Project Lead for Kotlin at JetBrains and currently focuses on the Kotlin language design in the role of Lead Language Designer. Roman Elizarov previously designed and developed high-performance trading software for leading brokerage firms and market data delivery services that routinely handle millions of events per second. He has been working on Kotlin at JetBrains since 2016 and has contributed to the design of Kotlin coroutines and the development of the Kotlin coroutines library. Svetlana Isakova began as a member of the Kotlin compiler team and is now a developer advocate for JetBrains. She teaches Kotlin and speaks at conferences worldwide. She is a co-creator of the course "Kotlin for Java developers" at Coursera and is a co-author of the book "Atomic Kotlin." As a Kotlin Developer Advocate at JetBrains, Sebastian Aigner spends a lot of time thinking about how technologies can empower and delight people. When he first tried Kotlin, it was love at first sight.He gave talks at KotlinConf, participated in the Kotlin/Everywhere campaign, and spoke at a multitude of other conferences. He hosts the Talking Kotlin podcast together with Hadi Hariri, and creates videos for the official Kotlin YouTube channel. Dmitry Jemerov has been working with JetBrains since 2003. He was one of the initial developers working on Kotlin as the project was started, and he’s deeply familiar with the design of the language and the reasons for the decisions that were made during its development. He’s currently responsible for Kotlin documentation.

Grokking Streaming Systems

Grokking Streaming Systems PDF

Author: Josh Fischer

Publisher: Simon and Schuster

Published: 2022-04-19

Total Pages: 310

ISBN-13: 1638356491

DOWNLOAD EBOOK →

A friendly, framework-agnostic tutorial that will help you grok how streaming systems work—and how to build your own! In Grokking Streaming Systems you will learn how to: Implement and troubleshoot streaming systems Design streaming systems for complex functionalities Assess parallelization requirements Spot networking bottlenecks and resolve back pressure Group data for high-performance systems Handle delayed events in real-time systems Grokking Streaming Systems is a simple guide to the complex concepts behind streaming systems. This friendly and framework-agnostic tutorial teaches you how to handle real-time events, and even design and build your own streaming job that’s a perfect fit for your needs. Each new idea is carefully explained with diagrams, clear examples, and fun dialogue between perplexed personalities! About the technology Streaming systems minimize the time between receiving and processing event data, so they can deliver responses in real time. For applications in finance, security, and IoT where milliseconds matter, streaming systems are a requirement. And streaming is hot! Skills on platforms like Spark, Heron, and Kafka are in high demand. About the book Grokking Streaming Systems introduces real-time event streaming applications in clear, reader-friendly language. This engaging book illuminates core concepts like data parallelization, event windows, and backpressure without getting bogged down in framework-specific details. As you go, you’ll build your own simple streaming tool from the ground up to make sure all the ideas and techniques stick. The helpful and entertaining illustrations make streaming systems come alive as you tackle relevant examples like real-time credit card fraud detection and monitoring IoT services. What's inside Implement and troubleshoot streaming systems Design streaming systems for complex functionalities Spot networking bottlenecks and resolve backpressure Group data for high-performance systems About the reader No prior experience with streaming systems is assumed. Examples in Java. About the author Josh Fischer and Ning Wang are Apache Committers, and part of the committee for the Apache Heron distributed stream processing engine. Table of Contents PART 1 GETTING STARTED WITH STREAMING 1 Welcome to Grokking Streaming Systems 2 Hello, streaming systems! 3 Parallelization and data grouping 4 Stream graph 5 Delivery semantics 6 Streaming systems review and a glimpse ahead PART 2 STEPPING UP 7 Windowed computations 8 Join operations 9 Backpressure 10 Stateful computation 11 Wrap-up: Advanced concepts in streaming systems

Fast Python

Fast Python PDF

Author: Tiago Antao

Publisher: Simon and Schuster

Published: 2023-07-04

Total Pages: 302

ISBN-13: 1638356866

DOWNLOAD EBOOK →

Master Python techniques and libraries to reduce run times, efficiently handle huge datasets, and optimize execution for complex machine learning applications. Fast Python is a toolbox of techniques for high performance Python including: Writing efficient pure-Python code Optimizing the NumPy and pandas libraries Rewriting critical code in Cython Designing persistent data structures Tailoring code for different architectures Implementing Python GPU computing Fast Python is your guide to optimizing every part of your Python-based data analysis process, from the pure Python code you write to managing the resources of modern hardware and GPUs. You'll learn to rewrite inefficient data structures, improve underperforming code with multithreading, and simplify your datasets without sacrificing accuracy. Written for experienced practitioners, this book dives right into practical solutions for improving computation and storage efficiency. You'll experiment with fun and interesting examples such as rewriting games in Cython and implementing a MapReduce framework from scratch. Finally, you'll go deep into Python GPU computing and learn how modern hardware has rehabilitated some former antipatterns and made counterintuitive ideas the most efficient way of working. About the Technology Face it. Slow code will kill a big data project. Fast pure-Python code, optimized libraries, and fully utilized multiprocessor hardware are the price of entry for machine learning and large-scale data analysis. What you need are reliable solutions that respond faster to computing requirements while using less resources, and saving money. About the Book Fast Python is a toolbox of techniques for speeding up Python, with an emphasis on big data applications. Following the clear examples and precisely articulated details, you’ll learn how to use common libraries like NumPy and pandas in more performant ways and transform data for efficient storage and I/O. More importantly, Fast Python takes a holistic approach to performance, so you’ll see how to optimize the whole system, from code to architecture. What’s Inside Rewriting critical code in Cython Designing persistent data structures Tailoring code for different architectures Implementing Python GPU computing About the Reader For intermediate Python programmers familiar with the basics of concurrency. About the Author Tiago Antão is one of the co-authors of Biopython, a major bioinformatics package written in Python. Table of Contents: PART 1 - FOUNDATIONAL APPROACHES 1 An urgent need for efficiency in data processing 2 Extracting maximum performance from built-in features 3 Concurrency, parallelism, and asynchronous processing 4 High-performance NumPy PART 2 - HARDWARE 5 Re-implementing critical code with Cython 6 Memory hierarchy, storage, and networking PART 3 - APPLICATIONS AND LIBRARIES FOR MODERN DATA PROCESSING 7 High-performance pandas and Apache Arrow 8 Storing big data PART 4 - ADVANCED TOPICS 9 Data analysis using GPU computing 10 Analyzing big data with Dask

Grokking Simplicity

Grokking Simplicity PDF

Author: Eric Normand

Publisher: Simon and Schuster

Published: 2021-07-13

Total Pages: 590

ISBN-13: 1638350469

DOWNLOAD EBOOK →

"The most insightful and intuitive guide to clean and simple software. I recommend this to all software developers." - Rob Pacheco, Vision Government Solutions Grokking Simplicity is a friendly, practical guide that will change the way you approach software design and development. Distributed across servers, difficult to test, and resistant to modification—modern software is complex. Grokking Simplicity is a friendly, practical guide that will change the way you approach software design and development. It introduces a unique approach to functional programming that explains why certain features of software are prone to complexity, and teaches you the functional techniques you can use to simplify these systems so that they’re easier to test and debug. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the technology Developers rightly fear the unintended complexity that infects most code. This book shows you how to write software that keeps complexity close to its inherent minimum. As you write software you should distinguish between code that alters your system’s state, and code that does not. Once you learn to make that distinction, you can refactor much of your state-altering “actions” into stateless “calculations.” Your software will be simpler. About the book The book also teaches you to solve the complex timing bugs that inevitably creep into asynchronous and multithreaded code. In ad­vanced sections of the book you learn how composable abstractions help avoid repeating code and open up new levels of expressivity. What's inside Patterns for simpler code Powerful time modeling approaches to simplify asynchronous code How higher-order functions can make code reusable and composable About the reader For intermediate and advanced developers building complex software. Exercises, illustrations, self-assessments, and hands-on examples lock in each new idea. About the author Eric Normand is an expert software developer who has been an influential teacher of functional programming since 2007. Table of Contents 1 Welcome to Grokking Simplicity 2 Functional thinking in action PART 1 - ACTIONS, CALCULATIONS, AND DATA 3 Distinguishing actions, calculations, and data 4 Extracting calculations from actions 5 Improving the design of actions 6 Staying immutable in a mutable language 7 Staying immutable with untrusted code 8 Stratified design, part 1 9 Stratified design, part 2 PART 2 - FIRST-CLASS ABSTRACTIONS 10 First-class functions, part 1 11 First-class functions, part 2 12 Functional iteration 13 Chaining functional tools 14 Functional tools for nested data 15 Isolating timelines 16 Sharing resources between timelines 17 Coordinating timelines 18 Reactive and onion architectures 19 The functional journey ahead

Patterns for Parallel Programming

Patterns for Parallel Programming PDF

Author: Timothy G. Mattson

Publisher: Pearson Education

Published: 2004-09-15

Total Pages: 786

ISBN-13: 0321630033

DOWNLOAD EBOOK →

The Parallel Programming Guide for Every Software Developer From grids and clusters to next-generation game consoles, parallel computing is going mainstream. Innovations such as Hyper-Threading Technology, HyperTransport Technology, and multicore microprocessors from IBM, Intel, and Sun are accelerating the movement's growth. Only one thing is missing: programmers with the skills to meet the soaring demand for parallel software. That's where Patterns for Parallel Programming comes in. It's the first parallel programming guide written specifically to serve working software developers, not just computer scientists. The authors introduce a complete, highly accessible pattern language that will help any experienced developer "think parallel"-and start writing effective parallel code almost immediately. Instead of formal theory, they deliver proven solutions to the challenges faced by parallel programmers, and pragmatic guidance for using today's parallel APIs in the real world. Coverage includes: Understanding the parallel computing landscape and the challenges faced by parallel developers Finding the concurrency in a software design problem and decomposing it into concurrent tasks Managing the use of data across tasks Creating an algorithm structure that effectively exploits the concurrency you've identified Connecting your algorithmic structures to the APIs needed to implement them Specific software constructs for implementing parallel programs Working with today's leading parallel programming environments: OpenMP, MPI, and Java Patterns have helped thousands of programmers master object-oriented development and other complex programming technologies. With this book, you will learn that they're the best way to master parallel programming too.

Programming Concurrency on the JVM

Programming Concurrency on the JVM PDF

Author: Venkat Subramaniam

Publisher: Pragmatic Bookshelf

Published: 2011-08-26

Total Pages: 368

ISBN-13: 1680504304

DOWNLOAD EBOOK →

More than ever, learning to program concurrency is critical to creating faster, responsive applications. Speedy and affordable multicore hardware is driving the demand for high-performing applications, and you can leverage the Java platform to bring these applications to life. Concurrency on the Java platform has evolved, from the synchronization model of JDK to software transactional memory (STM) and actor-based concurrency. This book is the first to show you all these concurrency styles so you can compare and choose what works best for your applications. You'll learn the benefits of each of these models, when and how to use them, and what their limitations are. Through hands-on exercises, you'll learn how to avoid shared mutable state and how to write good, elegant, explicit synchronization-free programs so you can create easy and safe concurrent applications. The techniques you learn in this book will take you from dreading concurrency to mastering and enjoying it. Best of all, you can work with Java or a JVM language of your choice - Clojure, JRuby, Groovy, or Scala - to reap the growing power of multicore hardware. If you are a Java programmer, you'd need JDK 1.5 or later and the Akka 1.0 library. In addition, if you program in Scala, Clojure, Groovy or JRuby you'd need the latest version of your preferred language. Groovy programmers will also need GPars.

Java Threads

Java Threads PDF

Author: Scott Oaks

Publisher: "O'Reilly Media, Inc."

Published: 1999

Total Pages: 350

ISBN-13: 9781565924185

DOWNLOAD EBOOK →

Threads (Computer programs).

Python Concurrency with Asyncio

Python Concurrency with Asyncio PDF

Author: Matthew Fowler

Publisher: Simon and Schuster

Published: 2022-03

Total Pages: 374

ISBN-13: 1617298662

DOWNLOAD EBOOK →

It's easy to overload standard Python and watch your programs slow to a crawl. The asyncio library was built to solve these problems by making it easy to divide and schedule tasks. It seamlessly handles multiple operations concurrently, leading to apps that are lightning fast and scalable. "Python concurrency with asyncio" introduces asynchronous, parallel, and concurrent programming through hands-on Python examples. Hard-to-grok concurrency topics are broken down into simple flowcharts that make it easy to see how your tasks are running. You'll learn how to overcome the limitations of Python using asyncio to speed up slow web servers and microservices. You'll even combine asyncio with traditional multiprocessing techniques for huge improvements to performance.