28 links
tagged with concurrency
Click any tag below to further narrow down your results
Links
The removal of Python's Global Interpreter Lock (GIL) marks a significant shift in the language's ability to handle multithreading and concurrency. With the introduction of PEP 703, developers can now compile Python with or without the GIL, enabling true parallelism and reshaping how systems are designed, particularly in data science and AI. This change presents both opportunities and challenges, requiring developers to adapt to new concurrency patterns.
Since adopting Go in 2016, American Express has gained valuable insights into its performance, efficiency, and scalability. Key learnings include improved dependency management with Go Modules, the challenges of concurrency, the importance of training for idiomatic Go, the establishment of standardized frameworks, and fostering an internal community to enhance collaboration and innovation.
SELECT FOR UPDATE in PostgreSQL is often misused, leading to unnecessary row-level locking that can severely impact application concurrency and performance. Developers are encouraged to opt for FOR NO KEY UPDATE instead, as it aligns better with typical update scenarios and prevents deadlocks. Properly managing lock levels according to actual data manipulation needs can significantly enhance system efficiency.
Go 1.25 introduces container-aware GOMAXPROCS defaults that improve the default behavior for applications running in container environments, particularly by adjusting GOMAXPROCS based on CPU limits set by orchestration platforms like Kubernetes. This change aims to reduce throttling impacts on tail latency and enhance production readiness by aligning Go's concurrency model with container resource management.
Alex Seaton from Man Group presented at QCon London 2025 on transitioning from a high-maintenance MongoDB server farm to a serverless database solution using object storage for hedge fund trading applications. He emphasized the advantages of serverless architecture, including improved storage management and concurrency models, while also addressing challenges like clock drift and the complexities of Conflict-Free Replicated Data Types (CRDTs). Key takeaways highlighted the need for careful management of global state and the subtleties involved in using CRDTs and distributed locking mechanisms.
Rethinking how to use async loops in JavaScript reveals common pitfalls such as awaiting inside for loops and map functions, which can lead to inefficiencies and unhandled promise rejections. By using techniques like Promise.all, Promise.allSettled, and controlled concurrency with libraries like p-limit, developers can optimize their asynchronous code for performance and reliability. Understanding the appropriate patterns for order, speed, and safety is crucial for effective async programming.
The article discusses concurrent optimistic updates in React Query, highlighting how they can improve user experience by allowing for immediate UI updates while ensuring data consistency. It explores the implementation of optimistic updates and the challenges associated with handling concurrency in applications. Additionally, it emphasizes the importance of effectively managing server state to enhance application performance and responsiveness.
Asynchrony and concurrency are distinct concepts in programming, with asynchrony allowing tasks to run out of order while remaining correct, and concurrency enabling multiple tasks to progress simultaneously. The article argues that misunderstanding these terms has led to unnecessary complexity in programming ecosystems, particularly in libraries and user experiences. It highlights how Zig’s approach to asynchronous I/O allows for single-threaded blocking execution without forcing users into asynchronous paradigms.
Turso has rewritten significant portions of their API using Go to enhance performance and maintainability. This transition aims to leverage Go's efficiency and concurrency features, ultimately improving the overall experience for developers and users alike. The blog post details the motivations behind this decision and the expected benefits.
The article discusses common mistakes made by developers when using the Go programming language. It highlights pitfalls related to concurrency, error handling, and performance optimization that can lead to inefficient code. Understanding these mistakes can help programmers improve their skills and write more effective Go applications.
Ruby can effectively handle I/O bound workloads such as web crawling when combined with the Async library, enabling an event-driven, non-blocking architecture. The article illustrates how to build a web crawler using Ruby, starting with a basic implementation and enhancing it with concurrency, while addressing issues like limiting simultaneous requests and maintaining persistent connections to improve performance.
Zig has introduced a new asynchronous I/O interface that allows developers to specify the concrete I/O implementation, enhancing code reusability and performance. This design decouples async/await from the execution model, enabling better concurrency management and supporting various I/O implementations, including blocking and event-driven models. The article discusses the implications of this change through code examples and outlines future implementations planned for Zig's standard library.
The chapter discusses race conditions in Go concurrency, illustrating how data races can lead to incorrect outcomes, such as a user being able to make purchases exceeding their account balance. It explains various methods to handle race conditions, including the use of mutexes and compare-and-set operations to ensure that account state remains consistent across concurrent operations.
Armin Ronacher discusses the evolution of concurrency in Python, contrasting the complexities of async/await with the simplicity of threads. He advocates for a model that integrates virtual threads and structured concurrency to enhance the ease of concurrent programming while minimizing the exposure of underlying complexities to developers. The article explores potential syntax and API designs that could improve the developer experience in handling concurrent tasks.
Go's data race detector has a limitation that can lead to missed data races in code, particularly when mutexes are used. The article illustrates a scenario where a race condition occurs due to an unguarded increment in a concurrent environment, which the race detector fails to detect under certain execution orders. Understanding the detector's boundaries is crucial for ensuring thread safety in Go applications.
The article discusses the thundering herd problem in distributed computing, where a large number of processes simultaneously request resources, leading to inefficiencies and potential system crashes. It outlines strategies to mitigate this issue, including implementing request queues or employing exponential backoff mechanisms to reduce the load on servers during peak times.
The article discusses the slow adoption of Python's async features in web development despite their potential for improving concurrency, particularly for I/O-bound tasks. It highlights challenges such as developer familiarity, the Global Interpreter Lock (GIL), and limited support for asynchronous file operations, which hinder broader use of async capabilities. The author also compares Python's async model to C#'s more robust task-based asynchronous pattern.
Recall.ai faced significant performance issues with their Postgres database due to the high concurrency of NOTIFY commands used during transactions, which caused global locks and serialized commits, leading to downtime. After investigating, they discovered that the LISTEN/NOTIFY feature did not scale well under their workload of tens of thousands of simultaneous writers. They advise against using LISTEN/NOTIFY in high-write scenarios to maintain database performance and scalability.
React's useTransition feature allows state updates to render in the background without immediately affecting the UI, leading to a temporary mismatch between the displayed value and the actual state. When a synchronous update interrupts a transition, React resolves this by applying the updates twice, ensuring users see an expected value without delays, but it complicates state management. Developers can avoid confusion by consistently using either synchronous or transition updates for state changes.
The author explores the implementation of Virtual Threads in a Java web crawler, discovering that while they significantly improve URL processing speed, they can also lead to memory issues like OutOfMemoryError due to the lack of built-in concurrency limits. To mitigate the problem, the author suggests using semaphores to control concurrency and implementing rate limiting to prevent overwhelming the system. Ultimately, the experience highlights the need for a new approach to resource management with Virtual Threads.
The Python Language Summit 2025 took place in Pittsburgh, bringing together core developers and special guests to discuss the future of Python. Key presentations focused on the theme of "free-threading," addressing topics such as concurrency, governance, and the challenges faced by the steering council. The event featured a variety of talks and updates on ongoing projects within the Python community.
Feather is a lightweight web framework for Rust that emphasizes developer experience (DX), inspired by Express.js but designed for Rust's performance and safety. It features a middleware-first architecture, easy state management with a Context API, and built-in JWT authentication, all while avoiding the complexities of async/await, allowing for high concurrency using simple synchronous code.
Rethinking asynchronous loops in JavaScript is crucial for optimizing code performance, especially when dealing with API calls. Using await in for loops can lead to inefficient sequential execution, while using Promise.all or Promise.allSettled allows for better control over parallel execution and error handling. Understanding when and how to apply these patterns can significantly enhance the efficiency and reliability of asynchronous operations.
EulerHS is a free monadic framework designed for building concurrent backend and console applications in Haskell, integrating essential subsystems like SQL databases and logging while ensuring exception safety. The framework supports various testing mechanisms and has been successfully utilized in production by Juspay, demonstrating its effectiveness and reliability in managing business logic through a clear application architecture.
The article discusses the shift away from the thread-per-core model in programming towards more dynamic concurrency models like work-stealing, highlighting the implications for performance and efficiency in async runtimes. It argues that with increasing core counts and improved IO latencies, traditional data processing paradigms are being reconsidered, suggesting a need for more flexible, shared-state concurrency approaches.
Wren is a lightweight, class-based concurrent scripting language designed for ease of embedding in applications. It features a fast single-pass compiler, a compact object representation, and is built around an accessible C API, making it a practical choice for developers. With a familiar modern syntax, Wren aims to simplify and enhance the scripting experience.
The article introduces the Reactive Programming paradigm as an enhancement to Go's capabilities in concurrent applications, particularly for event-driven systems. It highlights the limitations of using Goroutines and channels for complex data processing pipelines and presents the "ro" package as a cleaner, more maintainable alternative that simplifies the creation of reactive data streams. The author also compares it to existing libraries like RxGo, emphasizing the advantages of the new approach.
The article discusses the author's journey in adopting the Zig programming language for network programming, highlighting the development of "Zio," an asynchronous I/O and concurrency library for Zig. The author contrasts their experiences with previous languages like C++ and Go, emphasizing Zig's capabilities in creating efficient and scalable network applications. Zio allows for easier asynchronous programming through stackful coroutines, achieving high performance in both single-threaded and multi-threaded environments.