1 / 48

A cgi Strategy

A cgi Strategy. David W. Brooks dbrooks1@unl.edu http://dwb.unl.edu. Pre-history Overview of tasks HyperCard Model RunRev I RunRev II Current. Tools. Videodisc Drivers AP Chemistry Graduate Advisor NSF Proposals Courses (Web only). 13 Videodisc Sides. Redox. AP Chemistry.

ruby
Download Presentation

A cgi Strategy

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A cgi Strategy David W. Brooksdbrooks1@unl.edu http://dwb.unl.edu

  2. Pre-history • Overview of tasks • HyperCard Model • RunRev I • RunRev II • Current

  3. Tools • Videodisc Drivers • AP Chemistry • Graduate Advisor • NSF Proposals • Courses (Web only)

  4. 13 Videodisc Sides Redox

  5. AP Chemistry

  6. Graduate Advisor

  7. NSF Proposals All forms including budgets with computation and built-in rules.

  8. Courses

  9. Courses had full administration [“add” students; take quiz items; complete and submit essays; see progress]. Everything on-line except for grades. Bread & butter.

  10. HyperCard Model

  11. Works exceptionally well • Overnight restart • Backup • Data storage work arounds

  12. 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.

  13. Two servers • dwb.unl.edu (OS 9) • chemmovies.unl.edu (OS X) ~ 15 gbytes/month each Bottom of the line iMacs

  14. The Servers Will be replaced with xserves shortly after my return

  15. Days are Numbered Choices: • retire • find a new delivery option

  16. LifeChanging Event Shafer book (earlier) RunRev Workshop [met Rinaldi and felt it to be an almost religious experience -- like meeting a saint]

  17. Jacque Landman Gay session on cgi No practice; thought would be just like HC. Went home really hyped. (2% never get the word.)

  18. RunRev Approach I By 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.

  19. 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.

  20. 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.

  21. 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.

  22. 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

  23. RunRev Approach II Use a RunRev cgi scriptStore data in xml-like files That’s where I am today.

  24. 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.

  25. Fake xml Line 1 lists all elements Line 2 defines file Line 3 and last line identify encompassing element Other lines are elements, data.

  26. put ExtractXMLRecord(quizItemRecordPath) into quizItemRecord

  27. 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 "</"&currentKey&">" into currentCloseTag get offset(currentCloseTag,xxx) put quote&(word x of recordKeys)&quote 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 recordName end extractXMLRecord

  28. 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.

  29. 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&currentKey&quote into label put "<"&currentKey&">"&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&"</"&currentKey&">"&LF after yyy end repeat put "</"&mainTag&">" after yyy put yyy into URL("file:"&recordPath) end rebuildXMLRecord

  30. 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.

  31. By having systematic naming, the files can be Web-edited using generic tools.

  32. Hidden Fields Key info is place in hidden fields.

  33. Courses

  34. CalculatedTopic List Blue indicatesquestion

  35. Content Buttons atbottom accessassessment. Green linksmean contenton UNL Server.

  36. Item

  37. Assessment

  38. Assessment

  39. 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.

  40. Performance

  41. 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.

  42. Favorites

  43. Problems Having trouble with automatic e-mailing. Hopefully some variation or extension of a solution provided by André Garzia will start working.

  44. 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 HCROBO-Writer.

  45. 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!

More Related