aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/sledjchisl/README
diff options
context:
space:
mode:
authoronefang2020-09-08 21:34:54 +1000
committeronefang2020-09-08 21:34:54 +1000
commitbd58d3012c26d16150f650c389d1136741d3939d (patch)
tree3d2aec8bfe0a0c9061ddb4814e71aff33b9b8dc8 /src/sledjchisl/README
parentAdd the old bash scripts. (diff)
downloadopensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.zip
opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.gz
opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.bz2
opensim-SC-bd58d3012c26d16150f650c389d1136741d3939d.tar.xz
Add the SledjChisl stuff.
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/README118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/sledjchisl/README b/src/sledjchisl/README
new file mode 100644
index 0000000..31a4b30
--- /dev/null
+++ b/src/sledjchisl/README
@@ -0,0 +1,118 @@
1I'm re-purposing this for SledjHamr https://sledjhamr.org/git/docs/index.html
2
3The general structure of SledjHamr is a bunch of servers talking to each
4other via Internet (or just local) connections. One of them is a web
5server for assets, world data, and inventory. Actually most of OpenSim
6is just a collection of web servers.
7
8Originally I didn't think using a web based world client was a good idea,
9however it might be better to have one, for reasons. Now I need a web
10management console that can do all the things the current tmux console
11can, including OpenSim console and commands. Plus account management for
12users. I can also use a web based Jabber / XMPP front end to chat, IM,
13and group chatter, which would run in the normal viewers web browser.
14This provides a doorway into putting SledjHamr stuff in existing viewers
15without needing them to support it. So a web based viewer now makes more
16sense, and also means we can get away with not needing a viewer at all.
17
18Toybox itself doesn't include a web server, and I don't think there is
19one on the roadmap. So we have to use an external web server, which was
20a design goal of SledjHamr in the first place, using existing mature
21HTTP infrastructure, coz that's already solved problems for a bunch of
22things that plague OS/SL to this day. Clear your cache! Pffft.
23
24So sledjchisl.c will be the "love world server", though initially it just
25drives OpenSim_SC in tmux via tmux commands to send keys and read output.
26Later it might run opensim_SC directly and use STDIN and STDOUT to do
27everything. It'll also provide the text management front end that runs
28in the left tmux panel of the first window, which is why it's based on
29boxes in the first place. Later still it can take over opensim_SC
30functions as I move them out of mono.
31
32We will need a text, web, and GUI version of this management front end.
33Hmmm, maybe don't need a GUI version, GUI users can just run a terminal.
34
35After much research, FastCGI / FCGI seems to be the most portable way of
36interfacing with existing web servers. FCGI protocol closes STDERR and
37STDOUT, and uses STDIN as it's two way communications channel to the web
38server, so our FCGI module can't be used as the text management front
39end. This is probably a good idea to keep them seperate anyway, for
40security, coz the web server is exposed to the world, the console isn't.
41
42Currently sledjchisl.c tests to see if it's running in tmux already, if
43it isn't it starts up tmux runs itself into this new tmux, then exits.
44So it could also test if it's running from FCGI, and switch to web mode,
45then it'll need to find the tmuxed instance to send commands to it.
46Either via nails connection, or sending tmux commands via shell.
47
48FCGI has methods of dealing with auth and templates. B-)
49
50So for now I think I'll have the text and web management front ends in
51sledjchisl.c, and the love world server as well. I can split them up
52later if I need to.
53
54
55--------------------------------------------------------------------
56
57How to install it.
58------------------
59
60It's all still partly written, un-released, and experimental at the
61moment. So thes are just rough notes about what is needed.
62
63There are two parts, the OpenSim runner part and the web pages part. The
64OpenSim runner part requjires the rest of opensim-SC to be installed,
65which is covered by other documents in this source code repo. SO the
66below only talks about the web pages part.
67
68So far I have only tried this with Apache 2, but it should work fine with
69other web servers that support FCGI. I'm using spawn-fcgi which was
70written for lighttpd, and seems to be the proper way to support FCGI in
71Nginx as well.
72
73Until I have actually released this, it'll be source code only. So you
74need a C development environment to compile all the C source code.
75
76Some of the dependencies are included, like LuaJIT, qLibc, the FCGI SDK,
77and toybox. Or at least their source code git ropes are cloned during
78the build stage. The other dependencies are the development environments
79for MariaDB or MySQL (only tested with MariaDB), OpenSSL, and UUID. And
80spawn-fcgi. In a Debian based Linux distro, that could be installed by
81something like -
82
83apt install libmariadbclient-dev libssl1.0-dev uuid-dev spawn-fcgi
84
85Once you have all of that, you can run the src/BuildIt.sh script to put
86it all together. That script will also actually run the web side of
87things. Often during this early development process, that script will
88run things under a test tool like valgrind, so you'll probably need that
89to.
90
91You'll need to configure your web server to pass web requests onto
92sledjchisl. I'll add instructions for other popular web servers later,
93but for now, this is what to do with Apache 2.
94
95Load the mod_proxy_fcgi module. Include something like this in your
96virtual host definition -
97
98<FilesMatch "\.fcgi$">
99 SetHandler "proxy:unix:///opt/opensim_SC/var/cache/sledjchisl.socket|fcgi://localhost/"
100</FilesMatch>
101
102Adjust that unix:// path to match if you have installed things elsewhere.
103Also make that directory readable by the web server group.
104
105Copy the files in example/www to where eveqer your web servers document
106root is.
107
108Note that the account.html dynamic web page redirects to a HTTPS version
109of itself, so you'll need HTTPS to be working.
110
111The current web pages will then be available at something like -
112
113http://localhost/sledjchisl.fcgi/loginpage.html
114
115http://localhost/sledjchisl.fcgi/stats.html
116
117https://localhost/sledjchisl.fcgi/account.html
118