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