Asynchronous Task Engine for Phased Sponsored Content
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing online systems face inefficiencies in content creation and publication, particularly with sponsored content, due to long wait times, task failures, and inability to handle multiple phases of content creation or edits by multiple users, along with vulnerability to connection interruptions.
Innovation Solution
An asynchronous task execution engine that allows tasks to be executed based on system load, considers optimal execution order, and automatically retries failed tasks, enabling phased content creation with draft management and conflict resolution, using a hierarchical structure for draft storage and key-value tables for efficient content delivery.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If tasks are executed synchronously in an online system, then task execution order is maintained, but wait time increases and system productivity decreases
Solution Approach 1:
The system uses periodic polling to check task execution status and results, allowing tasks to be submitted and processed asynchronously. The polling mechanism periodically retrieves task results without blocking the user interface, thus reducing wait time while maintaining task execution order through structured result retrieval.
Solution Approach 2:
A task management service acts as an intermediary between task submission and result retrieval. This service queues tasks, manages their execution order, and provides structured result retrieval, decoupling the submission and consumption of task results to improve overall system productivity.
2Adaptability or versatility
If multiple drafts of content are stored and managed, then content creation flexibility and collaboration are improved, but system complexity increases
Solution Approach 1:
The content creation process is segmented into multiple independent drafts, each representing a distinct phase or version. This segmentation allows parallel work by multiple users on different drafts while maintaining clear boundaries between versions, managing complexity through structured separation of content states.
Solution Approach 2:
Multiple drafts are created and prepared in advance before final publication. This preliminary action allows content to be developed, reviewed, and approved through various phases without blocking the overall publication process, improving flexibility while managing complexity through staged preparation.
3Reliability
If task execution considers system load and optimizes order, then system performance is maintained, but task execution time may increase
Solution Approach 1:
The task execution system dynamically adjusts execution order and resource allocation based on real-time system load conditions. When the system is under heavy load, tasks are queued and executed in an optimized sequence that prevents overload and maintains performance, accepting longer execution time as a necessary trade-off for system stability.
Solution Approach 2:
The system changes execution parameters such as task priority, batch size, and parallelism level based on system load conditions. This adaptive parameter adjustment allows the system to maintain optimal performance across varying load conditions, balancing execution time and system reliability dynamically.
4Reliability
If failed tasks are automatically retried, then task reliability is improved, but system resource usage increases
Solution Approach 1:
The system implements automatic retry mechanisms with exponential backoff and jitter, cushioning against transient failures by retrying tasks after appropriate delays. This beforehand cushioning accounts for potential failures without requiring manual intervention, improving reliability while managing resource usage through intelligent retry scheduling.
Solution Approach 2:
The task execution system uses feedback from task results to determine whether to retry failed tasks. By analyzing failure causes and system state, the system intelligently decides on retry actions, improving reliability while avoiding unnecessary resource consumption from redundant retries of permanently failed tasks.
Data Source
AI summary
An online system uses a task async engine to coordinate task execution, such as for phased content creation, where the system enables content providers to efficiently create and publish sponsored content in multiple phases. Each phase of the content creation is represented by a draft of the content. Multiple drafts of the content are stored in a repository of the online system for optimizing content delivery and publication, such as quick identification of conflicts in a draft based on analysis of draft fragments of the draft. Objects associated with the sponsored content are stored in an object model. The connections amongst the various draft segments of a draft are stored in a hierarchy structure. Each user associated with a draft has a role, where all of the roles can contribute to the draft. The online system efficiently publishes the drafts and presents the sponsored content to its target users.


