moo and web pages

3 views
Skip to first unread message

Nathan Smith

unread,
Jul 27, 2017, 9:39:12 PM7/27/17
to MOO Talk
greetings, fellow moo coders
I am looking for a method to get my moo to handle, or be able to post, web pages.
There are several methods I see possible here.
*1. Have file i/o write particular copies of files to a web folder, which php can then draw from with include statements, or even, have the moo write html files.
*2. Have php talk directly to a port on the moo. I played with this briefly, and php seemed unable to reliably communicate with the moo.
*3. MXP, what ever that is. I have found very little information on this, and would appreciate more detail.

If anyone knows of anything that would help, I would highly appreciate everyones input.
Thank you

Michael Munson

unread,
Jul 27, 2017, 10:30:44 PM7/27/17
to Nathan Smith, MOO-...@googlegroups.com
Presently what I use is nginx as a reverse proxy that directly serves static content for the moo (any thing from /static/ gets translated into moo/files/public/static and served by nginx. Then anything else is reverse proxied by nginx to an MOO code HTTPD server (the one written by Todd in his improvise db.)


However I am working on adding boost asynchronous HTTP server/client support into the MOO directly, it sort of works but some work still to do.

--
You received this message because you are subscribed to the Google Groups "MOO Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to MOO-talk+unsubscribe@googlegroups.com.
To post to this group, send email to MOO-...@googlegroups.com.
Visit this group at https://groups.google.com/group/MOO-talk.
For more options, visit https://groups.google.com/d/optout.

Wolfgang Faust

unread,
Jul 27, 2017, 11:32:38 PM7/27/17
to Nathan Smith, MOO Talk
On Thu, Jul 27, 2017 at 9:30 PM, Nathan Smith <lordva...@gmail.com> wrote:
greetings, fellow moo coders
I am looking for a method to get my moo to handle, or be able to post, web pages.

Do you just want to be able to serve static pages, or do you actually want interactivity? I see below that you mention PHP, but it's not clear how much you want to do in PHP and how much you'd prefer to do on the MOO side.
 
There are several methods I see possible here.
*1. Have file i/o write particular copies of files to a web folder, which php can then draw from with include statements, or even, have the moo write html files.
For this I think you will need to get a file I/O patch, since the base LambdaMOO doesn't support files; I think Stunt might support this and I'm pretty sure I've seen other patches floating around as well.
 
*2. Have php talk directly to a port on the moo. I played with this briefly, and php seemed unable to reliably communicate with the moo.
What sorts of problems did you have? I assume familiarity with the PHP sockets API, but you'll probably also want to implement a custom login or out-of-band command or something of that ilk rather than trying to drive the session interactively.
 
*3. MXP, what ever that is. I have found very little information on this, and would appreciate more detail.
Here's a writeup on how the MXP protocol works (plus excruciating amounts of technical detail on implementation): http://www.gammon.com.au/mushclient/addingservermxp.htm
I don't think it's what you're looking for, as it's intended to be used over a standard (long-running) telnet-like session.
 
Some additional options:

4. The Stunt server includes a builtin HTTP server, which you can bind directly to a public port; this allows you to do everything inside of the MOO.

5. The listen() function allows you to create a server inside of your MOO which will listen and accept connections on a port. You could either use this to directly implement an HTTP server, or implement a different protocol which PHP can talk to. Moo Canada uses this feature to implement both an HTTP server and a Gopher server, available as http://www.moo.ca/80.:! and http://www.moo.ca/70.:! respectively. The HTTP server is much more full-featured, but the Gopher server is a lot simpler and the code is therefore very easy to understand.

I've written above a brief overview of each option, but I can provide more detail if there are particular aspects you'd like to know more about.
Reply all
Reply to author
Forward
0 new messages