Server Push"

From Documentation
m
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{ZKDevelopersReferencePageHeader}}
 
{{ZKDevelopersReferencePageHeader}}
  
HTTP is a request-and-response protocol. Technically, there is no way to have the server to actively ''push'' data to the client. However, there are [http://en.wikipedia.org/wiki/Push_technology a few approaches] to emulate ''push''. They could be summarized to two approaches, client polling and comet<ref>More precisely, it is so-called long polling.</ref>, that are both supported.
+
HTTP is a request-and-response protocol. Technically, there is no way to have the server to actively ''push'' data to the client. However, there are [http://en.wikipedia.org/wiki/Push_technology a few approaches] to emulate ''push'' -- it is also called Ajax Push. We can summarize these approaches in 2 categories:
 +
# client polling and  
 +
# comet (more precisely, it is the so-called long polling)
  
Different approaches have different pros and cons, and we discuss them in the [[ZK Developer's Reference/Server Push/Configuration|Configuration]] section.
+
They are both supported in ZK.
  
No matter which implementation you choose, the use is the same. [[ZK Developer's Reference/Server Push/Event Queues|The Event Queue]] is the high-level API, and the suggested approach for its simplicity. However, if you prefer to access the low-level API directly, you could refer to the [[ZK Developer's Reference/Server Push/Synchronous Tasks|Synchronous Tasks]] and [[ZK Developer's Reference/Server Push/Asynchronous Tasks|Asynchronous Tasks]] sections, which are two sets of low-level for tasks that can be executed either synchronously or asynchronously.
+
Different approaches have different pros and cons, and we will discuss them in the [[ZK Developer's Reference/Server Push/Configuration|Configuration]] section.
 +
 
 +
No matter which implementation you choose, the usage is the same. The [[ZK Developer's Reference/Server Push/Event Queues|Event Queue]] is the high-level API, and this is a suggested approach for its simplicity. However, if you prefer to access the low-level API directly, you could refer to the [[ZK Developer's Reference/Server Push/Asynchronous Tasks|Asynchronous Tasks]] and [[ZK Developer's Reference/Server Push/Synchronous Tasks|Synchronous Tasks]] sections, depending on whether your task can be executed asynchronously.
 +
 
 +
 
 +
= Browser Concurrent Connection Limitation =
 +
The server push (exception polling) establishes an open connection. Modern web browsers typically impose a limitation on the number of simultaneous HTTP connections that can be established with a single domain. According to the HTTP specification outlined in RFC2616, this constraint is commonly set to a maximum of '''6''' concurrent connections per domain.
 +
 
 +
See [https://docs.diffusiondata.com/cloud/latest/manual/html/designguide/solution/support/connection_limitations.html Browser connection limitations].
  
 
{{ZKDevelopersReferenceHeadingToc}}
 
{{ZKDevelopersReferenceHeadingToc}}
  
<blockquote>
+
 
----
 
<references/>
 
</blockquote>
 
 
{{ZKDevelopersReferencePageFooter}}
 
{{ZKDevelopersReferencePageFooter}}

Latest revision as of 09:21, 14 September 2023

HTTP is a request-and-response protocol. Technically, there is no way to have the server to actively push data to the client. However, there are a few approaches to emulate push -- it is also called Ajax Push. We can summarize these approaches in 2 categories:

  1. client polling and
  2. comet (more precisely, it is the so-called long polling)

They are both supported in ZK.

Different approaches have different pros and cons, and we will discuss them in the Configuration section.

No matter which implementation you choose, the usage is the same. The Event Queue is the high-level API, and this is a suggested approach for its simplicity. However, if you prefer to access the low-level API directly, you could refer to the Asynchronous Tasks and Synchronous Tasks sections, depending on whether your task can be executed asynchronously.


Browser Concurrent Connection Limitation

The server push (exception polling) establishes an open connection. Modern web browsers typically impose a limitation on the number of simultaneous HTTP connections that can be established with a single domain. According to the HTTP specification outlined in RFC2616, this constraint is commonly set to a maximum of 6 concurrent connections per domain.

See Browser connection limitations.





Last Update : 2023/09/14

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.