aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-04-16 03:22:37 +1000
committerDavid Walter Seikel2012-04-16 03:22:37 +1000
commit12a988c1af70c6e3f20006dac0b642f858e51766 (patch)
tree3b1a5fc1429e5b54211cae967d85621a3b899f90 /LuaSL
parentSome clarifications of the license stuff. (diff)
downloadSledjHamr-12a988c1af70c6e3f20006dac0b642f858e51766.zip
SledjHamr-12a988c1af70c6e3f20006dac0b642f858e51766.tar.gz
SledjHamr-12a988c1af70c6e3f20006dac0b642f858e51766.tar.bz2
SledjHamr-12a988c1af70c6e3f20006dac0b642f858e51766.tar.xz
Some clarifications of the LuaSL design.
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/README39
1 files changed, 24 insertions, 15 deletions
diff --git a/LuaSL/README b/LuaSL/README
index cf5f9ae..b5b4b86 100644
--- a/LuaSL/README
+++ b/LuaSL/README
@@ -17,14 +17,9 @@ Design.
17 17
18The basic design will be made up as I go along, but so far I have this - 18The basic design will be made up as I go along, but so far I have this -
19 19
20An object is a file system directory, full of LSL scripts as text files,
21notecards as text files, animations as BVH (or later BVJ) files, etc.
22There will be some sort of metadata in place. This could be created by
23our own OpenSim compatible cache module.
24
25A parser parses an LSL script, validating it and reporting errors. 20A parser parses an LSL script, validating it and reporting errors.
26 21
27A preprocessor takes the result of the parse, and converts it into Lua 22A translator takes the result of the parse, and converts it into Lua
28source. Each LSL script becomes a Lua state. LSL states are handled as 23source. Each LSL script becomes a Lua state. LSL states are handled as
29Lua tables, with each LSL state function being a table function in a 24Lua tables, with each LSL state function being a table function in a
30common metatable. LL and OS functions are likely to be C or Lua 25common metatable. LL and OS functions are likely to be C or Lua
@@ -37,12 +32,15 @@ LuaJIT is used as the Lua compiler, library, and runtime.
37 32
38Luaproc is used to start up operating system threads and hand Lua states 33Luaproc is used to start up operating system threads and hand Lua states
39between them. Luaproc messaging is also being used, but might need to 34between them. Luaproc messaging is also being used, but might need to
40change to edje messaging. 35change to edje messaging. Note - luaproc has been extensively rewritten
36for this project, mostly converting it to use EFL. That rewrite
37substantially shrunk the source code. More might be rewritten in
38future.
41 39
42Nails is used to pump commands in and out of the LuaSL system. Incoming 40Nails will be used to pump commands in and out of the LuaSL system.
43commands invoke LSL events via the LuaSL state metatable. LL and OS 41Incoming commands invoke LSL events via the LuaSL state metatable. LL
44functions that impact the world will be converted to nails commands sent 42and OS functions that impact the world will be converted to nails
45to the command pump. 43commands sent to the command pump.
46 44
47Initialy, since this is the first thing being written, a nails command 45Initialy, since this is the first thing being written, a nails command
48pump client needs to be installed into OpenSim's C# stuff. Though it 46pump client needs to be installed into OpenSim's C# stuff. Though it
@@ -51,12 +49,18 @@ the ROBUST route, see how far I can get. That's the general principle
51applying in all of this - try to avoid C# and see how for we can get. 49applying in all of this - try to avoid C# and see how for we can get.
52lol 50lol
53 51
54A watchdog thread is used to make sure no LuaSL script spends forever 52On the other hand, might be better to leverage the existing C#
55processing any event. 53implementations of LSL functions, just to get things up and running
54quickly. To that end, a protocol involving exchanging snippets of Lua
55over a network socket has been developed, and the next step is to write
56the C# side. sigh
57
58A watchdog thread should be used to make sure no LuaSL script spends
59forever processing any event.
56 60
57Some form of serialization will need to be created for saving script 61Some form of serialization will need to be created for saving script
58state during shutdowns, passing script state to other threads / 62state during shutdowns, passing script state to other threads /
59processes / computers. 63processes / computers. Aparently Lua is good at this.
60 64
61There will have to be a MySQL (and maybe SQLite) client in the system, 65There will have to be a MySQL (and maybe SQLite) client in the system,
62so we can talk directly to the local sim database. Esskyuehl may be 66so we can talk directly to the local sim database. Esskyuehl may be
@@ -66,6 +70,11 @@ Email, HTTP, and XML-RPC might need to be dealt with by us. A ROBUST
66client will be needed to. Azy might be suitable, but it's also in 70client will be needed to. Azy might be suitable, but it's also in
67prototype. 71prototype.
68 72
73An object is a file system directory, full of LSL scripts as text files,
74notecards as text files, animations as BVH (or later BVJ) files, etc.
75There will be some sort of metadata in place. This could be created by
76our own OpenSim compatible cache module.
77
69 78
70Test harness. 79Test harness.
71------------- 80-------------
@@ -82,7 +91,7 @@ Later I should add stock standard OpenCollar scripts from SL. They are
82a bitch to get working under OpenSim, so would be good compatability 91a bitch to get working under OpenSim, so would be good compatability
83tests. 92tests.
84 93
85Various eina logging domains will be used to handle whisper, say, shout, 94Various eina logging domains might be used to handle whisper, say, shout,
86etc. 95etc.
87 96
88Performance testing will have to be done on 5000 scripts, to see how 97Performance testing will have to be done on 5000 scripts, to see how