TheabovecontentisreviewedandannouncedbytheNationalScienceandTechnologyTermReviewCommittee
Introductiontothestructure
Server-client,namelyClient-Server(C/S)structure.TheC/Sstructureusuallyadoptsatwo-layerstructure.Theserverisresponsiblefordatamanagement,andtheclientisresponsibleforcompletingtheinteractivetaskswiththeuser.
Theclientisconnectedtotheserverthroughthelocalareanetwork,acceptstheuser'srequest,andmakesarequesttotheserverthroughthenetworktooperatethedatabase.Theserveracceptstheclient'srequest,submitsthedatatotheclient,andtheclientcalculatesthedataandpresentstheresulttotheuser.Theservermustalsoprovidecompletesecurityprotectionanddataintegrityprocessingoperations,andallowmultipleclientstoaccesstheserveratthesametime,whichplaceshighrequirementsontheserver'shardwareprocessingdatacapabilities.
IntheC/Sstructure,theapplicationisdividedintotwoparts:theserverpartandtheclientpart.Theserverpartistheinformationandfunctionssharedbymultipleusers,andperformsback-endservices,suchascontrollingtheoperationoftheshareddatabase;theclientpartisexclusivetotheuser,responsibleforperformingfront-endfunctions,andhaspowerfulfunctionsinerrorprompts,onlinehelp,etc.Function,andcanfreelyswitchbetweensubroutines.
TheC/Sstructureistechnicallymature,anditsmaincharacteristicsarestronginteraction,safeaccessmode,fastresponsespeed,andgoodforprocessinglargeamountsofdata.However,theC/Sstructurelacksversatility.Systemmaintenanceandupgradesneedtoberedesignedanddeveloped,whichincreasesthedifficultyofmaintenanceandmanagement.Furtherdataexpansionismoredifficult.Therefore,theC/Sstructureislimitedtosmalllocalareanetworks.
Developmentexperience
ThedevelopmentoftheC/Smodelhasgonefromatwo-tierstructuretoathree-tierstructure.
Thetwo-tierstructureconsistsoftwoparts:thefrontendistheclient,whichmainlycompletestheuserinterfacedisplay,acceptsdatainput,verifiesthevalidityofthedata,sendsarequesttothebackgrounddatabase,acceptsthereturnedresult,andprocessestheapplicationlogic;Thebackendistheserver,whichrunstheDBMS,andprovidesdatabasequeryandmanagement.
Thetwo-tierstructurehassomeshortcomings:themainmanifestationsare:poorscalabilityofthesystem;difficultyininteroperatingwithothersystems;difficultyinsupportingmultipleheterogeneousdatabases;frequentinteractionbetweenclientprogramsandserver-sideDBMS,Thenetworktrafficislarge;allclientsneedtoinstallandconfiguredatabaseclientsoftware,whichisaverycomplicatedtask,etc.
Basedontheaboveshortcomingsofthetwo-tierstructure,thethree-tierstructurehasemergedwiththematurityofmiddlewaretechnology.Thecoreconceptistousemiddlewaretodividetheapplicationintothreedifferentprocessinglevels:thepresentationlayer,thebusinesslogiclayer,andthedatastoragelayer.
Thethree-tierstructurehascertainadvantagesoverthetwo-tierstructure:ithasgoodopenness;itreducesthecostoftheentiresystemandisveryconvenienttomaintainandupgrade;thesystemhasgoodscalability;thesystemmanagementissimpleandcansupportHeterogeneousdatabaseshavehighavailability;strictsecuritymanagementcanbecarriedout.
AdvantagesandDisadvantages
Advantages
TheadvantageoftheC/SstructureisthatitcangivefullplaytotheprocessingcapabilitiesoftheclientPC,andmanytaskscanbeprocessedbytheclient.Submittotheserver.Thecorrespondingadvantageisthattheclientrespondsquickly.Thespecificmanifestationsareinthefollowingtwopoints:
(1)Theapplicationserverhasalighterdataload.ThesimplestdatabaseapplicationofC/Sarchitectureconsistsoftwoparts,namelyclientapplicationanddatabaseserverprogram.Thetwocanbecalledtheforegroundprogramandthebackgroundprogram,respectively.Themachinerunningthedatabaseserverprogramisalsocalledtheapplicationserver.Oncetheserverprogramisstarted,itisalwayswaitingtorespondtotherequestsentbytheclientprogram;theclientapplicationprogramrunsontheuser'sowncomputer,correspondingtothedatabaseserver,whichcanbecalledtheclientcomputer,whenanyoperationonthedatainthedatabaseisrequired,Theclientprogramautomaticallyfindstheserverprogramandsendsarequesttoit.Theserverprogramrespondsaccordingtopredeterminedrulesandsendsbacktheresult.Theapplicationserverrunsalighterdataload.
(2)Thedatastoragemanagementfunctionisrelativelytransparent.Indatabaseapplications,thedatastoragemanagementfunctionisperformedindependentlybytheserverprogramandtheclientapplicationprogram,andusuallythosedifferent(whetherknownorunknown)front-endapplicationscannotviolatetherulesintheserverprogramCentralizedimplementation,suchasthevisitor'sauthority,thenumbercanberepeated,theremustbeacustomertoestablishsuchrulesasorders.Alloftheseare"transparent"totheenduserswhoworkontheforegroundprogram,andtheycancompletealltheirworkwithouthavingtointervene(andusuallycannotinterfere)withtheprocessbehindit.Intheapplicationoftheclient-serverarchitecture,theforegroundprogramisnotvery"skinny",andallthetroublesomethingsarehandedovertotheserverandthenetwork.UndertheC/Ssystem,thedatabasecannottrulybecomeapublicandspecializedwarehouse,anditissubjecttoindependentandspecializedmanagement.
Disadvantages
WiththerapiddevelopmentoftheInternet,mobileofficeanddistributedofficearebecomingmoreandmorepopular,whichrequiresoursystemtobeexpandable.Thiswayofremoteaccessrequiresspecializedtechnology,andthesystemmustbespeciallydesignedtohandledistributeddata.
Theclientneedstoinstallspecialclientsoftware.Firstly,itinvolvestheworkloadofinstallation,andsecondly,anycomputerproblems,suchasvirusesorhardwaredamage,needtobeinstalledormaintained.Especiallyinthecaseofmanybranchesorspecialtystores,itisnotaproblemofworkload,butaproblemofdistance.Inaddition,whenthesystemsoftwareisupgraded,eachclientneedstobereinstalled,anditsmaintenanceandupgradecostsareveryhigh.
Generally,therearerestrictionsontheclient'soperatingsystem.ItmaybeadaptedtoWin98,butcannotbeusedinWindows2000orWindowsXP.OrnotapplicabletoMicrosoft'snewoperatingsystem,etc.,letaloneLinux,Unix,etc.[1](Currently,mostclientsareadaptedtothewinXPsystem,buttheycannotbeusedforMicrosoft’snewoperatingsystemorotherdevelopmentsystems.)
AlthoughthetraditionalC/SarchitectureisOpenmode,butthisisonlythefirst-levelopennessofsystemdevelopment.Inaspecificapplication,boththeClientsideandtheServersideneedspecificsoftwaresupport.Sinceitfailstoprovidetheopenenvironmentthatusersreallyexpect,thesoftwareoftheC/Sstructureneedstodevelopdifferentversionsofsoftwarefordifferentoperatingsystems,andtheproductupgradesareveryfast,itisdifficulttoadapttothesimultaneoususeofLANuserswithmorethan100computers.Moreover,thecostishighandtheefficiencyislow.
ThedisadvantagesoftheC/Sarchitectureincludehighmaintenancecostsandlargeinvestments.Firstofall,usingtheC/Sarchitecture,itisnecessarytoselectanappropriatedatabaseplatformtorealizethetrue"unification"ofdatabasedata,sothatthesynchronizationofthedatadistributedinthetwoplacesiscompletelymanagedbythedatabasesystem,butlogicallytheoperatorsinthetwoplacesmustdirectlyAccesstothesamedatabasecanbeeffectivelyachieved.Therearesomeproblems.Ifyouneedtoestablish"real-time"datasynchronization,youmustestablishareal-timecommunicationconnectionbetweenthetwoplacesandkeepthedatabaseserversrunningonline.ThenetworkmanagementstaffmustMaintenanceandmanagementoftheserverandthemaintenanceandmanagementoftheclientarerequired,whichrequireshighinvestmentandcomplextechnicalsupport,highmaintenancecosts,andalargeamountofmaintenancetasks.
Secondly,thetraditionalC/Sstructuresoftwareneedstodevelopdifferentversionsofsoftwarefordifferentoperatingsystems.Becausetheproductisupdatedveryquickly,thecostandlowefficiencyarenolongersuitableforworkneeds.Aftertheemergenceofcross-platformlanguagessuchasJAVA,theB/SarchitectureviolentlyimpactsC/Sandposesthreatsandchallengestoit.
Characteristicsoftheserver:
1.Passiverole(slave).
2.Waitingfortherequestfromtheclient.
3.Processtherequestandreturntheresult.
Characteristicsoftheclient:
1.Activerole(main).
2.Sendrequest.
3.Waituntilyoureceivearesponse.
C/SandB/S
Comparisonofhardwareenvironment
CSisbuiltonthebasisoflocalareanetworks,betweenlocalareanetworksThenprovideconnectionanddataexchangeservicesthroughadedicatedserver.IntheCSstructure,boththeclientandtheserverneedtoprocessdatatasks,whichplaceshigherrequirementsontheclient'shardware.TheBSstructureisbuiltonthewideareanetworkanddoesnotneedtobeequippedwithadedicatednetworkhardwareenvironment.Althoughthehardwarerequirementsfortheclientsidearenotveryhigh,onlytheoperatingsystemandbrowserarerequiredtorun,buttheserversideneedstoprocessalargeamountofreal-timedata,whichplaceshigherrequirementsontheserversidehardware.Generallyspeaking,theBSstructurecangreatlyreducethecostcomparedwiththeCSstructure.
Comparisonofsystemmaintenanceandupgrade
EveryclientintheCSstructuremustinstallandconfigurerelatedsoftware,suchasoperatingsystemandclientsoftwareWait.Whentheclientsoftwareneedstobemaintainedandupgraded,evenifonlyacertainfunctionisaddedordeleted,alltheclientsoftwareintheCSstructureneedstobeuninstalledandreinstalledonebyone.Ifyoudonotupgrade,youmayencounterthesituationwheretheclientsoftwareversionisinconsistentandcannotwork.EachclientintheBSstructurecanprocessvariousinformationonlythroughthebrowser,withouttheneedtoinstallclientsoftware.Almostalltaskssuchasmaintenanceandupgradesareperformedontheserverside.Ifthesystemneedstobeupgraded,onlyJustinstalltheupgradeprogramontheserverside.
Comparisonofsystemsecurity
TheCSstructureadoptsapoint-to-pointstructuremode,andthedataprocessingisbasedonanetworkprotocolwithhighersecurity.Inaddition,CSisgenerallyorientedtoarelativelyfixedusergroup.Itcanperformmulti-levelverificationofpermissions,andhasastrongabilitytocontrolinformationsecurity,andsecuritycanbewellguaranteed.TheBSstructureadoptsanopenstructuremodelofpoint-to-multipointandmulti-point-to-multipoint.Itssecuritycanonlybeguaranteedbythedatabasethatmanagesthepasswordonthedataserver.Moreover,thenetworksecuritytechnologyisnotyetmature,anditneedstobecontinuouslydiscoveredandrepaired.Securitybreach.
Comparisonofuserinterface
TheCSstructureismostlybuiltontheWindowsplatform,withlimitedperformancemethods,andgenerallyhigherrequirementsforprogrammers.TheBSstructureisbuiltonthebrowser,whichhasaricherandmorevividwayofcommunicatingwithusers.
Comparisoninprocessing
TheCSstructureisbuiltonalocalareanetwork,andtheprocessingisorientedtoarelativelyfixedusergroupinthesamearea,andmeetstherequirementsforhighsecurity.Requirementsarerelatedtotheoperatingsystem.TheBSstructureisbuiltontheWAN,dealingwithdifferentusergroupsinscatteredareas,andhaslittlerelationtotheoperatingsystem.Inaddition,comparedwiththeCSprocessingmode,theBSprocessingmodesimplifiestheclientsideandonlyneedstoinstalltheoperatingsystemandbrowser.
Comparisonofsoftwarereuse
CSstructuresoftwarecanbeconsideredfromtheinevitableintegrity,andthereusabilityofcomponentsisnotasgoodasthereusabilitybuiltundertherequirementsofBSgood.BScorrespondstomultiplestructures,requiringrelativelyindependentfunctionstobeconstructed,whichcanbereusedrelativelywell.
Comparisonofsystemspeed
TheCSstructureisonelesslogicalstructurethantheBSstructure.Forthesametask,theCSstructurecompletesfasterthanThefaststructureofBSmakesCSmoreconducivetoprocessinglargeamountsofdata.Inaddition,sincetheclientisdirectlyconnectedtotheserver,thereisnointermediatelink,sotheresponsespeedisfast.
Comparisonofinteractivityandinformationflow
TheinteractivityoftheCSstructureisverystrong.IntheCSstructure,theclienthasacompleteclientsoftware.Itcanhandlealargenumberofreal-timedatastreams,andtheresponsespeedisfast.AlthoughtheBSstructurecanprovidecertaininteractivecapabilities,theinteractivecapabilitiesareverylimited.TheinformationflowofCSissingle,whilethestructureofBScanprocessinformationsuchasB-B,B-C,B-G,etc.,withchangesinflowdirection.