These fields are all optional and need only
be supplied if you would like a direct reply.
Subject
Your email address
Your real name
You must answer this!
If you don't, my spam filtering will
ensure that I never see your email.
What's 8 plus five (in digits only)?
Please make your changes here and then
Editing tips and layout rules.
File: HowTheFarragoWorks ''' <link rel="alternate" type="application/rss+xml" ''' href="/rss.xml" title="RSS Feed"> ********> width="25%" |>> ''' <a title="Subscribe to my feed" ''' rel="alternate" ''' href="https://www.solipsys.co.uk/rss.xml"> ''' <img style="border-width: 0px;" ''' src="https://www.feedburner.com/fb/images/pub/feed-icon32x32.png" ''' align="middle" ''' alt="" />Subscribe!</a> _ ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> <<| ---- My latest posts can be found here: * ColinsBlog ---- Previous blog posts: * SeventyVersusOneHundred * PowersOfTwoInLexOrder * EmergingEExpanded * RageInducingSystemImplementation * TheBookIsNotAlwaysRight * EmergingE * ImpossibleToTranslate * WaitingInVain * NonRepeatingDecimals * RationalRepeats * WhyIsItLovely * CompilingCryptoConnections * ExploringConnectionsBetweenCryptoSystems * ElwynBerlekampHasLeftUs * RootCauseAnalysisAndThePhotocopierQuestion * TheUpDownTides * TheForeAftTide * TheSidewaysTide * WrappingUpWrappingUpTheEarth * TheOtherWrappingTheEarthProblem * WrappingTheEarth * TheRingOfSteel * RoundingUpTheRopes * OtherOtherOtherRopeAroundTheEarth * RopeAroundTheEarthRefined * TheOtherRopeAroundTheEarth * ElementaryEstimates * LatitudeCorrection * JustGiveMeTheAnswer * MoreMusingOnPollardRho * IdleThoughtsAboutPollardRho * WhenOptimisingCodeMeasure * ADogCalledMixture * AnotherPayPalScam * WhyTopPostingHasWon * UnexpectedInteractionOfFeatures * ArchimedesHatBoxTheorem * ConsideringASphere * ToLinkOrNotToLink * GenericAdviceForWritingAThesis * JustTeachMyChildTheMaths * NotASpectatorSport * LeftTruncatablePrime * TheDoctorAndTheLawyer * FourPointsTwoDistancesProof * MeetingRonGraham * NapkinRingVersusSphericalCap * TheFourPointsPuzzle * RadiusOfTheEarthPartTwo * GrepTimingAnomaly * TheRadiusOfTheEarth * ThisWorksToCureMyHiccoughs * PerhapsWeSavedOne * ThinkingAboutMastodon * DisappearingTrainsOnVirgin * TheIndependenceGame * OneOfMyFavouritePuzzles * ThinkingAboutRecursion * MemorisingTheTube * SpikeySpheres * SurprisinglyQuick * AnUnexpectedFraction * YouHaveToAdmireTheirOptimism * RepresentativesMatter * PythagorasByIncircle * APuzzleAboutPuzzles * HowNotToDoTwitter * Calculating52FactorialByHand * SmallThingsMightNotBeSoSmall * NotIfYouHurry * FactoringViaGraphThreeColouring * AnotherProofOfTheDoodleTheorem * WhenObviousIsNotObvious * GraphThreeColouring * TheDoodleTheorem * BeCarefulWhatYouSay * TheMutilatedChessboardRevisited * AMirrorCopied * TheOtherOtherRopeAroundTheEarth * PhotocopyAMirror * ThePointOfTheBanachTarskiTheorem * SieveOfEratosthenesInPython * FastPerrinTest * RussianPeasantMultiplication * FindingPerrinPseudoPrimes_Part2 * FindingPerrinPseudoPrimes_Part1 * TheUnwiseUpdate * MilesPerGallon * TrackingAnItemOnHackerNews * HackerNewsUserAges * PokingTheDustyCorners * ThereIsNoTimeForThis * PublicallySharingLinks * LearningTimesTables * GracefulDegradation * DiagrammingMathsTopics * OnTheRack * SquareRootByLongDivision * BeyondTheBoundary * FillInTheGaps * SoftwareChecklist * NASASpaceCrews * TheBirthdayParadox * TheTrapeziumConundrum * RevisitingTheAnt * TheAntAndTheRubberBand * IrrationalsExist * MultipleChoiceProbabilityPuzzle * RandomEratosthenes * WrappingUpSquareDissection * DissectingASquarePart2 * DissectingACircle * DissectingASquare * AnOddityInTennis * DecisionTreeForTennis * DecisionTreesInGames * AMatterOfConvention * DoYouNourishOrTarnish * BinarySearchReconsidered * TwoEqualsFour * TheLostPropertyOffice * TheForgivingUserInterface * SettingUpRSS * WithdrawingFromHackerNews ---- Additionally, some earlier writings: * RandomWritings. * ColinsBlog2010 * ColinsBlog2009 * ColinsBlog2008 * ColinsBlog2007 * ColinsBlogBefore2007 ******** Some time ago I was asked about the way this website works, and as I started to explain, I realised just how much there was going on and how complicated it seemed. But they seemed to think it was neat and elegant, so I thought I'd write it up. The world's very first WikiWiki was written by Ward Cunningham and went live on his website in March 1995. I stumbled across it not too long after that, and was intrigued. The idea of a website that could be edited through the site itself was simply brilliant, and I wanted to have something similar. [[[> https://www.solipsys.co.uk/images/Farrago_design_00.png ---- |>> Where we start <<| ]]] Problem was, at the time it wasn't possible for me, with the hosting I had, to run scripts of any type on my web site. So how could I do it? It's easy enough to start with the concept of a definitive text version. That has to live somewhere, so let's have it (to start with) on my local machine. [[[< https://www.solipsys.co.uk/images/Farrago_design_01.png ---- |>> Converting to HTML <<| ]]] Next, we need a script that converts the plain text to HTML. I wrote a quick and simple version to do that, making up the rules as I went along. How do I indicate /italics,/ *bold,* _underline,_ and other formatting? Markdown wouldn't exist for 8 years yet, so inventing a "mark-up language" was essential. It's not a particularly good one, but it works. [[[> https://www.solipsys.co.uk/images/Farrago_design_02.png ---- |>> The text in a form <<| ]]] So we have a definitive text version, and we auto-generate the site from it, including links both internal and external. But if we're going to allow the site to be edited through the site - somehow - we need the plain text to be "exposed" in some way. So what we do is put it in a form. In this way each HTML page has an associated form containing the plain text. There are also fields in the form for a visitor to provide credentials. So now we have a way a visitor, a potential editor, can offer a change. [[[< https://www.solipsys.co.uk/images/Farrago_design_03.png ---- |>> An efficient upload <<| ]]] All this, so far, is local, so now we have to upload it to the server. But for any change made, most of the site won't need uploading because most will remain unchanged. So we make sure we keep a local copy of the current live site, and run a script to determine the differences between that and our newly generated site. Then based on that list of diffs we upload the minimum number of pages, and update out local copy of the live site. It's worth noting at this point that because pages point to each other, editing one page might, in an obscure manner, cause a change to another. That means that we can't just upload the page we changed, others may also need updating. So now we have a setup that lets us have a plain text version of our website in some sort of markup language that we can auto-convert into the HTML version, and upload it to the server. How do we make changes? [[[> https://www.solipsys.co.uk/images/Farrago_design_04.png ---- |>> Suggesting a change <<| ]]] Each live HTML page has its plain text in an associated web form, and also has a link to that form. So when a reader wants to make a change they can click on the link to bring up the form, change the plain text in the form, provide their credentials, and click "SUBMIT". So the modified plain text is now sitting on the mail server, waiting to be used. Back on the local machine, there is already some automated processing of emails. In particular, I perform my own spam filtering, so every 20 minutes the auto-processor runs a script to fetch emails via POP3, check for spam, then anything designated as spam is deleted from the server. That means that whenever I access my email from anywhere, the mailbox has been "washed". But as a side effect, any emails of the right format to be web update emails get copied to a separate directory. At that point the site processing software is triggered. [[[< https://www.solipsys.co.uk/images/Farrago_design_05.png ---- |>> Extracting the change <<| ]]] The site processing scripts check the credentials on the emails. If a suggested change doesn't have the appropriate credentials it's put into a queue for me to check by hand, but if it /does/ have the appropriate credentials, the modified text is extracted from the form contents and copied to the "Definitive Text Version" of the site. The generation and upload scripts are run, and the cycle is complete. And so we have the final design. There are significant short-comings, agreed, but none that are critical. The system works, doesn't require any scripts to be run on the server, the resulting web site is static and hence fast to serve, and is resistant to most forms of attack. For 1996 technology, I think it's survived rather well. |>> ********> [[[ https://www.solipsys.co.uk/images/Farrago_design.png ---- |>> The final design <<| ]]] ********< <<| ---- |>> | |>> <<<< Prev <<<< ---- SeventyVersusOneHundred <<| | : | |>> >>>> Next >>>> ---- SeventyVersusOneHundredRevisited ... <<| | ---- ********> ''' <a href="https://mathstodon.xyz/@ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/images/Mastodon_Mascot.png" ''' width="256" height="280" ''' alt="https://mathstodon.xyz/@ColinTheMathmo" ''' /></a> ******** ''' <a href="https://mathstodon.xyz/@ColinTheMathmo/">You can follow me on Mathstodon.</a> _ _ _ _ [[[> ''' <a href="https://twitter.com/ColinTheMathmo">Of course, you can also<br>follow me on twitter:</a> ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> ''' <img src="/cgi-bin/CountHits.py?HowTheFarragoWorks" alt="" /> ]]] ********< ---- !! Send us a comment ... ''' <form action="https://www.solipsys.co.uk/cgi-bin/FormMail.pl" method=post> ''' <input type=hidden name="recipient" value="colinsblogcomment@solipsys.co.uk" > ''' <input type=hidden name="subject" value="Blog comment : HowTheFarragoWorks" > ''' <input type=hidden name="redirect" value="https://www.solipsys.co.uk/new/ThankYouForYourComment.html" > ''' <input type=hidden name="missing_fields_redirect" value="https://www.solipsys.co.uk/RequestError.html"> ''' <input type=hidden name="env_report" value="REMOTE_HOST, REMOTE_ADDR, HTTP_USER_AGENT" > ''' <input type=hidden name="print_blank_fields" value="1" > ********> width="47%" You can send us a message here. It doesn't get published, it just sends us an email, and is an easy way to ask any questions, or make any comments, without having to send a separate email. So just fill in the boxes and then ''' <font size="+4"><INPUT TYPE="submit" VALUE="CLICK HERE TO SEND"></font> ******** width="53%" ********< ''' <table cellpadding="5"> ''' <tr> ''' <td valign="top">Your name </td> <td valign="top">:</td> ''' <td> <input type=text name="realname" size="48"> </td> ''' <tr> ''' <td valign="top">Email </td> <td valign="top">:</td> ''' <td> <input type=text name="email" size="48"> </td> ''' </tr> ''' <tr> ''' <td valign="top">Message </td> <td valign="top">:</td> ''' <td> <TEXTAREA NAME="Message" ROWS=10 COLS=64></TEXTAREA> </td> ''' </tr> ''' </table> ''' <center> ''' <font size="+4"> ''' <INPUT TYPE="submit" VALUE="CLICK HERE TO SEND"> ''' </font> ''' </center> ''' </form> ********<