All fields

“Background Tasks” in Information Technology

66 questions across 7 technologies.

Information Technology

66 questions in 7 technologies

#QuestionTechnologyTopicLevel
1What is the workmanager package, and how does it provide a genuinely consistent Flutter interface for scheduling periodic or one time background tasks across both Android and iOS? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerBeginner
2What is a cron job, and how would you schedule recurring background tasks in a Node.js application using node-cron or BullMQ's repeatable jobs? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesIntermediate
3What is a BackgroundService in ASP.NET Core, and how do you register one to run alongside a web application? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesBeginner
4What is a background task in a Flutter app, and why can this kind of work not always simply be handled the exact same way as regular code running while the app is actively open and visible on screen? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerBeginner
5How do you safely access scoped services like a DbContext from within a BackgroundService, which is registered as a singleton? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
6How should exceptions be handled inside a BackgroundService's work loop to prevent one failure from silently stopping all future processing? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
7How do multiple independently-registered BackgroundServices coexist within the same application, and does registration order matter? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
8What is the difference between IHostedService and the BackgroundService convenience base class? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
9How does IHostApplicationLifetime let a BackgroundService react to application startup and shutdown events? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
10How would you configure a BackgroundService to fail fast and crash the host if a critical startup dependency (like a message broker) is unreachable? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
11Why does a scheduled background task registered through workmanager not always execute at exactly its precisely specified interval, and what factors does the underlying operating system actually consider before genuinely allowing that background task to actually run? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerIntermediate
12How does a background task's callback function actually run in a separate isolate, and what practical implications does this actually have for accessing shared app state or plugins from within that specific background task? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerIntermediate
13How should a background task properly handle a failure, such as a network request genuinely failing partway through, and what retry behavior does workmanager actually provide out of the box for this kind of situation? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerIntermediate
14How does graceful shutdown work for a BackgroundService, and how should ExecuteAsync respect the CancellationToken? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
15How would you implement a producer-consumer background processing pipeline using System.Threading.Channels alongside a BackgroundService? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
16How would you implement a cron-like scheduled background job (e.g., 'run daily at 2 AM') without a third-party scheduling library? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
17How do background services interact with health checks to signal their operational status to an orchestrator like Kubernetes? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
18How would you implement retry logic with exponential backoff for a background service that calls a potentially-flaky external API? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
19How would you implement a background task queue accepting ad-hoc work items dynamically at runtime, rather than a fixed polling loop? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
20How do you test a BackgroundService's business logic without waiting for its actual polling interval, keeping tests fast? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
21How do iOS's specific background execution restrictions, particularly around limited genuine background task execution time, differ meaningfully from Android's own generally more permissive background task model? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerAdvanced
22What strategies help ensure a background task genuinely completes reliably and efficiently, particularly when the specific work involved, such as uploading several large files, could potentially take considerably longer than the platform's own available background execution time actually permits? Flutter › Flutter Background Tasks & WorkManagerFlutterFlutter Background Tasks & WorkManagerAdvanced
23How do you implement a periodic scheduled task using PeriodicTimer instead of Task.Delay, and what problem does it solve? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
24How do you run background work or scheduled tasks in MAUI? .NET MAUI › Device Features & Essentials.NET MAUIDevice Features & EssentialsAdvanced
25How do you run background work or scheduled tasks in MAUI? .NET MAUI › Device Features & Essentials.NET MAUIDevice Features & EssentialsAdvanced
26How do you use IServiceScopeFactory to manually create a DI scope outside the normal per-request pipeline, such as inside a background service? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionIntermediate
27How should you properly handle a push notification differently depending on whether your app is currently genuinely running in the foreground, running in the background, or completely fully terminated? Flutter › Push Notifications in Flutter (FCM)FlutterPush Notifications in Flutter (FCM)Intermediate
28What are important battery usage and privacy considerations when continuously tracking a user's own real time location in the background, such as for a genuine fitness tracking app or a delivery driver app? Flutter › Maps & Geolocation in FlutterFlutterMaps & Geolocation in FlutterAdvanced
29How would you implement a concurrency-limited task queue in Node.js to process many async tasks without overwhelming a downstream resource? Node.js › Async PatternsNode.jsAsync PatternsAdvanced
30What is the ASP.NET Core Health Checks middleware, and what problem does it solve? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksBeginner
31What are the two primary ways to create a thread in Java (extending Thread versus implementing Runnable), and which is generally preferred? Java › Concurrency & ThreadsJavaConcurrency & ThreadsBeginner
32What is the difference between calling Thread.start() and Thread.run() directly, and why is calling run() directly a common beginner mistake? Java › Concurrency & ThreadsJavaConcurrency & ThreadsBeginner
33What is the difference between the async and await keywords in C#, and how do they work together? C# › Asynchronous ProgrammingC#Asynchronous ProgrammingBeginner
34What is the difference between Singleton, Scoped, and Transient service lifetimes, and how does Scoped specifically map to an HTTP request? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionIntermediate
35How does the Options pattern's IOptions<T>/IOptionsSnapshot<T> relate to and build upon the standard DI container? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionIntermediate
36What is the difference between temporary file storage (during processing) and permanent storage for uploaded files, and why should uploads generally not be saved directly to their final destination? ASP.NET Core › File Uploads & Streaming Large FilesASP.NET CoreFile Uploads & Streaming Large FilesIntermediate
37How do health checks interact with dependency injection scoping, particularly for checks that need a scoped service like a DbContext? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksIntermediate
38What is the ASP.NET Core Module (ANCM), and what specific role does it play when hosting under IIS? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesIntermediate
39How do you configure request timeout behavior differently at the Kestrel level versus the reverse proxy level, and why might they need to be coordinated? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesIntermediate
40What is the ExecutorService framework, and why is it generally preferred over manually creating and managing individual Thread objects? Java › Concurrency & ThreadsJavaConcurrency & ThreadsIntermediate
41What is the difference between wait()/notify()/notifyAll() (Object's intrinsic monitor methods) and the newer java.util.concurrent tools, and why are the older methods considered error-prone? Java › Concurrency & ThreadsJavaConcurrency & ThreadsIntermediate
42How would you use the WatchService API (java.nio.file) to monitor a directory for file system changes (creation, modification, deletion) in real time? Java › I/O & NIOJavaI/O & NIOIntermediate
43How would you make an asynchronous, non-blocking HTTP request using HttpClient's sendAsync() method, and how does the returned CompletableFuture integrate with the rest of an asynchronous pipeline? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate
44How do you properly establish genuine ongoing bidirectional communication between the main isolate and a manually spawned separate isolate using SendPort and ReceivePort, for a scenario requiring more than just a single one off request and response? Flutter › Flutter Isolates & MultithreadingFlutterFlutter Isolates & MultithreadingIntermediate
45What is an EventChannel, and how does it genuinely differ from a MethodChannel specifically in terms of properly supporting an ongoing continuous stream of native events rather than just one single request and response? Flutter › Platform Channels (Native Android & iOS Integration)FlutterPlatform Channels (Native Android & iOS Integration)Intermediate
46How would you implement real-time UI updates in a Blazor Server component in response to a backend event, like a new order being placed elsewhere in the system? ASP.NET Core › Blazor Integration with ASP.NET CoreASP.NET CoreBlazor Integration with ASP.NET CoreAdvanced
47What is the difference between IOptions<T>, IOptionsSnapshot<T>, and IOptionsMonitor<T>, and which is safe to inject into a singleton? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
48How does configuration hot-reload work with reloadOnChange for appsettings.json, and what are its limitations? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
49What is the 'captive dependency' problem, and how does ASP.NET Core's DI container help catch it automatically? ASP.NET Core › Dependency InjectionASP.NET CoreDependency InjectionAdvanced
50How would you implement resumable/chunked file uploads to support very large files over unreliable network connections? ASP.NET Core › File Uploads & Streaming Large FilesASP.NET CoreFile Uploads & Streaming Large FilesAdvanced
51How would you implement virus/malware scanning for uploaded files before they're made available for download by other users? ASP.NET Core › File Uploads & Streaming Large FilesASP.NET CoreFile Uploads & Streaming Large FilesAdvanced
52How do the four gRPC method types (unary, server streaming, client streaming, bidirectional streaming) differ, and when would you use each? ASP.NET Core › gRPC ServicesASP.NET CoregRPC ServicesAdvanced
53How do you differentiate liveness and readiness health checks using tags, and why does Kubernetes treat these two probe types differently? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksAdvanced
54How would you implement a startup-specific health check distinct from ongoing liveness/readiness, useful for slow-starting applications with lengthy initialization (like cache warming or large data loads)? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksAdvanced
55How would you implement graceful shutdown handling in Kestrel/ASP.NET Core to ensure in-flight requests complete before a container or process terminates during a deployment or scale-down event? ASP.NET Core › Hosting Models: Kestrel, IIS & Reverse ProxiesASP.NET CoreHosting Models: Kestrel, IIS & Reverse ProxiesAdvanced
56How would you implement automated, zero-downtime certificate renewal using Let's Encrypt (ACME protocol) for a production ASP.NET Core deployment? ASP.NET Core › HTTPS, Certificates & Transport SecurityASP.NET CoreHTTPS, Certificates & Transport SecurityAdvanced
57How would you write a custom Maven plugin or Gradle task to perform project-specific build automation not covered by existing plugins? Java › Build Tools: Maven & GradleJavaBuild Tools: Maven & GradleAdvanced
58How does java.util.concurrent's ReentrantLock differ from the synchronized keyword, and what additional capabilities does it provide (tryLock, fairness, interruptible locking)? Java › Concurrency & ThreadsJavaConcurrency & ThreadsAdvanced
59How do CompletableFuture's composition methods (thenApply, thenCompose, thenCombine) enable building asynchronous pipelines, and what's the difference between thenApply and thenCompose? Java › Concurrency & ThreadsJavaConcurrency & ThreadsAdvanced
60How would you use CountDownLatch, CyclicBarrier, and Semaphore for different thread coordination scenarios, and what distinguishes their use cases? Java › Concurrency & ThreadsJavaConcurrency & ThreadsAdvanced
61How would you implement asynchronous file I/O using AsynchronousFileChannel, and how does this differ from both the classic blocking java.io model and NIO's Selector-based non-blocking channels? Java › I/O & NIOJavaI/O & NIOAdvanced
62How would you implement file locking (using FileLock) to coordinate exclusive access to a shared file across multiple processes, and what are the platform-specific reliability caveats? Java › I/O & NIOJavaI/O & NIOAdvanced
63How would you implement a recurring event scheduling system that correctly handles both fixed-instant recurrence (every exactly 24 hours) and calendar-based recurrence (every day at 9 AM local time), given these have meaningfully different behavior across DST transitions? Java › Java Date & Time API (java.time)JavaJava Date & Time API (java.time)Advanced
64How would you implement a WebSocket client using java.net.http.WebSocket for real-time, bidirectional communication, and how does its event-driven Listener interface work? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientAdvanced
65How can you properly implement geofencing, meaning triggering a specific action whenever a user's own device actually enters or exits a genuinely predefined specific geographic area, within a Flutter app? Flutter › Maps & Geolocation in FlutterFlutterMaps & Geolocation in FlutterAdvanced
66How can you properly implement an effective retry strategy with exponential backoff for a genuinely failed network request, meaningfully improving your app's own overall resilience against genuinely temporary, transient network issues? Flutter › Networking with HTTP & DioFlutterNetworking with HTTP & DioAdvanced