httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <jle...@silverhawk.net>
Subject Re: A web based terminal emulator as an Apache module?
Date Fri, 09 Jan 2015 17:35:19 GMT
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 <sean.neeley@producepro.com>
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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message