Pubsub Service Long Poll Scalability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing solutions for building scalable realtime websites face complexity and inefficiency, particularly in handling independent updates across millions of users, as traditional timer-based polling techniques are difficult to scale.
Innovation Solution
The implementation of a lightweight publish-subscribe (pubsub) model, where each realtime-enabled component of a webpage is a pubsub entity in a pubsub service, enabling independent updates and leveraging long polling for efficient communication, allowing for decoupling of publishers and subscribers and scalable backend operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If traditional timer-based polling technique is used for realtime updates, then simple implementation is achieved, but scalability to millions of users is difficult
Solution Approach 1:
The patent introduces a pubsub service as an intermediary layer between the server and clients. This service manages subscriptions and distributes updates efficiently, acting as a mediator that resolves the contradiction between simple implementation and scalability. The pubsub service handles the complexity of managing millions of connections while maintaining a relatively simple interface for individual components.
Solution Approach 2:
The system segments the realtime update mechanism into independent pubsub entities, where each realtime-enabled component operates as a separate subscription unit. This segmentation allows the system to scale to millions of users by handling each subscription independently through the pubsub service, rather than managing all connections through a single polling mechanism.
2Productivity
If pubsub model is implemented for scalable realtime updates, then scalability to millions of users is achieved, but system complexity increases
Solution Approach 1:
The pubsub service serves as a specialized intermediary that encapsulates the complexity of managing scalable realtime connections. By placing this complexity in a dedicated service layer, the overall system architecture becomes more manageable, as the pubsub service handles subscription management, connection tracking, and update distribution internally while presenting a simple interface to external components.
Solution Approach 2:
The patent uses lightweight copying mechanisms where pubsub entities can be replicated and distributed across the system. Each realtime-enabled component creates a subscription copy that can be independently managed by the pubsub service, allowing scalable replication without proportionally increasing overall system complexity.
3Productivity
If long poll publication/subscription model is used, then realtime communication efficiency is improved, but connection management complexity increases
Solution Approach 1:
The pubsub service acts as an intermediary that manages long-poll connections on behalf of individual pubsub entities. Instead of each component managing its own long-poll connections directly, the pubsub service centralizes connection management, tracking which entities have subscribers and when updates should be pushed. This reduces the connection management complexity for individual components while maintaining efficient realtime communication.
Data Source
AI summary
Architecture that utilizes a long poll publication/subscription (pubsub) model for updating realtime objects of a webpage. Each realtime-enabled object is a pubsub entity in a pubsub service. Each rendering of the webpage creates a subscription on a page object. The entity in the pubsub service enables the realtime communications of content to the webpage object. The architecture provides light-weight realtime anonymous pubsub at scale, a light-weight pubsub that can scale to the web on the backend, and integration into existing website code by plugging in at the javascript level.


