Skip to main content

Kenyth Zeng's Library tagged comet   View Popular

05 Dec 09

EtherPad: Frequently Asked Questions

Google has just now acquired EtherPad.

etherpad.com/faq - Preview

FAQ collaboration editor comet

  • Most collaboration systems merge text at the document level, or
    apply locking at the document or paragraph level. With EtherPad,
    character-level changes to a document are merged as multiple
    people type. In most cases, real-time collaborators can negotiate
    who is editing what parts of the text. In all cases, EtherPad
    ensures consistency between everyone's screens, regardless of the
    timing of network operations, using a novel synchronization
    algorithm.



    EtherPad sends messages in both directions between the browser
    and the server, using a technology often called "Comet" or "server
    push". This comparatively recent innovation in web app functionality
    allows EtherPad to be fully real-time.

24 May 09

Continuations - Jetty - Codehaus

  • The NIO libraries can help, as it allows asynchronous IO to be used and threads can be allocated to connections only when requests are being processed.
  • there is no mechanism in Java to suspend a thread and then resume it later.
  • 2 more annotations...
22 May 09

jQuery .ready in a dynamically inserted iframe - Stack Overflow

  • $(document).ready in the iframe seems to be fired too soon and the iframe content isn't even loaded yet,
  • $('iframe#myId').load(function()
  • 1 more annotations...

Comet:基于 HTTP 长连接的“服务器推”技术

  • 监控、即时通信、即时报价系统都需要将后台发生的变化实时传送到客户端而无须客户端不停地刷新、发送请求。
  • Mozilla Firefox 提供了对 Streaming AJAX 的支持, 即 readystate 为 3 时(数据仍在传输中),客户端可以读取数据,从而无须关闭连接,就能读取处理服务器端返回的信息。
  • 8 more annotations...
21 May 09

Bug 44310 – Possible data packet corruption when sending data on the outputStream of a recycled response

  • By activating
    -Dorg.apache.catalina.connector.RECYCLE_FACADES=true
    on the command line, the problem of data corruption does not occur anymore
    (exception occurs in write and not flush).
  • I have no requirement to include it in 6.0.16 since I have a workaround (disable
    recycling facades),
20 May 09

InfoQ: Web请求异步处理降低应用依赖风险

    • 问题原因:



      1. Http请求处理的阻塞方式。
      2. 后端服务处理时间过长,服务质量不稳定。
      3. Web Container接受请求线程资源有限。
      4. 改阻塞方式为非阻塞方式来处理请求。
      5. 设置后端超时时间,主动断开连接,回收资源。
      6. 修改容器配置,增加线程池大小以及等待队列长度。
  • 15 more annotations...

Nabble - Tomcat - User - comet questions

  • private class ServerCometChannel {


            private static final int OUTPUT_BUFFER_SIZE = 512;


            private CometEvent cometEvent;


            private InputStream inputStream;


            private PrintWriter outputWriter;


            public ServerCometChannel(CometEvent cometEvent) throws

    IOException, ServletException {

                this.cometEvent = cometEvent;

                inputStream = cometEvent.getHttpServletRequest().getInputStream();

                OutputStream outputStream =

    cometEvent.getHttpServletResponse().getOutputStream();

                this.outputWriter = new PrintWriter(new BufferedWriter(new

    OutputStreamWriter(outputStream),

                        OUTPUT_BUFFER_SIZE));

            }


            private String receive() throws IOException {

                StringBuffer buffer = new StringBuffer();

                byte[] buf = new byte[512];

                while (inputStream.available() > 0) {

                    int n = inputStream.read(buf);

                    if (n > 0) {

                        buffer.append(new String(buf, 0, n));

                    }

                }

                return buffer.toString();

            }


            public void send(String msg) {

                synchronized (cometEvent.getHttpServletResponse()) {

                    outputWriter.print(msg);

                    outputWriter.flush();

                }

            }


            public void close() throws IOException {

                inputStream.close();

                outputWriter.close();

            }

        }
18 May 09

Comet Daily » Blog Archive » JavaScript Tutorial

  • i have a complex servlet implementing comet -now running from Tomcat with Nio protocol enabled - that pushes data towards clients.. my only problem is having a client able to interprete what i push and display it in an easy way with good performances

Apache Tomcat Configuration Reference - The HTTP Connector

  • If the PATH(Windows) or LD_LIBRARY_PATH(on most unix system)
    environment variables contain the Tomcat native library, the APR connector
    will automatically be configured.
  • The default value is to use the value that has been set for the
    connectionTimeout attribute.
  • 2 more annotations...
17 May 09

page 6 > Asynchronous HTTP and Comet architectures - JavaWorld

  • The long poll is one of the two Comet strategies to reduce the frequency of HTTP calls
  • The second Comet strategy is response body streaming.
  • 6 more annotations...

page 3 > Asynchronous HTTP and Comet architectures - JavaWorld

  • streaming doesn't mean that the data will be read or written directly to the network. All read and write operations work on internal
    socket buffers. When a write method is called, the operating system kernel transfers the data to the socket's send buffer. Returning from the write operation just says that the data has been copied to this low-level send buffer. It doesn't say that the peer has received the data.
  • Unfortunately, the
    current Servlet API 2.5 supports neither non-blocking data streaming nor asynchronous message handling.
  • 3 more annotations...

page 2 > Asynchronous HTTP and Comet architectures - JavaWorld

  • broken into several TCP segments when sent.
  • Data transfer fragmentation can be hidden at the API level by accessing the body data as a steady and continuous stream. This
    approach, known as streaming, avoids the need to buffer large chunks of data before processing it. Streaming can also reduce
    the latency of HTTP calls, especially if both peers support streaming.
  • 1 more annotations...
1 - 20 of 41 Next › Last »
Showing 20 items per page

Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »

Join Diigo