Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5DDB410518 for ; Fri, 9 Jan 2015 17:38:16 +0000 (UTC) Received: (qmail 53250 invoked by uid 500); 9 Jan 2015 17:38:17 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 53207 invoked by uid 500); 9 Jan 2015 17:38:17 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 53196 invoked by uid 99); 9 Jan 2015 17:38:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2015 17:38:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jlewis@silverhawk.net designates 209.85.192.47 as permitted sender) Received: from [209.85.192.47] (HELO mail-qg0-f47.google.com) (209.85.192.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2015 17:38:12 +0000 Received: by mail-qg0-f47.google.com with SMTP id q108so9999909qgd.6 for ; Fri, 09 Jan 2015 09:37:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=9r1SxzIDrnN45qBJYnm7MnJQ/FJbwg82VgXymeyFv+A=; b=b5Fv5/ya60v1ysxNq8XS0/G7c2xk7Ja85DBN4QYKIDVEFIUO2nh/kcD6XURJnkMaLv 04mEizBH1O1NCoXmm66z1w0qpIpCA7JAzM3KQpp8Owe9IIaLm8P3ldV9NHfaIx5Sf7Gl qksq0lFoRgaYO1Ymx9GJBqt/eYar1J+dof+bdaZChOD3tEZ2HboOLHVaBkvwvxVmc1bN Y8SjY942gM6BxuvyKm6XUiDpSTbQpl6YfUw9PoWGeqlfj5gD6Ktxcug+JTbF8khu0Gh1 CzsqgZV/cbxtTSgKk5IArWl6ZdnatkgubL2S33J/JJS0l2Lw5P1hS3Fa7QINtLXmEREU HcVA== X-Gm-Message-State: ALoCoQl6N4PRQKrRND7ZM6NpYLkjJ6dTPDFLDm+WAU8GeGV+/VPopUMmau7w0maBWG/mdp5H3nBK MIME-Version: 1.0 X-Received: by 10.224.40.136 with SMTP id k8mr7113084qae.69.1420825025343; Fri, 09 Jan 2015 09:37:05 -0800 (PST) Received: by 10.140.34.163 with HTTP; Fri, 9 Jan 2015 09:37:05 -0800 (PST) X-Originating-IP: [199.190.170.21] In-Reply-To: References: Date: Fri, 9 Jan 2015 10:37:05 -0700 Message-ID: Subject: Re: A web based terminal emulator as an Apache module? From: Joe Lewis To: "modules-dev@httpd.apache.org" Content-Type: multipart/alternative; boundary=047d7bf0e73cec89d7050c3b9a47 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bf0e73cec89d7050c3b9a47 Content-Type: text/plain; charset=UTF-8 Here is a good example thread : http://grokbase.com/t/apache/modules-dev/11bp9bhxr5/basic-example-shared-memory-code On Fri, Jan 9, 2015 at 10:35 AM, Joe Lewis wrote: > It is definitely possible to share information - see the apr_shm_* > functions (or check the history on this list for shared memory). Eash POST > request is considered a separate event, and is processed as such, which > means there is no state in the protocol itself (there is when you add HTTP > headers into the mix, such as "cookies"). > > For what you are trying to do - I'd simply assume it's stateless, and > design any modules to utilize shared memory. > > Joe > > On Fri, Jan 9, 2015 at 9:30 AM, Sean Neeley > wrote: > >> I'm trying to determine if it is plausible to build an apache module for a >> web based terminal emulator. I would be borrowing some of the code from >> the ShellInaBox project: >> https://code.google.com/p/shellinabox/ >> The code uses openpty() to create a new process operating in a pseudo-tty. >> The apache module would have to pass keyboard and display information back >> and forth from the client browser to the pseudo-tty in the module. >> >> It seems like with the pre-fork mpm, I cannot guarantee that the ajax POST >> requests will make it to the same module instance each time. Are modules >> stateless? Is it possible to share the pseudo-tty and hashmaps keeping >> session information across all instances of my module? Or is there >> anything that can be added to the POST request to guarantee that it goes >> to >> a specific module instance? >> >> Thanks for the help. >> >> - Sean >> > > --047d7bf0e73cec89d7050c3b9a47--