Asynchronous and Event-Driven Programming Questions
Non-blocking execution models: callbacks, promises and futures, async/await, event loops, and event-driven and reactive architectures. Covers reasoning about ordering, back-pressure, and error propagation in asynchronous flows, including data-fetching patterns. Central to modern frontend, backend, and mobile runtimes.
Design a producer-consumer pipeline in RxSwift or RxKotlin for streaming high-rate sensor data. Requirements: background transformations, backpressure handling to avoid unbounded memory growth, and delivering processed batches to UI on the main thread with minimal latency. Describe operators, schedulers/dispatchers, and a backpressure strategy you would choose.
Implement a debounce helper for search input in a mobile UI. Provide code in Swift or Kotlin that waits 300ms after the last keystroke before triggering a network search, cancels previous pending work if new input arrives, and ensures results update the UI on the main thread.
Design an event-driven concurrency architecture for a mobile app using Reactive Streams (RxJava/RxSwift) or Flow. Explain how you handle threading (subscribeOn/observeOn), backpressure, long-running operations, and error handling. Provide examples of where backpressure matters and how you address it.
That is every published Asynchronous and Event-Driven Programming question for Mobile Developer so far. Browse the other topics in this category, or practice this one interactively.