On Thu, Mar 4, 2010 at 11:27 PM, Dewey Gaedcke <[email protected]> wrote: > I have a large graph of about 8 million rows represented in two Lua tables > (dictionaries, not arrays). Two tables (but same rows) because each table is > keyed differently. (a batch Lua process is recalculating them both > constantly) > > The graph is changing quite frequently and I want to let multiple (probably > Lua CGI) processes run shortest-path analysis (read-only) on these tables.
Note that CGI processes would certainly be the best option here. You could use FastCGI or even a small server like Xavante instead (depending on your requirements). > Given the volume of data, and the rate of change, it seems crazy to > instantiate those tables again and again in each Lua instance. So instead, > I'm wondering if Rings (or some other technique) will allow me to grant > read-only access to those tables from other (parallel) Lua processes? It would be crazy indeed. :o) Rings would allow you to create different Lua states, but if you were using CGI all of them would terminate with the parent one. Not really useful. > If not, is there another way to do this without forcing each of my CGI > processes to consume that much ram and be offline while they constantly > reload?? Well, if you really need to go CGI, maybe you should consider having a deamon process running in parallel and handling the connection with your graph. Then the CGI processes could connect to the deamon (say, using sockets) and ask for data for the analysis. OTOH, if you decide to not go CGI, your process would be already persistent so the graph would be in memory all the time. In that case you could use Rings to allow separation of requests, but only if that was needed. André _______________________________________________ Kepler-Project mailing list [email protected] http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/
