Re: a transparent persistence layer for Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg78695] Re: a transparent persistence layer for Mathematica
- From: Tyler Spaeth <lynklayer at pm.dv8.org>
- Date: Sat, 7 Jul 2007 06:00:06 -0400 (EDT)
- References: <f6d6qf$oq2$1@smc.vnet.net> <f6i9ja$1v2$1@smc.vnet.net>
I wasn't aware of DynamicModule. I pretty much started coding Lynk straight out of the gate when Mathematica 6 came around (it is a revamping of an implementation I made for Mathematica 5). However, having looked at DynamicModule, it seems that Lynk might serve a different purpose. Now, I haven't had a lot of experience with DynamicModule, so please bear with me. DynamicModule appears to be aimed at frontend state while Lynk is aimed at kernel state. For example, I'm uncertain how to achieve the following effect with DynamicModule: .. lynkSymbol[x] x = 5 5 .. <<<restart the kernel>>> .. lynkSymbol[x] x 5 .. Then again, even after reading the documentation, I'm not exactly sure in what situation you would need DynamicModule, a clear sign that I don't fully understand it. Any insights you might be able to provide would be appreciated. In the mean time, I will research DynamicModule and try to figure out if Lynk is already obsolete. Thanks Tyler lynklayer at pm.dv8.org On 2007-07-05 01:19:54 -0700, "Steve Luttrell" <steve at _removemefirst_luttrell.org.uk> said: > The documentation for DynamicModule says: > > "Values of local variables in a DynamicModule are by default > automatically saved when a notebook containing the DynamicModule is > saved, so that these values in effect persist across sessions of > Mathematica." > > What does Lynk do that DynamicModule doesn't do? > > Steve Luttrell > West Malvern, UK > > "Tyler Spaeth" <lynk at pm.dv8.org> wrote in message > news:f6d6qf$oq2$1 at smc.vnet.net... >> Hello, >> >> I am a student at Excelsior College and have recently written a small, >> open-source package called Lynk to provide a transparent persistence >> layer for Mathematica. In short, Lynk allows you to use standard >> Mathematica operators to access persistent data. I have included a >> transcript of a very simple session using Lynk to help people get a >> feel for Lynk. >> >> If you end up using Lynk, I would love to how it is being used. I >> would also appreciate feedback about the design and implementation of >> Lynk. >> >> The main Lynk website is http://www.lynklayer.org. The Lynk package >> and notebook can be downloaded at >> http://www.lynklayer.org/download.html. The Lynk manual can be found >> at http://www.lynklayer.org/documentation.html. >> >> If you have any questions, please don't hesitate to contact me. >> >> Thank you for your time, >> >> Tyler Spaeth >> lynklayer at pm.dv8.org >> >> >> Transcript: >> >> databaseConnection = OpenSQLConnection[JDBC["hsqldb", >> ToFileName[{$UserBaseDirectory, "DatabaseResources"}, >> "Sample"]],"Username" -> "sa"] >> SQLConnection[1, "Open", "TransactionIsolationLevel" -> "ReadCommitted"] >> >> lynkEnvironment[databaseConnection] >> >> lynkSymbol[x] >> >> lynkSymbol[f] >> >> x = 2 >> 2 >> >> f[1] = x >> 2 >> >> f[1] >> 2 >> >> f[1] =. >> >> f[1] >> f[1] >> >> delynkEnvironment[] >> >> CloseSQLConnection[databaseConnection] >> >> <<<Restart of the Mathematica kernel>>> >> >> databaseConnection = OpenSQLConnection[JDBC["hsqldb", >> ToFileName[{$UserBaseDirectory, "DatabaseResources"}, >> "Sample"]],"Username" -> "sa"] >> SQLConnection[1, "Open", "TransactionIsolationLevel" -> "ReadCommitted"] >> >> x >> 2 >> >> ValueQ[f[1]] >> False >> >> delynkEnvironment[] >> >> CloseSQLConnection[databaseConnection]