a cgi strategy david w. brooks [email protected] [email protected]
TRANSCRIPT
![Page 2: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/2.jpg)
• Pre-history
• Overview of tasks
• HyperCard Model
• RunRev I
• RunRev II
• Current
![Page 3: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/3.jpg)
Tools
• Videodisc Drivers
• AP Chemistry
• Graduate Advisor
• NSF Proposals
• Courses (Web only)
![Page 4: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/4.jpg)
13 Videodisc Sides
Redox
![Page 5: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/5.jpg)
AP Chemistry
![Page 6: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/6.jpg)
Graduate Advisor
![Page 7: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/7.jpg)
NSF Proposals
All forms including budgets with computation and built-in rules.
![Page 8: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/8.jpg)
Courses
![Page 9: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/9.jpg)
Courses had full administration [“add” students; take quiz items; complete and submit essays; see progress].
Everything on-line except for grades.
Bread & butter.
![Page 10: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/10.jpg)
HyperCard Model
![Page 11: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/11.jpg)
• Works exceptionally well
• Overnight restart
• Backup
• Data storage work arounds
![Page 12: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/12.jpg)
For example, 30K limit on return size but no (important) limit on file/script size.
So, when large amount of data to return (i.e., > 30 K), write html to a file and then upload the written file.
Use multiple storage fields.
Store scripts in buttons or other objects.
![Page 13: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/13.jpg)
Two servers• dwb.unl.edu (OS 9)
• chemmovies.unl.edu (OS X)
~ 15 gbytes/month each
Bottom of the line iMacs
![Page 14: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/14.jpg)
The Servers
Will be replaced with xserves shortly after my return
![Page 15: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/15.jpg)
Days are Numbered
Choices:
• retire
• find a new delivery option
![Page 16: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/16.jpg)
LifeChanging
Event
Shafer book (earlier)RunRev Workshop
[met Rinaldi and felt it to be an almost religious experience -- like meeting a saint]
![Page 17: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/17.jpg)
Jacque Landman Gay session on cgi
No practice; thought would be just like HC. Went home really hyped.
(2% never get the word.)
![Page 18: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/18.jpg)
RunRev Approach IBy mid-March I had figured out that I couldn’t write to a field, and that appleEvents were a problem with Apache.
Discovered acgi Dispatcher
Had stacks going just as in HC and was well on my way to implementing a 1-for-1 conversion of RunRev replacing HC.
Had done LOTS of testing.
![Page 19: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/19.jpg)
In September, disaster struck.
I had software not mentioned running my theory course. Students submitted essays. I still have better evaluation tools than, say, BlackBoard. Things went haywire.
Bottom line: acgi Dispatcher has a 211 byte limit (2048). I really need 215.
![Page 20: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/20.jpg)
Ended up getting Randy Sargent (who programs robots for Martian landings among other things) to write a script that would allow enough input. Worked, but was kind of nasty.
I showed up at RevCon West 2005 with one course stack working -- doing everything!
I was anticipating going back to Lincoln to convert all of our courseware and other materials to what amounts to a HC upgrade.
![Page 21: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/21.jpg)
Got some advice -- but I don’t remember from whom about making a change to use sockets.
But then I heard a talk from Jerry Daniels [an unreconstructed hippie from Austin] about using xml-like files.
His comments made a hugeamount of sense. I had seenhim show very impressivetools in 1/04, too. His “Inspect”stack tool is fantastic.
![Page 22: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/22.jpg)
I decided to reconsider my entire strategy.
I had considered mySQL. I had sat in on two courses in the Spring of 2005 (Steckelberg, Reichenbach).
The notion of creating xml-like files had a great deal of appeal. Jerry convinced me it would be fast enough.
In June 2005, I began looking at a new approach
![Page 23: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/23.jpg)
RunRev Approach II
Use a RunRev cgi script
Store data in xml-like files
That’s where I am today.
![Page 24: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/24.jpg)
The xml-tools in the Darwin engine used in Mac OS didn’t seem to work for me.
I bought the 3rd party tools from Sons of Thunder (Ken Ray) but it didn’t seem to do what I wanted.
I reverted to kind.
![Page 25: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/25.jpg)
Fake xml
Line 1 lists all elements
Line 2 defines file
Line 3 and last line identify encompassing element
Other lines are elements, data.
![Page 26: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/26.jpg)
![Page 27: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/27.jpg)
put ExtractXMLRecord(quizItemRecordPath) into
quizItemRecord
![Page 28: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/28.jpg)
function extractXMLRecord recordPath put URL("file:"&recordPath) into xxx replace numtochar(13) with linefeed in xxx put line 1 of xxx into recordKeys put recordKeys into recordName["theKeys"] delete line 1 to 4 of xxx repeat with x = 1 to the number of words of recordKeys put word x of recordKeys into currentKey put "</"¤tKey&">" into currentCloseTag get offset(currentCloseTag,xxx) put quote&(word x of recordKeys)"e into label put char 1 to (it-1) of xxx into recordName[value(label)] delete char 1 to it of xxx delete line 1 to 2 of xxx end repeat return recordNameend extractXMLRecord
![Page 29: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/29.jpg)
The net result of this is that all of the data is taken from elements and placed into an array in which it can be manipulated.
Any changes can be recorded.
![Page 30: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/30.jpg)
on rebuildXMLRecord recordName, mainTag, recordPath put recordName["theKeys"] into keysList put keysList&LF into yyy put "<?xml version='1.0' ?>"&LF after yyy put "<"&mainTag&">"&LF after yyy repeat with y = 1 to the number of words of keysList put word y of keysList into currentKey put quote¤tKey"e into label put "<"¤tKey&">"&LF&recordName[value(label)] after yyy repeat while ((last char of yyy = LF) or (last Char of yyy = return)) delete last char of yyy end repeat put LF&"</"¤tKey&">"&LF after yyy end repeat put "</"&mainTag&">" after yyy put yyy into URL("file:"&recordPath)end rebuildXMLRecord
![Page 31: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/31.jpg)
Systematic Element NamingFirst Character
“L”; data normally would be edited from a single line text-entry field in a WebForm
“F”; data normally would be edited from a textarea entry field in a WebForm
“A”; some kind of data list (with structure)“C”; data calculated or extracted and maybe should
not be editable.
![Page 32: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/32.jpg)
By having systematic naming, the files can be Web-edited using generic tools.
![Page 33: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/33.jpg)
Hidden Fields
Key info is place in hidden fields.
![Page 34: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/34.jpg)
Courses
![Page 35: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/35.jpg)
CalculatedTopic List
Blue indicatesquestion
![Page 36: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/36.jpg)
Content
Buttons atbottom accessassessment.
Green linksmean contenton UNLServer.
![Page 37: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/37.jpg)
Item
![Page 38: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/38.jpg)
Assessment
![Page 39: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/39.jpg)
Assessment
![Page 40: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/40.jpg)
Time Stamp
Used to prevent resubmitting answer. Since the feedback is immediate, prevents using back button, changing answer, and submitting for regrade.These are recorded in the question file.
![Page 41: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/41.jpg)
Performance
![Page 42: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/42.jpg)
Times vary from 5 milliseconds (tool script of some sort) to ~1,000 mseconds. Typical transactions take less 100 mseconds (on an iMac like the one running dwb.unl.edu).
So far, performance has not been a problem. Also, there are several ways to think about improving performance.
![Page 43: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/43.jpg)
Favorites
![Page 44: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/44.jpg)
![Page 45: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/45.jpg)
![Page 46: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/46.jpg)
Problems
Having trouble with automatic e-mailing. Hopefully some variation or extension of a solution provided by André Garzia will start working.
![Page 47: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/47.jpg)
Issues
When to use a Web cgi and when to use a Web appliance.Used to have 30-40 stacks for teaching HC. Devin Asay has developed similar stacks for RunRev. We have made these into a Web appliance; should be available soon.We may start a writing project for grades 1-3 kids wih writing difficulties based upon earlier HC ROBO-Writer.
![Page 48: A cgi Strategy David W. Brooks dbrooks1@unl.edu dbrooks1@unl.edu](https://reader036.vdocuments.net/reader036/viewer/2022062322/56649e9f5503460f94ba11e0/html5/thumbnails/48.jpg)
Thanks
Thanks for giving me the opportunity to describe our work. I’ll try to entertain questions, and will be very pleased to receive any suggestions you my have.
Go Rev!