THE PORTABLE WEBSITE.docx
《THE PORTABLE WEBSITE.docx》由会员分享,可在线阅读,更多相关《THE PORTABLE WEBSITE.docx(14页珍藏版)》请在冰点文库上搜索。
THEPORTABLEWEBSITE
THEPORTABLEWEBSITE
ByDanaiKuangparichat
ABSTRACT
Thispaperdescribesanimplementationofaportablewebsite:
asite=carriedaroundonandupdatedthroughalaptopcomputer.Thesiteissupposedto=mirrorasiteontheWorldWideWeb;whenthelaptopisconnectedtotheInternet,the=publicsiteistobeupdatedtomatchthesitecurrentlyonthelaptop.Mirrorsiteson=othercomputersneedtobeallowedtobecreated,too.Beforeembarkingonatrip,the=updaterofthesitetakesasnapshotofthesiteontoaCD-ROM.Theapproachtakeninthis=paperistosetupadirectoryofsymboliclinksonthelaptop=92sharddrive,andto=copyoverthoselinkswhentheuserwishestomodifyafileontheCD.Thisapproachkeeps=trackofchangestothesiteviaupdatefiles,whicharekeptbothonthelaptopand=atthepublicsite.
INTRODUCTION
Withtoday=92sexplosivegrowthoftheInternet,webserversarepoppingup=everywhere.Likewise,moreandmorepeoplearelearninghowtogetaroundtheNetevery=day.AlthoughtheInternethasspreadthroughoutallofAmerica,aswellasmanyother=countries,therestillexistmanyplacesintheworldthathaveverylimitedaccesstothe=Internet,andsomethathavenoaccessatall.Whenonetravelstoanareawithlimited=Internetaccess,hemaydesiretoupdatearemotewebsitefrequently;however,due=totheunavailabilityoftheInternet,thisupdatingisnotalwayspossible.
Thesolutionistodesignaportablewebsite,asystemtohandlethe=organizationofthewebsitechangesbetweenInternetsessionssothatduringthesesessions,=theremotewebsitecanbeupdatedquicklyandeasily.Thissystemcanbestoredona=laptopwhichiscarriedaroundbythewebsite=92sowner.Whenevertheownerdesiresto=makeachangetothesite,hechangesitlocally;thenthenexttimeheconnectstothe=Internet,heuploadsallofthechangeshehasmadetotheremotewebsite.
Ofcourse,theownerisnottheonlypersonwhowillwanttoaccesshisweb=site.Althoughtheremotewebsitecanbemadepubliclyaccessible,theremaybe=interesteduserswhoonlyhavelimitedaccesstotheInternet;thus,theymayalsowant=tokeeplocalcopiesofthewebsite.Therefore,thesystemalsoneedstoallow=easycopyingofthesitefromthelaptopandeasydownloadingofupdatesonthewebsite.
Severalassumptionsaretobemadewhendesigningthissystem.Thewebsite=ontheInternetisstoredonaUNIXfilesystem.Thelaptopontowhichthesiteis=copiedalsousesaUNIXfilesystemandincludesaCD-ROMdrive,afloppydiskdrive,=andaharddrive.BeforeeachtriptoanInternet-deprivedarea,theowneroftheweb=sitecancopyitscurrentcontent(andmaybeotherfiles)ontoanynumberofCD-ROMs;=however,theCD-ROMcannotberewrittenduringthetrip.Therefore,localupdatescan=onlybemadetothelaptop=92sharddrive(andanyfloppydiskstheownermaywantto=carry).Theothercomputersontowhichthewebsiteiscopiedanddownloaded,however,mayuse=anymodernfilesystem,andmightnotevenincludeaCD-ROMdrive.Thepagesofthe=sitemaycontainlinktootherpagesinthesamesite,butnonetoothersites.Itisalso=assumedthatthepersonwhokeepsthelocalwebsiteonthelaptopistheonlypersonwho=haswriteaccesstotheremotewebsite.
Topreventconfusion,Iwilldefineherethelocalwebsiteasthe=sitestoredontheowner=92slaptop;theclonesitesasthecopiesofthesiteon=otheruser=92scomputers;andthehomesiteasthesiteontheWorldWideWeb.=Ownerreferstothepersonwhomanagesthehomesiteandcarriesthelocal=site.
Inthesystempresentedhere,theorganizationoffilesonthelocalsite=andclonesitesusessymboliclinkstotheCD-ROMextensivelyinordertosaveharddrive=space.However,thehomesite(andanyclonesiteonasystemthatdoesnotallowlinksor=doesnothaveaCD-ROMdrive)doesnotuselinksatallbecauseallofthepagesarestored=onthesamedevice;sosavingspaceisnotanissue.Thissystemalsousesseveral=filestokeeptrackofwhichpageshavebeenmodified,andwhentheyweremodified.These=filesareusedtofacilitateuploading,downloading,andcopyingofthesitesothat=copyingeveryfileisnotalwaysnecessary.
DESIGNCRITERIA
Theportablewebsitemustsupportthefollowingfeatures:
Localsiteupdating.Anytimetheownerdesirestomodifythesitein=anyway,hecandosoimmediatelyonhislaptop.Thelocalsiteshouldcontainthemost=up-to-dateversionatalltimeswhentheowneristravelling.
Homesiteupdating.WhentheownerconnectstotheInternet,hecan=updatethehomesitetomatchthecurrentlocalsite.
Clonesitecreationfromlocalsite.Theownercancreateanewclone=siteonanothercomputerfromhislaptop.Thisnewsitewouldmatchthecurrentlocalsite.=TheothercomputermightormightnotuseaCD-ROM,anditmaybeusinganymodern=filesystem.
Otherfeaturesthatshouldbeaddedifpossibleincludethefollowing:
Clonesitecreationfromhomesiteoranotherclonesite.Anyuser=shouldbeabletocreateanewclonesitethatmatchesthesitefromwhichitwascreated.
Clonesiteupdating.Naturally,onewaytoupdateaclonesitewouldbe=toeraseit,andthencopyordownloadthenewestversiontorecreatetheclone.But=havingasystemthatcanupdateclonesitesquickly,eitherfromthehomesiteorthelocal=site,ismuchmoredesirable.
Thereareanumberofwaystoimplementthesefeatures.However,someways=aremoredesirablethanothers.Herearethecriteriatobeusedtodeterminethe=usefulnessofthesystem:
Easeofuse.Alltheoperations--downloading,uploading,copying--=shouldnotonlybeeasytoperform,butalsoeasytoexplain.Thefewerstepsanoperation=requires,thelessroomthereisforusererror.Additionally,theownerwillneedto=explaintousersofclonesiteshowtoupdatetheirclones;iftheprocessistoo=complicated,theymaymisunderstandorforgettheowner=92sexplanation.
Simplicityindesign--Complexsystemsleavelotsofroomforerror.=Theyarealsodifficulttoimplementanddebug.
Efficientuseofdiskspace--Portablecomputerscanonlycarryso=much..Thus,weneedtomanagethediskspacewellatthelocalsite,butstillinclude=filesnecessarytoalloweasyupdatingandcreationofwebsites.Becausewedonotknowhow=powerfulthecomputersareonwhichclonesiteswillbecreated,weshouldpreparefor=theworstandassumethattheirdiskspaceswillbelimitedalso.Althoughthehomesite=shouldalsoprovideefficientdiskspacemanagement,itisnotasimportantasforthe=othertwotypesofsites.Ifthehomesiterunsoutofdiskspace,theownercansimplybuy=anewharddrive.Newharddrivesmaynotbeaspracticalonlaptopsandthecomputers=carryingtheclonesites,though.
Speed.Mostpeopledesirenottowaitalongtimewhendownloading,=uploading,orcopyingfiles.Naturally,ifthewebsiteislarge,suchwaitingmaybe=unavoidable,butthesystemshouldminimizethetimeittakestoupdateandcreateweb=sites.
Flexibilityfortheowner.Thesystemshouldplaceasfewconstraints=aspossibleontheupdatingofthelocalwebsite.Ideally,theownershouldbeableto=modifythelocalsitetothesameextentthathecanmodifythehomesite.Asimpleexample=wouldbeaddinganewpage:
Naturally,thelocalsiteisvirtuallyrequiredtoallow=suchanoperation.Amorecomplicatedexamplewouldbereorganizingdirectories:
=Movingfilesbetweendirectories,creatingnewdirectories,orremovingdirectoriesmay=notbeeasytoupdateonthehomesiteorclonesites;thus,somedesignsofthesystemmay=restrictsuchactions.
Flexibilityincreatingclones.Thesystemshouldbeabletobecloned=onawidevarietyofcomputers.Themorepeopletherearethatcanclonethesite,=themoreusefulthewebsitewillbe.
Reliability.Thesystemshouldnotleavealotofroomforfailure.=Thechancesoffailurearelesslikelyiftheprocessesaremadesimpler,andiftheuser=isnotgivenalotofrestrictions.Thesystemshouldalsodoredundantcheckstoseeif=everythingisoperatingasexpected.
DESIGNDESCRIPTION
FILEORGANIZATION
Thissystemrequiresthatwebpagesuserelativeurlsforlinkstoother=pages.Becausethepagesaregoingtobecopiedtoothersites,absoluteurlswouldbe=illogical:
Oncethepageiscopiedover,anabsoluteurlwouldbecomeinvalid.Although=thisrequirementdecreasestheflexibilityonwhattheownercando,itismucheasierthan=allowingabsoluteurls,andthenchangingallthoseurlsineachpagecopiedto=anothermachine.
Beforetheownerembarksonatravel,theCD-ROMshouldcontainallofthe=websitefilesastheyareorganizedonthehomesite;inotherwords,allfilesshouldbe=containedinthesamedirectoriesastheonesatthehomesite.Thedirectorystructure=shouldalsobecreatedonthelaptop=92sharddrive.Withinthesedirectories,symbolic=linksshouldbecreatedforeachfileinthewebsite(butnotforthedirectories).These=linksshouldhavethesamenamesasthefileswithwhichtheyarelinkedandshouldbein=thesamedirectories(butontheharddriveinsteadoftheCD-ROM).Whenevera=browserisopenedonthelaptop,itshouldonlyreaddirectlyfromtheharddrive.Although=therecreationofthedirectorystructureontheharddrivetakesextrawork,itmakes=updatingthesitemucheasier.BecausetheCD-ROMisread-only,readingdirectlyfromthe=CD-ROMwouldberatherimpractical;anytimeapageischanged,therewouldbenowaytolet=thebrowserknownottoreadfromtheCD-ROMforthatpage.
Iftheownerdecidestomodifya