[PDF] THREE-TIER ARCHITECTURE FOR SENTINEL APPLICATIONS





Previous PDF Next PDF



2-tier vs. 3-tier Architectures for Data Processing Software

In this paper we will compare 2 real-world implementations of the commercial Luxms BI analytical platform based on 2-tier and on 3-tier architecture. Our 



Web App Architectures.pdf

WEB APP ARCHITECTURES: MULTI-TIER (2-TIER 3-TIER). MODEL-VIEWER-CONTROLLER (MVC). REST ARCHITECTURAL STYLE. Slides created by Manos Papagelis.



Client Server Model - Architecture 2-tier and 3-tier architectures:

Internet Explorer and Web Server works on two tier architecture. Here security problems are resolved using Secure Socket Layer(SSL). 3-tier architectures: In 



Cisco ACI Multi-tier Architecture White Paper

Tier-2 leaf: EX/FX/FX2/FX3/GX/GX2. See Table 1 for details on supported hardware. Table 1. Supported platform matrix as of Cisco APIC Release 5.1(3). Multi-Tier 



THREE-TIER ARCHITECTURE FOR SENTINEL APPLICATIONS

3.2 Sentinel Application with Three-Tier Architecture . 1.1 Monolithic Structure vs. Two-Tier ... 3.3 Network connection of Two-Tier Structure .



A Three-tier Redundant Architecture for Safe and Reliable Cloud

May 28 2019 2) C-CNC allows a user to opt for only the CNC functionalities they need



MAPCloud: Mobile Applications on an Elastic and Scalable 2-Tier

Scalable 2-Tier Cloud Architecture. M. Reza Rahimi1* Nalini Venkatasubramanian1*



Use Best Practices to Design Data Center Facilities

hours; Tier 2 specifies 22 hours; Tier 3 specifies 1.6 hours and Tier 4 architecture and engineering firm that will design and engineer the new data ...



Download Ebook Ccna 4 Chapter 1

6 days ago Networking Essentials. Chapter 1 2-Tier vs 3-Tier. Campus Network. Architecture CCNA 4 CH 7. Network Evolution 3.1. Serial Point-to-Point.



DBMS Architecture: 1-Tier 2-Tier & 3-Tier

Architecture helps in quick and secure access to this data. What is Database Architecture? 1 tier Architecture. 2-tier Architecture. 3-tier Architecture.

THREE-TIER ARCHITECTURE FOR SENTINEL APPLICATIONS THREE?TIERARCHITECTUREFOR SENTINELAPPLICATIONSAND TOOLS:SEPARATINGPRESENTATIONFROMFUNCTIONALITYBy

SANG?WOOHANATHESISPRESENTEDTOTHEGRADUATESCHOOLOFTHEUNIVERSITYOF FLORIDAINPARTIALFULFILLMENTOFTHEREQUIREMENTSFORTHEDEGREEOFMASTEROF SCIENCEUNIVERSITYOFFLORIDA1997

ACKNOWLEDGMENTSFirstandforemost?Iwouldliketoexpressmysinceregratitudetomyadvisor?Dr?SharmaChakravarthy?forgiving meanopp ortunitytoworkonthisinterestingtopicandforprovidingmegreatguidanceandsupp ortthroughthecourseofthisresearchwork?IamalsothankfultoDr?EricHansonandDr?HermanLamforservingonmy committee?Iwould like to expressmy sp ecial thanksto Sharon Grant for maintaining a welladministeredresearchenvironmentandbeingsohelpfulintimesofneed?Sincereappreciation is due to Hyoung jin Kim for his invaluable help during the implementa?tion of this work?Ialsowould like to thank all my friends for their constant supp ortandencouragement?IwouldliketothanktheO?ceofNavalResearchandtheNavyCommand?Control andOceanSurveillance Center?RDT?E Division? for supp orting this work?Last? but not the least? I thank my family for their endless love and supp ort?Mymother and father and my brother Dong?Ho give me unlimited amounts of patience?supp ort?andextraordinaryencouragementtogetthrough di?cultmoments?ii

Abstractof ThesisPresentedtotheGraduate Scho olof theUniversityof Florida in Partial Ful?llmentof theRequirementsfortheDegree of Masterof ScienceTHREE?TIERARCHITECTUREFORSENTINELAPPLICATIONSAND TOOLS:SEPARATINGPRESENTATIONFROMFUNCTIONALITYBySang?Woo HanDecember1997Chairman:Dr?Sharma ChakravarthyMa jorDepartment:ComputerandInformation Scienceand EngineeringDuring thelastfewdecades?graphic userinterfaces?GUIs?haveevolvedconsid?erablytomeetthedemandingrequirementsoftheapplication domains?Oneofthema jorrequirementsof the GUIwastheuseof graphics to communicate informationtotheusersvisually?Typically?aGUIpresentsa?nitenumberofoptionstotheusers rather than requiring the users to memorize and manually enter commands?Inthisway?theGUIhasbeendevelop edto putmore emphasisontheneedsof humanbeingsthan oncomputers?Theadventof theseintuitive and easy?to?usedesign elementsdo esnot?however?ensure that applications incorp orated with GUIs can b e easily extended or redesigned?Historically?theimplementationofGUIshasb eencoupledwithapplicationsandhenceformsanindistinguishableentity?Thecompleteintegrationofapplicationlogic andpresentationmakesit verydi?cult toextend?

Withthephenomenalgrowthofnetworks?nowdevelop ersalsohavetothinkab outdistributedapplications?Applicationsneedtobeabletomigrateeasilytoawidevarietyofplatformsandop eratingsystems?Intheconventionaldesign?theimplementation oftheinterfaceiscoupledwitharchitecturesp eci?cco desofanap?plication?Developingforasp eci?ctargetplatformb ecomesunmanageablesinceitrequiresdeepknowledgeofthedi?erentplatforms?ThegrowthoftheWorldWideWeb?althoughcomplex?distributed?andheterogeneousinnature?hasmadeitanalternative p opular userinterfacefor interactive applications?Anewapproach?a3?tierarchitectureprop osedinthisthesis?supp ortssepara?tionofthethreebasicdatabaseapplicationelements:presentation?userinterface??functionality ?theengine?? and data?This clear separation gives?exibility and inde?p endence in application design whichprovide op en choices ab out each tier and b etterCPUutilizationandcost?Thechoiceofanarchitecture?neutralandp ortablepro?gramming language for the user interface provides a simple solution to the problem ofdistributingapplicationsacrossheterogeneousnetwork?basedcomputingplatforms?Thenewdesign makesit simpler to manage applications and supp ortmo di?cations?Moreover?thenewarchitecturemakesapplicationssuitableforuseintheWWWenvironmentswiththeuseofJava?This thesisconcentrateson the design and implementation of the 3?tier architec?ture for application design in whichwe try to solve the problems of the conventionalintegratedarchitecturewithanemphasisonthedevelopmentoftheInteractiveVi?sualizationToolandthePlanMonitoringApplication?Wediscussvariousissuesasso ciated with the application of the 3?tier approach to the Sentinel application andto ol?

CHAPTER1INTRODUCTIONThe term user?interface refers to the metho d and devices that are used to accom?mo date interaction b etween machines and human b eings who use them ?users??Userinterface can take on many forms but it is always exp ected to accomplish the followingfundamentaltasks:communicatinginformationfromthemachinetotheuser?andcommunicatinginformation fromtheusertothemachine?Withe?ortsoffollowingtheprinciple?userinterfacesenteredthemo dernerawheninnovativedesignersattheXeroxPalo Alto ResearchCenterbrokeawayfrom thecharacter?basedinterfaceparadigmandinventedtheGraphicUserInterface?1??GUI??Thisnewparadigmsigni?cantlyreducedthetraining thatwasnecessaryto useacomputer?andforthe?rsttimeuninitiateduserswereabletob ecomepro ductivealmostimmediately?Inworkstationcomputers?XwindowingenvironmentwiththeMotifstandardb egantodemonstratethateasytouse?graphicsinterfacescouldbewrapp edaroundthema jorityofscienti?candengineeringsoftwarethatalreadyexisted?ThesearchaicFORTRAN? COBOL? ADA applications suddenly had a re?birth?They b ecame easytouse?Suddenlyma jorcomputercompanieswereseekinghighdollardefensecon?tractstoplaceshinyfrontendsaroundothercompaniesexecutables?TheX?Motifb ecamethestandardfor workstationGUIs?So where is all this historical information taking us?One gigantic collision course?TheimplementationoftheMotifneedstobecloselyintegratedwithapplicationsand hence functional core of the application is not easily recognizable or understand?able?Astheapplicationsevolveoverap erio doftime?thisdesignmakesitdi?culttodi?erentiatebetweentheinterfaceandtheprogrammingstructure?Redesignor1

2

PRESENTATION + FUNCTIONALITY

(INTERFACE + OODB APPLICATION) (EXODUS)DATA

1st TIER 2nd TIER

(B) 2-TIER STRUCTURE

1st TIER

INTERFACE + FUNCTIONALITY + DATA

(A) MONOLITHIC STRUCTURE

Figure 1?1?Monolithic Structurevs?Two?TierStructuremo di?cation pro cess can b e complex and challenging?Sometimes? it is imp ossible tobreakdownthesystemsinto manageable pieces?1?1CurrentArchitecture?Two?TierStructure

Thetraditional?ormonolithic?applicationillustratedinFigure1?1A?do esnotseparate user interface from its functionality or its data?All three individual strandsarewoventogetherlikeabowlofspaghetti?Usuallytheseapplicationsarehand?to oledandworkasonepiece?Partsarenotinterchangeableandmo di?cationsareoftendi?cultandtime?consuming?Ananalogywouldbetothetimeb eforeinter?changeablecomp onents?whenmostthingswerehand?crafted?ifapartbroke?onehadto?ndacraftsmanthatcouldhand?craftauniquereplacement?Thiscausedasigni?cant drag in pro ductivity?The onset of interchangeable comp onents caused anexplosiverise inindustrial pro ductivity?

3Two?tierclient?serverarchitecture?thecurrentarchitectureofSentinelapplica?tion?begintodisassemblethis?spaghetti?structure?Inthiscategory?dataarede?coupledfromthepresentation?functionalitypiecebutfunctionalityisstillentwinedwith another element?Thisarchitecture is an improvementoverthe monolithic casedescrib edab ove?butitisnotasop enasitcouldbeandisstilllikelytoresultinsameproblem?1?2Limitations ofTwo?Tier Structure

Inordertounderstandthelimitationsofthecurrentdesign?onemustlo okin?sidetheco deandrecognizethattherearethreeinherentlydi?erentcomp onentsforanydatabaseapplication?Thesecomp onentsareuserinterface?applicationlogic?and data access?In currentSentinel applications? two?tier structure?all three or twocomp onents of the application are intertwined? built as a single entity?withnomod?ularitytoseparatethem?Onetiercontainsalltheapplicationlogicandtheothertiercontainsthedata server?Applicationsbuiltwithatwo?tierarchitecturedonottendtoscalewell?Large?scaleapplications?whichusuallyrequirecomplexpro cessing?hightransactionvol?umes? and frequent maintenance typically ?hit the wall? when a two?tier architectureis employed?First? there exists the complexitywall?It refers to the complexityoftheapplication? measured by complex algorithms? large numb er of ob jects? or large num?b er of functions?In most two?tier applications? the user interface logic? the applicationlogic? and the database access logic are intertwined? not separated and mo dular?Thep otential for co de reuse of the kind that a multi?tier? ob ject?oriented system providesislargelyeliminated?andasthecomplexityandsizeoftheapplicationgrows?thedi?cultyof keepingit bug?freegrowsas well?Next? supp ortabilitywall will hold back the application from ?exible maintenance?Supp ortabilityistheproblemcommontothetwo?tierapplicationarchitecture?As

4statedab ove?eachtier isintertwined?inexorably linkedtogether?Supp osewehad acustomer service application that was built using a two?tier approach?If the manage?mentdeterminesthatcustomersshouldbeallowedtoservicethemselvesbyhavingWeb?basedinterfaceorVoiceresp onse?basedinterface?theentireapplicationmayhaveto b e re?written to supp ortVoice resp onse?basedsystemor Web?basedsystem?Thedevelopmentgroupfacestheburdenofsupp ortingtwoco debasesforoneap?plication?Worse?thistwo?tierapproachwhichisatypicallyclient?serverstructure?cancausesupp ortabilityproblemsontheothersideoftheapplication?dataaccessside? as well?What would happ en if some new requirements were intro duced that ne?cessitated the move from the current relational DBMS to an ob ject?oriented DBMS?Ifthedataaccesslogicisintimatelyintertwinedwiththeapplicationlogic?ma jorchangestotheapplication arelikelytobenecessarytosupp ortalatermigration toarelational database?1?3WWWBrowserfor anAlternativeInterface

WWW?WorldWideWeb??variousbrowsersandJavalanguagewerethema jorfactors that transformed the Internet and made it p ossible for users to participate inthis global network?Todayprograms like Netscap eNavigator and InternetExplorerhavefurtherenhancedWebbrowsing?Numeroussearchengineshaveeasedthetaskof ?nding information?It hasbeenwithin thepastthreeyearsthat theInternethasseen its greatest expansion to date? and it is still expanding at a high rate to day?ThisphenomenalgrowthofInternetp ersuadedmanydevelop erstouseWWWbrowsersastheiralternativeuserinterfaceforvariouskindsofapplicationsb ecauseWWWisaccessibleformanydi?erentplatformsandevenunexp eriencedusercanuseaWWW?basedinterface?CommonGatewayInterface?2??CGI?andHTMLFormscanbeusedtopro?videWWWasanalternativeinterfacetousers?SinceWWWisanotherma jor

5client?serversystem?withprobablymillionsofusers?interfacebetweenclientsandserverhastobedevelop ed?TheytalktoeachotherinaWWWproto colsp eci?ca?tioncalledHTTP?3??Hyp erTextTransferProto col??HTML?Hyp erTextMarkupLanguage? format is usedfor interfacing b etweenthe clients and the Web server andforms wereintro duced into HTMLto allowinteraction too ccurfrom the browsertotheserver?Itallowsdynamicdo cumentstobecreatedintheserverinresp onsetobrowserinformation byCGI?ThisWWWforms?basedapplicationusingCGIrunsontheserversideinre?sp onsetoarequestfromthebrowser?Thisrequestsp eci?esthescripttorunandmakesavailableforminformationaccessiblethroughenvironmentvariablesandthescript?s standard input?Application still has to re?engineered for use with CGI? CGIsu?ers from p erformance delay since the request has to go through server side HTTPproto colandCGIhandler?CGI?MDPisanexampleofre?engineeredapplicationandisdescrib edinmoredetailinchapter2?Itisobviousthatthereexistsanotherrequirementforapplicationdevelop ersthatapplicationsneedtobeusedwithWebacrossdi?erentplatforms withhigh p erformance?1?4ANewApproach

Tosolvetheproblemsmentionedinprevioussections?weneedab etterwaytoconstructapplicationswheretheapplicationlogicshouldbeexpandedeasilyandlong?termsoftwaremaintenancehastobemanageablewithwell?de?nedb oundariesof application?Moreover?newapplications need to run on the Web to provide cross?platformusability?Thesearethenewrequirementsforthesolutiontothecurrentdesign?The remainder of this thesis is structured as follows?Chapter 2 overviews currentSentinelapplicationsanddescrib estheirlimitationsanddisadvantages?Chapter3prop osesasolutiontothecurrentdesignapproachanddescrib esitsadvantages

6andhowitisappliedinthedesignoftwoSentinelapplications?Inchapter4?wediscussdesign?implementationissuesofthenewdesignandhowthenewapproachhas b een used to implementan Interactive Visualization To ol and a Distributed PlanMonitoring Application?Chapter5hasconclusion along with futuredirections?

CHAPTER2OVERVIEWOF CURRENTSENTINELAPPLICATIONInthis chapter?weoverviewthecurrentSentinelapplications designedusingthetwo?tierapproachand their disadvantagesandlimitations?2?1MDP Application with Motif

First MDP? Plan Monitoring Application? is a single?user application? which meanseveryuserrunsaninstanceofMDPlo cally?InthisenvironmenttheMotifuserinterfaceistightlycoupledandintegratedwiththesystem?whichisatypicaltwo?tierarchitecture?TheSentinelDBMSandtheunderlyingOp enOODBareaccessedbyMDPaslibraries?Thebene?tofthisdesignapproachisthattheapplicationandthevisu?alization programruninthesameaddressspace?Hencedatacanbereadilysharedby parameter passing and pro cedure invo cation?The user interacts with the Sentinelsysteminasimpleandasynchronousmanner:he?shesubmitsoneormanyrep ortsatatimeandwaitforthesystemtopro cessthemessages?detecteventsandcarryoutactionsaccordingtorulesthatwould?re?Resultsofactionsaresentbacktothe Motif front end for the user to visualize?Since there are twotyp esof critical sit?uationstomonitor ?weatherrelatedandnon?weatherrelated?theymustbetreateddi?erentlyto suit user?sneed?Inthisdesign?non?weatherrelatedresultmessagesareshownasplaintext?Forweatherrelatedmessagesinadditiontotextoutputwehavearrangeda2?Drasterimage representing the geographic area we are currently monitoring? which is a partialworldmapcontainingmostofthePaci?cOceananditsAsianandAmericancoastlines?Aregionisde?nedasarectangularareainthemap?Currentlythereare107

8

Figure 2?1?MDPLayoutregions of interest?When severe weather change o ccurs in a region? and an appropri?atealertis issued?theregionwill b ehighlighted arounditsb orderinaeye?catchingcolor?Newly created color rectangle will blink to enhance user attention untilanewerup datehapp ens?Corresp ondingtoseverityofweather?aregioncanbehighlightedin oneofthreecolors :violet? orange?and redrepresentingtheweathercondition intheascendingorderofseverity?Figure2?1showsthelayoutoftheMDPgraphicaluserinterface?It containsa group ofsubwindowsandasetofaction buttons?MDP is a military application utilizing the active capability of the Sentinel DBMS?The ?rst version of MDP is implemented with X?Motif interface?The Motif graphicaluserinterfaceprovidesapplicationdevelop ers?anduserswiththeindustry?smostwidelyacceptedenvironmentforstandardizingapplicationpresentationonawide

9rangeofplatforms?Itistheindustrystandardgraphicaluserinterface?asde?nedbytheIEEE1295sp eci?cation??usedonmorethan200hardwareandsoftwareplatforms?Motif has b een the leading user interface for the UNIX op erating system?However? the extension to multi?user? and distributed application means buildingtheapplicationfromthestartalloveragain?TheMotifinterfaceco deiscloselycoupled with application logic?Also this Motif version of MDP is architecture sp eci?cwhere running on a di?erent platform means re?writing of a new application?WWWForm?based MDP is one of this example?The application has to b e re?engineered forausewithCGI handler?2?2MDPApplication with CGI

ThegrowthoftheInternethasmadeitisthenewestwaveofcommunicationforelectronicmail??letransfer?telnetaccess?transactionapplications?andmuchmore?Once the WWW concepts and the proto cols were placed in the public domain?programmers and software develop ers around the world b egan intro ducing their ownmo di?cations andimprovements?2?2?1Common GatewayInterface

CGI ?Common GatewayInterface? is one of the improvements in this ?eld?Stan?dardHTMLwithCGIgivesareasonableamountoffunctionalityonitsown?Itcanbuild lo okandfeel of theuserinterfacebyplacing formatted textandgraphics?anditgivesadecentsetofcontrolstopassontotheuserthroughformsandtheirwidgets?suchas?elds?checkboxes?andlistboxes?Hyp ertextlinksturnouttobeareasonablesubstituteformultiplewindowmanipulation:clickingonalinkislikecreating a new window? and the ?back? and ?forward? arrow buttons on most HTMLbrowsers are ways of changing your windowfocus?Figure 2?2 shows the layout of theCGI?MDPinterface?

10

Figure 2?2?CGIMDPLayout

11The web architecture gives other imp ortant features for client?server development:itincludesproto colslikeHTTPthatabstractawaymanyofthegrungydetailsofTCP?IPcommunication;HTMLisasimplelanguagetodevelopinandb estofall?yourresultingclientco deisguaranteedtoexecuteonUNIX?Macintosh?andall?avorsof Windows?withoutanyp ortability issues?In the server machine? the HTTP server forks a CGI handler which in turn forks anew session pro cess at initialization time?For each transaction it makes a connectiontotherunningsessionpro cessbasedonthestatekeyinformationcontainedintheHTTP request?With CGI the entire HTTP request can b e recreated? so the handlerrecreates and sends it onto the session pro cess through the named pip e or the op en ?ledescriptor?The handler waits until the session pro cess has completed the transaction?readstheresp onse?forwardsitto theHTTPso cketandexits?2?2?2CGIMDP?WWWForm?basedApplication withCGI

Usingthisscheme?MDPis p ortedtoWWWenvironments?AswementionedinChapter 1? the redesign pro cess?separating interface co des from the whole application?to oksubstantialamountoftimeande?ort?Also?theapplicationsu?ersfromthedrawbacksof CGI?Theforms?CGI schemeis quite ?exible buthastwoma jor drawbacks?First? thecommunication is only one?way?HTMLpagescannotreceiveinformation backfromtheserverandactonit?Becauseofthisdrawback?intheCGI?MDP?applicationbehavesindiscontinuousmanner?Foreachrequestsent?theapplication waitsforaresp onsefromtheserverandapplicationterminates?Everyrequestisonedistinct?session?wheredatahastobeloadedeverytime?andintheDBapplicationthiscauseslow p erformance?Next? the approach is semantically weak and requires lots of ad?ho c CGI program?minge?orttosetupcorrectly?Thisisb ecauseafterthecontrolofuser?srequestis

12

WWW BROWSERINTERNET WWW SERVER MACHINE

CGI PROGRAM

3)RETURNS2)CALLS CGI

PROTOCOL

HTTP CGI

HANDLER4)RESPONSE1)SUBMIT

Figure 2?3?CGIInterfaceMo delsenttoCGI?wehavetodoistowaitfortheresult?Wehavenoideaab outwhat?shapp eninginthemiddleofCGIscripts?pro cess?TheerrormessagesfromtheCGIprogramaresomewhat?translated?toWWWbrowsertermswhichmakesithardto debug?The error message is distorted in the pro cess b etweenthe steps 3 and 4 intheFigure 2?3?Since someof thedata exchangeis done throughthe UNIXenviron?mentvariablesintheCGIhandler?datalosscanhapp en?Inordertopreventthisproblem?remoteshellisusedintheCGI?MDPandthiscausedseverep erformancedelay?Simple diagram of CGIsessionis shownin Figure 2?3?2?3Dynamic Rule Editor withTcl?Tk

Tcl?Tk ?4? is another choice for developing GUI to ols for Sentinel?Dynamic RuleEditor ?5?hasbeenimplemented with Tcl?Tkinterface?TclstandsforToolCommandlanguage?Tclisalibrarypackagethatcanbeembeddedinapplicationprograms?TheTcllibraryconsistsofaparserfortheTcllanguage?routinestoimplementtheTclbuilt?incommands?andpro ceduresthat allow each application to extendTcl with additional commands sp eci?c to thatapplication?Tcl?TkisusedoverMotifsinceTclcommandsprovidesahigher?levelinterfacethanmoststandardClibrary to olkits?Simple userinterfacesrequirejustahandful

13ofcommandstode?nethem?However?theXTo olkitTkisitselftightlycoupledwiththeTcllanguage?whichhasdisadvantagessuchaslackofmo dularity?andthecurrentinterpreterisslow?ItisnotsuitableformigratingapplicationstoWWWenvironments?Tcl?TkonlyprovidesrapidprototypingofX?Windowsystemappli?cationsandhastosu?ersfrom thesameproblemsmentionedab oveforMotif?basedapplications?

CHAPTER3THREE?TIERARCHITECTUREFOR SENTINELAPPLICATIONSThis chapter de?nes three?tier architecture which is widely accepted and providesasolutiontotheproblemsofthepreviousapproachanddescrib eshowthenewarchitecturecanbeappliedintheSentinelapplicationdesignwithJavalanguageenvironment?3?1Three?TierArchitecture

The term client?server architecture is a general description of a networked systemwhereaclientprograminitiatescontactwithaseparateserverprogram?p ossiblyonadi?erentmachine?forasp eci?cfunctionorpurp ose?Theclientexistsinthep osition of therequesterfor theserviceprovidedbytheserver?The newgeneration of the client?server system?termed three?tier architecture? isan architecture that has clear separation over the application elements?This structuresupp ortsseparationofthethreebasicdatabaseapplicationelements:presentation?userinterface??functionality?theengine??anddata?Thesewell?de?nedb oundariesgive develop ers more ?exibility and indep endence in application design whichprovidesop enchoicesab outeachtierandb etterCPUutilizationandcost?Asaresult?long?termsoftwaremaintenanceimprovesresultinginrapid?lowcostdevelopmentenvironment?Software maintenance can b e applied to each manageable entitywhichmakesthepro cessrapidandlowcostdevelopmentp ossible?Three?tierarchitectureprop osedin thisthesisisillustrated in Figure 3?1?With Java? thenewapproachprovidesawayto eliminate lackof client sidepro?cessingwhichwasasigni?cantweaknessinHTML?basedCGIapplication?Italsoprovidesmanyotherfeatures?suchassecurityandtheabilitytorunapplications14

15

FUNCTIONALITY

(OODB APPLICATION)DATA (EXODUS)PRESENTATION (JAVA INTERFACE)

1st TIER 2nd TIER 3rd TIER

PRESENTATION ? FUNCTIONALITY

?INTERFACE ? OODB APPLICATION? ?EXODUS?DATA

1st TIER 2nd TIER

?A? 3?TIER ARCHITECTURE ?B? 2?TIER ARCHITECTURE

Figure 3?1?Three?TierStructurevs?Two?TierStructureon di?erent platforms without re?compilation? and makes application suitable for useontheWeb?Inaddition?itreturnstoustheabilitytobuild applications usinganynumb er of tiers we require for our application? providing all of the p erformance? ?ex?ibility? andsupp ortabilityadvantages?Itallowsustocombineall oftheadvantagesofthree?tier architecturewith all ofthegreat advantagesof theWWW?Thenetworkp erformanceis b ettercomparedtothetwo?tierstructure?Asignif?icantreductioninnetworkfo otprintandenhancementofp erformanceisp ossibleinthealternativethree?tierclient?serverarchitecture?Forexample?amiddletiermaybeinsertedas server?thusachieving a three?tier structure?Theclientinteracts withthe middle tier via standard proto col such as API? or RPC? The middle tier interactswith the server via standard database proto cols?The middle tier contains most of theapplication logic? translating client calls into database queries and other actions? and

16

CLIENTSAPPLICATION LOGIC DATA ACCESSQUERY

TRANSACTIONS

1st TIER 2nd TIER3rd TIER

Figure 3?2?Networkconnection of Three?TierStructure +CLIENTS APPLICATION LOGICDATA ACCESSQUERY

TRANSACTIONS

1st TIER2nd TIER

Figure 3?3?Networkconnectionof Two?Tier Structuretranslating data from the database into client data in return?The network connectionofthree?tier approachis illustrated in Figure 3?2?Typically? the ?rst generation systems use a two?tiered architecture where a clientpresentsaGUIinterfacetotheuser?andusestheuser?sdataentryandactionstop erformrequestsofadatabaseserverrunningonadi?erentmachine?Inthelatter?application logic is typically tied to the client application and a heavy network pro cessisrequiredto mediate theclient?serverinteraction?Thenetworkconnectionoftwo?tierapproachisshownin Figure 3?3

17Theremotedatabasetransp ortproto colsareusedtocarryoutthetransaction?Thenetwork?fo otprint?isquitelargeperquerysothatthee?ectivebandwidthofthenetwork?andthusthecorresp ondingnumberofuserswhocane?ectivelyusethenetwork?isreduced?Furthermore?notonlythenetworktransactionsize?butquery transaction sp eed? is slowed bythisheavy interaction?This architecture is notintendedfor mission critical applications?3?2SentinelApplication withThree?TierArchitecture

Asyouseethe?guresab ove?two?tierstructureoverloadsclientsidebyhavingmultiple copies of application logic running and server side by heavy network transac?tions?In order to apply this new design in Sentinel application? application elementsarebrokendowninto manageable pieces?3?2?1JavaInterface

Inthethree?tierapproachprop osedinthisthesis?the?rsttier?userinterface??isimplementedwithJavalanguageinthenewthree?tierdesign?TheJavaVirtualMachine is part of the Java sp eci?cation?The co de that is distributed in Java appletsisinbyte?co deformat whichmakestheinterfaceprotable?Theinterfacecanberunondi?erentplatformswithoutre?compilation anditalsomakestheimplementationsuitable foruseon theWeb?NetworkingclassesareincludedintheJavalanguage?andappletsdownloadedintoabrowserarep ermittedtoop enso cketconnections?Javaclassescanconnectindirectlytoadatabaseserverbyop eningaso cketconnectiontoanintermediateserver?whichinturnop ensaconnectiontothedatabase?Althoughthismetho dislessdirect?itisp ortable?sincethemiddleware?Proxy?6??cantranslatebetweenplatform?dep endentdatabasecalls andacustomplatform?indep endentsocket?basedproto col?This is also the waywewanted to organize our application elements in thethree?tierstructure?TheProxyServeris illustrated in Figure 3?4?

18

JAVA APPLET

USER INTERFACE APPLICATION LOGICOODB APPLICATION EXODUS

DATA ACCESS

1st Tier 2nd Tier3rd Tier

GATEWAY

MIDDLEWAREPROXY

SERVER

Figure 3?4?ProxyServerinThree?TierStructure3?2?2ProxyServer

InWebster?sdictionary?itstatesasfollowing:prox?y?PROK?see?n??1?Anagentauthorizedtoactforanother?TheProxyistheproto col?so cket?based?usedinbetween?rsttierandsecondtier?Inmiddlewareterminology?aproxywhichtranslatesbetweenaclientandaserveriscalledagateway?Oneproxycaneasilyservicemultipleclientsandmultipleserversbyusingmulti?threading?Aproxyisaverygeneralconcept?Itisanythingwhichstandsin?b etweenaclientandaserverandisgiventheauthoritytoaccomplish aparticular purp ose?3?2?3DMDP?WWW Browser?basedApplication with Applet

Java applet is another wayof writing java program wherethe javabyte?co decanbeexecutedthrough WWWbrowsers?Theapplets canusenetworkingfeaturesjustasanyJavaprogramcan?withtherestriction thatall communicationmustbewiththe host that delivered the applet to its current host?If the ?rst tier is implementedas a Java applet and Proxy serveris running in a Web serverwhich is the same hostastheappletisrunning?wecanuseWWWbrowsersasouruserinterface?Thisishow three?tier structure with Javacan make applications suitable for use on the Web?Thisisalso anexampleof howtouseaserver?sideapplication togetaroundappletsecurity restrictions and Figure 3?5 illustrates this example in detail?In the example?

19

SERVERWWW

PROXY

SERVER

WWW Browser

INTERNET

JAVA APPLETMACHINE A : WWW SERVER MACHINE

CISE NETWORK

MACHINE B MACHINE C

Figure 3?5?3?Tier StructurewithProxyin WWWenvironmentappletsoriginatingfromthesamehostbutrunningondi?erentmachinestalktoeachother using a server?sideapplication as an intermediary?Implementation issuesregardingapplyingthethree?tierapproachtoWWWenvironmentarediscussedinmore detail in Chapter4?

CHAPTER4IMPLEMENTATIONInthischapter?wediscussvariousissuesrelatedtotheimplementationandde?signofJavaInteractiveVisualization andDistributed PlanMonitoring Application?BothofthemarenewSentinelapplicationsdevelop edwithJavainterfaceandtheDistributedPlanMonitoringApplication?DMDP?isthe?rstexampleofSentinelapplication withthree?tier client?serverarchitecture?Sentinel?s Interactive ECA Rule Visualization and Explanation To ol ?SIEVE? hasbeenimplementedwithJavalanguagetoexploretheuserinterfaceasp ectsofJavalanguageenvironment?DMDPhasbeenimplementedusingthree?tierarchitecturewithJavainterface?BothoftheapplicationshavebeenalsoconvertedforWeb?basedversionwithProxyservertoutilizetheuseofJava?Web eginwithabriefintro ductionofJavaLanguageEnvironments?7??Implementationofb othsystemsarediscussedin detail afterthat?4?1TheUseof Java

Java is hailed as the latest silver bullet to cure software ills by making all of yoursoftwareInternetaware?runningacrossdi?erentvendorsplatforms?The Web is now synonymous for many p eople with the Internet that underlies it?andusage?guressupp ortthis?Distributed programming tomanywill b eprogramsthata?ecttheirWebbrowser?andwanderthroughWebdo cumentsontheirb ehalf?ManymechanismshavebeenattemptedtobringprogrammingtotheWeb?TheseincludeFormswithCGIscripts?Plugins?VBScript?etc?Ofallthese?Javaisthemost ?exible and the one with the most p otential to b e delivered across all platforms?Unless things go astray?Java is set to b e the primary language for Web programmers?20

21Appletsandapplicationscommonlypresentinformationtotheuserandinvitetheuser?sinteractionusingaGUI?ThepartoftheJavaenvironmentcalledtheAbstractWindowToolkit?7??AWT?containsacompletesetofclassesforwritingGUIprograms?Theto olkithasmenus?lists?textboxes?buttonsandmanyotherstandard user?interface elements?GUI environments such as Windows? the X WindowSystem and the Mac interface all use event?driven mechanisms to supp ort user?driven?TheAWTisbuiltontopofeachoftheseandalsousesaneventdrivenmo del?This means that applications can b e built to conform to the standard user?interactionmo dels?TheJavaVirtualMachine?7?ispartoftheJavasp eci?cation?Theco dethatisdistributedinJavaappletsisinbyte?co deformatwhichismachineindep endent?Theuseofvirtualmachineimpliesthatalo calinterpreterisusedtoruneachJavaprogram?Thusthesame co derunseverywhere?4?2JavaInteractiveVisualization

Intheactivedatabasemanagement systems?ADBMSs??theactivefeatureis in?corp oratedintoDBMSsbytheevent?condition?action?8??ECA?ruleabstraction?UsingECArulesinactivedatabasesystemsforreal?lifeapplicationsinvolvesim?plementing? debugging? andmaintaining large numb er of rules?For this? agraphicaldebugging and explanation facility to assist understanding of the interactions ? amongrules?amongevents?betweenrulesandevents?andbetweenrulesanddatabaseob?jectswouldbeuseful?SIEVEisato olthatenablestheusertovisualizetheeventdetectionandruleexecutiondetails at run?time in on?line mo de as well as at p ost?run?time on a replaybasis?Moreoverusergainsanewdimensionofinteractivitythroughthedebugger?stwo?waycommunication channel?Rather than passively receiving information deliv?eredouttotheuserinterface?theuserisabletoinputchangestotherulesystem?

22mo difyandmonitortheexecutioninaninteractivemanner?WithJava?scross?platform architecture? this to ol with a Javainterface can b e run on any machine andevenon theWebbrowser?Theinput totheto ol consistsof:classandinstancelevelrule?eventde?nitions:Thisinformation is supplied bytheuserintheapplication program using theevent?9?andrule ?10?de?nitionlanguage?The prepro cessor gathers this static information in the form of a ?le?eventdetectioninformation:Thisistherun?time information obtainedontheo ccurrencesofeventsandthecreationofeventob jects?Thisinformationisprovidedbythelo cal eventdetectorandwrittentotherun?time log?le?rule?ringinformation:Thisisfurnishedtothevisualization to ol inthesamewayastheeventdetectioninformation?Inaddition?thetransactioninwhichruleswere?redandtheinformationconcerninglo cksacquired?releasedondatabaseob jectsarealso furnished?transactioninformationTheTIDofthetransactioninwhicharuleis?redisprovidedtotheto ol bythetransactionmanagerinOp enOODBkernel?Thisasso ciationbetweentheruleandthetransactionhelpstheuservisualizethenestedtransaction approachSentineladoptedin rule execution?The visualization to ol?s parser reads the static information? pro cesses them to con?

structeventtree graphsand stores theeventand rule information in the in?memoryevent and rule rep ositories? which are linked list structures?The data structure whichcapturesthe nestedexecution of rules is an n?ary tree?The ro ot no de representsthetop?leveltransactionoftheapplication?Whenthistransactiontriggersarule?andsincerulesareexecutedassub?transactions?thechildno deofthetop?leveltransac?tionrepresentsthe?rstrule?red?Thisno deinturncouldtriggeranotherruleand

23it is represented as the child no de ?subtransaction of subtransaction? and so on?Thetransactiontreegrowsinatop?downway:itstartsfromthetop?leveltransactionandspansto thedescendents?Therearethreemo desareavailableforusers?Usercanvisualizeeventsandruleswhentheyo ccuratrun?time ?Run?Time?Mo de? or cando solater via a storedevent?rule log ?Post?Analysis?Mo de??To supp ort online mo de? we need to have somemechanismbywhichthereisinstantaneousnoti?cationofevento ccurrencesand?ringofrules?Thiscanbedonebymeansofso cketmechanism?Interactivemo deallowstheusertoruntheto olallowingtheinteractiveactivities?Usercansetsupabreakp ointswhereapplicationinterruptsandwaitforausertogoon?Usercanalsoinputchangestothesysteminthecourseofexecutionandvisualizethee?ectofthesechanges?TheInteractiveVisualizationToolo?ersuniformsupp ortsforthefollowingandFigure 4?1 illustrates thefunctional mo dules of theInteractiveVisualization To ol?step?batchmodetracingofrules:Theusercanswitchbetweenstepandbatchmo de during execution?When the step is chosen? the unit of consecutive execu?tion is the interval b etween anyevent? rule or break p oint?When batchmodeischosen? the unit of trace is the entire application ?if break p oints are ignored? ortheintervalbetweentwobreakpoints?whenbreakpointsareaccepted??Theusercanenable?disable breakpointsat run?time?usinginformationfrompreprocessing?post?analysis?run?timeexecution:Theusercansp ecifyifprepro cessorshouldbeusedbythedebugger?Also?he?shecancho osefromp ost?executionandrun?timeanalysisb eforeandatraceandchange this preference afterwards?SIEVE utilizes either ?les or so ckets accord?ingly? buttheapp earanceofthefront?end remains thesame?

24
RULE

REPOSITORY

SOURCE CODEAPPLICATION

TRANSACTION

MANAGEREVENT DECTECTION

RULE EXECUTION

EVENT

REPOSITORY

PARSER

USER

EXECUTION

PROGRAM

STATIC LOG FILE

RUNTIME LOG FILE

SOCKET

INTERFACE

DISPLAYPRE?PROCESSOR

SENTINEL

SENTINEL

C?? COMPILERINTERACTIVE VISUALIZATION TOOL

Open OODB

PRE?PROCESSOR

POST PROCESSOR

Figure 4?1?Functional Mo dulesof InteractiveVisualization Toolusinginformationfromtransactionmanagerandeventdetector?interactivemodeonrun?time:Inordertosupp ortprede?nedbreakpointsinanappli?cation?anadditionalfeatureisaddedtotheprepro cessorthatitrecognizesbreakp ointsandmapsthemintoakindofexplicitprimitiveevent?Thisap?proach enables the event detector to notify the user interface at run?time whenbreakpoints o ccur?Moreover?theprepro cessorcreatesa data structurewhichcontainsallpro cedures?p ointers?thatarep otentiallyconditions?actionswiththeir names?strings??Thisone?to?one corresp ondencebetweenthenamesandp ointers makes it p ossible to search p ointers by name at run?time?This featureisextremelyusefulforrun?timerulecreation?whentheconditionandactionpartneedtob e de?neddynamically withoutrecompiling?

254?2?1Limitations and Related Work

Severalsystemshaveaddressedtheuseofto olstosupp orttheanalysisofrulebehavior?ThecurrentVisualization Tooldo esn?thavecyclecheckingduringexecu?tion to alert the user of p otential non?terminating rules?It needs an indication of theexistenceof p otential cyclesin rule execution?TheDEARpro ject?11?whichpresentsadebuggingto olforanactive?ob ject?oriented database detect the existence of cycles among rules?The DEAR allows thatasubsetof rulescan b eviewedto providefor a more fo cusedtracking?ThePEARD?s?12?debuggingfeaturesalsoincludedetectingp otentialcyclesinrule executionanda utility to examine di?erent rule executionpathsfrom thesamepointintheruletriggering pro cess?Theseto olsaresimilartoourVisualizationto olesp eciallywithresp ecttorulebrowsing?theability of setbreakp oints?theabilitytoactivate and deactivaterules?4?2?2Implementation Issues

Thevisualization involvesdrawingstaticgraphfromSentinelpre?pro cessor?10??The static information of class level and instance level of rules and events is providedtotheTo ol?andparsedtogenerateagraph?Thenthegraphisdisplayedintheformofabstractsyntaxtrees?Thisinformationisfurnishedbythepre?pro cessoratcompiletimeandattheruntime?informationab outeventdetectionandruleexecutionisprovided?Figure4?2illustratesthepro cessofthestaticinformation inJavaInteractiveVisualization Tool?Thestatic information? a log ?le generatedbySentinel pre?pro cessoror dynamicinformation of event detection and rule execution are senttoJavaInteractive Visual?ization To ol through C?? ProxyServer?The purp ose of this middle gatewayserverisforsupp ortofauseoftheto olontheWebandseparationbetweenpresentationfromanother?TheProxyserverisjustastandardso cketproto colbetweenthe1st

26
(CLASS LEVEL & INSTANCE

LEVEL RULES/EVENTS)STATIC INFO

PROXY

SERVER

COMPOSITE EVENT OBJECTRULE OBJECT

??? ?????? ???PRIMITIVE

EVENTS

DISPLAY

PARSER

JAVA VISUALIZATION TOOL

Figure 4?2?Pro cessingofStatic Information in JavaInteractiveVisualization Tooltier?userinterfaceandsecondtier?application?Eachruleandeventfrom thestaticinformation is constructedlo cally in theto ol as aJava class?The event class de?nition of the ob jects used in the to ol is de?ned as b elow?Eachob ject that needsto b e drawn in the Canvas area of the to ol has to have data ab outitslo cationaswellasitseventorrule?WhenthestaticinformationfromProxyispro cessedintheto ol?foreachob jects?rulesandevents??appropriatelo cation datais computed and assigned to them?Those ob jectsare in memory and usedwhile theto ol is up and running?This means that the to ol can draw those ob jects anytime sinceall the data ab out ob jects are available in the to ol?In JavaInteractive VisualizationTo ol?usercanrearrangetheeventgraphbypointinganyob jectanddraggingtoadesired place?This is advantageous since the event graph can b e really tangled if thesyntaxof thecomp osite eventsis complex?publicclassVisNode?

}The run time information is provided to the to ol in the form of a log ?le or so cketstream?Ineithercase?theto ol hastodrawtheruntime information in theCanvasalong with the static event graph?For each run time information ?eventdetection orruleexecution??drawingin theCanvasis up datedaccording tothetheinformation?Theup datedinformationhastobedrawninthesp ecialmanner?Figure4?3showsthelayoutof JavaInteractiveVisualization To ol in action??????

while?Get_Runtime_Info????Update_Objects??;Draw_Updated_Info??;}?????This drawing co de which seems to b e reasonable will not work prop erly in the Java?ThefunctionDraw

UpdatedInfo??invokesAWTComp onent?sfunctionpaint?? 28
Figure 4?3?LayoutofJavaInteractiveVisualization Tool

29whichinturndrawsAWTComp onentsfromthetopelementtotheb ottominthehierarchy?Thepaint??iscalledasajobofAWTThreadnotasaseparatethreadfor drawing?This results in weird b ehavior?Instead of executingUpdate

Objects??andDraw

UpdatedInfo??functionsinturnasitiswrittenintheco deab ove?theUpdate Objects??function only will b e called as many as the lo op executes? then theDraw

UpdatedInfo??isinvokedrep eatedlylater?Inorderto?xthisproblem?onethread dedicated to painting ob jects hasto b e createdso that AWT thread whichisresp onsible for drawing AWT Comp onents can do its work without any disturbance??????

Threadanimator=newThread?this?;publicvoidstopPaint???animator=null;}publicvoidstartpaint???if?animator==null?animator=newThread?this?;animator?start??;}publicvoidrun?????publicvoidrun??isthewhile?Get_Runtime_Info??????functioninvokedwhenUpdate_Objects??;??thread?start??functionDraw_Updated_Info??;??iscalled}}?????In this case?another thread is createdsp ecially for drawing the up datedob jects?NowtheAWTthreadcandoitsworkandanimatorthreadcandoitsworkresp ec?tivelywithout causing anyproblems eachother?Java applet is another wayof writing java program wherethe javabyte?co decanbeexecutedthrough WWWbrowsers?Theapplets canusenetworkingfeaturesjustasanyJavaprogramcan?withtherestriction thatall communicationmustbewiththe host that delivered the applet to its currenthost?With Proxy and Java? wewereabletomaketheto olrunningontheNetscap e?AslongastheProxyisrunningontheWebservermachine?Javaappletscanworkcorrectly?Wehavetosp ecifythe

30co debaseoftheappletsothatnomatterwheretheHTMLpageisservedfrom?therightmachine handles the proxying and runs applets?The HTML keywordCODEBASEmakesurethat appletsare download fromthat co debasemachine ?4?2?3InterfaceDetails

When a Java program with a GUI needs to draw itself ? whether for the ?rst time?orinresp onsetob ecomingunhiddenorb ecauseitsapp earanceneedstochangetore?ect something happ ening inside the program ? it starts with the highest comp onent?thetopComp onentinthehierarchy?thatneedstoberedrawnandworksitswaydowntotheb ottom?mostComp onents?ThisisorchestratedbytheAWTdrawingsystem?Inthisway?eachComp onentdrawsitselfb eforeanyoftheComp onentsitcontains?Thisensuresthat aPanel?sbackground?for example? isvisible only whereitisn?tcoveredbyoneoftheComp onentsitcontains?TheAWTComp onentsofInteractiveVisualization To ol is shownin Figure 4?4?The interface of Interactive Visualization To ol is comp osed of several levels in itsComp onenthierarchy?TheparentofeachlevelisaContainer?whichinheritsfromComp onent??Many Comp onents can inserted into a Container by appropriate LayoutManager?Di?erentlayoutmanagerisavailable accordingtodi?erentneeds?Atthetop of the hierarchy is the window?Frame instance? that displays the program?Whentheprogramrunsasanapplication?theFrameiscreatedintheprogram?smain??metho d?UndertheFrameisaConverterob ject?whichinheritsfromAppletandthusisaContainer?sp eci?cally?aPanel??Dep endingonwhatviewertheappletisdisplayed in? one or more Containers mightbe between the Converter ob ject and theFrameatthetopoftheComp onenthierarchy?Figure4?5showsthehierarchyofinterfaceelementsintheInteractiveVisualization Tool?

31
Figure 4?4?AWTComp onentsof InteractiveVisualization Tool Interface

PANEL PANEL

SCROLLBAR

TEXTAREA

BUTTON

CANVASFRAME

?????WINDOW

GridLayout

GridBagLayout GridLayout

LABEL Figure 4?5?AWTComp onentsHierarchyof InteractiveVisualization Tool Interface

324?3Distributed MDP

The?rstversionofMDPwhichisasingle?user?andtwo?tierapplicationisre?engineeredtomulti?user?distributed?andthree?tierapplication?TheDMDP?Dis?tributedPlanMonitoringapplication?utilizestheECArulesinareal?lifesituation?distributed environment? with a Global Event Detector ?13? ?GED? and OQL usageinconditionsandactions?TheGEDhandleseventrequirementsofdi?erentcom?ponentapplicationsforsupp ortingdistributedmonitoring?TheGEDwhichusesconsumer?pro ducerparadigm forreceivingandsendingeventssupp ortsb othglobalcomp osite and lo cally comp osite global events?More issues on GED are discussed byH?Liao ?13??TheDMDP usesseveral indep endentdatabases usedbyits comp onentapplications?Planbase?Unit?Force?andWeather?Intelligenceapplication??Ineachcomp onent application? OQL is used for conditions and actions and the Java user in?terface is decoupled from those applications?The architecture of DMDP is the exactthree?tier mo del whereeachlevelisseparatedclear?Figure 4?6 showsthefunctionalmo dules of DMDP and the three?tier architecture constitutes separate three entities?TheDMDPiscomp osed of thefollowing mo dules?Weather?Intelligence:isdynamicandup datesweatherandintelligencedata?Thisapplicationisresp onsibleforenemyandweatherinformation?Ifeither it receivesa bad weather message or a enemymovement message? it willsendthis information to theotherapplication whichneedsit?Unit?force:storesandtracksUnitandForcemovementsandtheirstatus?ThisapplicationkeepstheinformationonthecurrentstatusofUnitsandForces?Ifitreceivestheinformationofthesigni?cantdegredationofacer?tainUnitandtheunitb elongstoacertainforce?itsendsthisinformationtothePlanApplication?

33

WEATHER &

INTELLIGENCE

APPLICATIONUNIT &

FORCE

APPLICATIONPLAN

BASE

APPLICATIONREPORT

DISPATCHER

M1 M2 M3 RPG

GED PROXY

EXODUSREGION MONITORING DESKS REPORT GENERATOR

2nd TIER

APPLICATION

DATA ACCESS

3rd TIERINTERFACE

1st TIER

Figure 4?6?Functional Mo dulesof DMDP?

34Planbase:holdsplansegmentsalongwithregionsandparticipatingforces?Thisapplicationmaintainsthewholeplans?Ifanyplansegmentisa?ectedduetoeitherabadweathermessageorthedegredationofacertainunit?itwill warn the commander by displaying the a?ected plan segment in the prop erwindow?MonitoringDesks:allow desiredp ortion of theworldto b emonitored?RPG: simulates a rep ort generator that can send rep orts to up date databases?Thisapplicationisresp onsiblefordispatchingincomingrep ortstotheprop erapplication by raising its lo cal events which are in turn subscrib ed by the otherapplications through Global EventDetector?GED: handles eventrequirements of di?erent applications for supp orting dis?tributed monitoring?All of these applications communicates each other throughthisGlobal EventDectector?VisualDataServer?Proxy?:mediatesbetweenMonitoringDesksandApplications?In this application there are two kinds of critical situations that may create alertswhentheyo ccur:non?weather relatedThe navy consists of various units ?termed asunit objects??p ositionedatvariouslo cationsforp erformingsometask?Eachunithasareadinessstatusindicatingwhethertheyareinap ositiontop erformcertainop erations?Readiness can b e de?ned based on p ersonnel? training? supplies etc?andismaintainedintermsofratings?e?g??1signifyingCombatReadyand5signifyingOverhaul??Areadinessratingof2orbelowisdesiredforanyunit?Asa crisis arises aplanhasto b e preparedto deal with it?Asetof unitshave

35tobeassignedtocarryouteachplan?Oncethisisdoneanychangetoeithertheplan or aunit?s readinessstatushasto b emonitored continuously?weatherrelatedTherearea?xednumberofgeographicregionsinwhichtheweather will b e monitored?The weather is describ ed by wind sp eed? wave heightandthe date on whichthisweatheris valid?Whensevereweathercondition isrep ortedforacertainregion?thefollowing actionwill b etaken:identifyunitsin thea?ectedregion andwarncommanders ofthesevereweather?It is clear that the active capabilityof Sentinel can b e usedto achieveautomaticmonitoring oftheab ovesituations?4?3?1Implementation Issues

As for the Visualization? there was no problem in running the Visualization to ol ontheWWWasanapplet?ThearchitectureoftheVisualization isaclientstructure?Itmakesarequest?rstandgetsappropriatedatafromtheSentinelapplications?ThecurrentJavaDevelopmentKit1?1?2isforprogramming?client?sideapplets?Applets are sub ject to fairly strict security restrictions limiting? among other things?whattheycancommunicate with?SinceDMDP?sJavainterfaceisa ?server?whereithastolistentoincomingmessagesfromthecomp onentapplications?wehadtocombinetheRPG?Rep ortGenerator?andMD?MonitoringDesk?tomakeitasclientforaweb?basedapplication?Inanapplet?tobeabletogetdatafromtheapplications? it has to b e the one that initiates the session ?make a request to server?and in that request session applet interface can get the data?That is the main reasonwhyRPGwhichinitiates requestsand MDwhichreceivesdatahasto b ecombined?Figure4?7showsarchitecturechangeafterthemigrationtoWWW?Thediagram?A? is the original architecture and ?B? is the architecture after the WWW migration?Inthediagram?B??userinterfacecanfreezewhilethecommunicationdelayoc?curs?Thisisb ecauseonlyonethreadwhichistheAWTthreadisdoingallthe

36

2. REPLYONE SESSION

CLIENT (APPLET)

1. REQUEST (RPG)

(DATA)1. REQUEST (RPG) RPG

3. REPLAY #2

2. REPLY #1

SESSION #1

SESSION #2

(B) MD

SERVER (VISUAL DATA SERVER)

(A)

RPG + MDPROXY

PROXY

SERVER

INCOMING MESSAGECLIENT

VISUAL DATA SERVER

Figure 4?7?Original Application vs?Web?basedApplicationjobs?TheAWTmain threadistakingcareofb othinterfaceeventsandalsoreceiv?ing?computing data from the Proxy?The freezing problem can o ccur while the AWTthread is waiting for the data?Whereas the original design ?diagram A? do esn?t haveanyproblemwhereanotherthreadiscreatedanddedicatedtoreceiving?computingdata?Thus AWT can concentrate on its own job whichistotake care of user events?GettingtheImageob jectcorresp ondingtoanimagehastobetakencareofdi?erentintheweb?basearchitecture?diagramB??AslongastheimagedataisinGIF or JPEG format and its ?lename? it?s easy to get an Image ob ject for it:just useone of the Applet or To olkitgetImage??metho ds?ThegetImage??metho ds returnimmediately? without checkingwhetherthe image data exists?Theactual loading ofimage datanormally do esn?tstartuntil the?rsttime theprogram triestodrawtheimage?Inaweb?basedarchitecture?wehavetouseURLinsteadof?lename?TheTo olkit classsuppliestwogetImage??metho ds:

37??

??InDiagram?B?:URLisusedforopeninggraphics??publicabstractImagegetImage?URLurl?OnlyappletscanusetheAppletgetImage??metho ds?Moreover?theAppletgetImage??metho ds don?t work until the applet has a full context ?AppletContext??For this reason? these metho ds do not work if called in a constructor or in a statementthat declares an instance variable?You should instead callgetImage??from a metho dsuchasinit???WecangetaTo olkitob jecteitherbyinvokingTo olkit?sgetDefaultToolkit??classmetho dorbyinvokingtheComp onentgetToolkit??instancemetho d?TheComp onentgetToolkit??metho d returns the to olkit that was used ?or will b e used?toimplementtheComp onent?Toolkittoolkit=Toolkit?getDefaultToolki t??;Imageimage1?image2;??Openinglocalfiles???Usedinthediagram?A??image1=toolkit?getImage?``image? gif? ??;??UsingURLforopeningfilesintheWWW???Usedinthediagram?B??image2=toolkit?getImage?newURL?``http:??www???edu? ~sha n?im age ?gif ???? ;These are examples of using the ToolkitgetImage??metho ds?Every Java appli?cationandappletcanusethesemetho ds?withappletssub jecttotheusualsecurityrestrictions?

4?3?2InterfaceDetails

The user interface of DMDP interacts with two?tier?s applications asynchronously?TheMonitoringDesks?MD?areimplemented withJavatohaveaservercapability

38to supp ort asynchronous distributed event monitoring?Figure 4?8 shows the layout ofthe Monitoring Desks?Each MD has information ab out its own resp onsible region tob e monitored?While the Visual Data Server just mediates information b etween MDsandApplications?eachMDcan?lteroutthoseinformation?Bycreatingaserverthreadintheinterface?eachMDscanlistentotheVisualData Servercontinuouslyforanyincoming messages?Following istheJServerclasswhichlistenfornewcon?nections? once a connection is made? spawn o? to another pro cess ?JServerConnectionclass?to handlerequests???

??JServerClass??

publicclassJServerextendsThread?ints_port;??ServerportnumberServerSockets_socket;??Serversocket????publicJServer?intport??s_port=port;try?s_socket=newServerSocket?port?;}catch?IOExceptionerr??System?err?println??Error :Cr eati ngServerSocket:??err?;System?exit?1?;}}publicvoidrun???try?while?true?

svr=newJServerConnection?s_sock et?a cce pt?? ?this?;}catch?IOExceptionerr??System?err?println??Error :Wa itin gforconnection:??err?;System?exit?1?;}}}JServerConnection class is a thread pro cess spawned from JServer pro cess ?parent?and the actual thread pro cess which handles the requests?This is the same example as

39

Figure 4?8?Layoutof Monitoring Desk

40the painting problem mentioned in the previous section?In order to prevent freezingtheuserinterface?dedicatedthreadhastobecreatedtoserviceasp ecialpurp osepro cess?While the DMDP interface is getting user?s input continuously? indep endentthread can b e working separately?Since JServer class is not a?liated with any otherclasses?itcanbeusedinanyotherclassestoaccomplishitspurp ose?Inthemainmo dule of the interface? JMdp class? it is created to pro cessincoming messages fromtheapplications asb elow?????

staticfinalintMONITOR_PORT_NUMBER=7779;JServermyserver;MdpMaincanvascanvas;publicJMdp???myserver=newJServer?MONITOR_PORT_NUMB ER?????}

In to day?s multi?platform world? traditional application architecture is giving wayto new approaches?Generally? client?server can b e implemented in a n?tier structurewhereapplication logic is partitioned?This leads to faster networkcommunications?greaterreliability?andgreateroverallp erformance?Increasingly?p eopleneedtobeabletomovetraditionaltwo?tierclient?serverapplicationstothree?tiermo delthatprovidesmo dular reusableservicesonanetwork?The newarchitecture provides a solution to the problems of the current architec?ture?Thethree?tierclient?servermo del makesitsimplertomanagetheapplicationb ecauseitseparatestheuserinterface?thebusinesslogicandthedataaccess?Thisallowsustogain highp erformance?maintaining dataonarobust?veryreliable sys?tem?Sincechangesarelimitedtowel l?de?nedcomponents?italsogivesusawayofmanagingtheapplicationco desandunderstandthemeasilysothatitresidesonaparticulardepartmentalorgrouptier?makingco deup datesandredirectionofdataeasier?Userinterfacecanberunoncross?platformwithJavaandstandardnet?work proto cols and this general architecture allows theapplications running with andwithoutWeb?5?2FutureWork

5?2?1Multi?Tier Architecture

The three?tier architecture separatesthe user interface co de from the applicationlogic?butfailstoseparatetheapplicationlogicfromthedataaccessco de?Ifweswapoutourfavoriterelationaldatabaseforanewob jectorienteddatabase?what41

42happ ens?Weprobablyfacemassiverewritesoftheapplication?andafuture?lledwith supp orting two separate versions of our application?The three?tier architecturemakesitdi?culttochangethebackenddatastoragemechanismwithoutseriouslydisruptingtheapplicationlogic?The4?tierapproachisthesolutionandclearlyseparatestheapplication logic from thedataaccesslogic?5?2?2Distributed Ob jectArchitecture

Formaximum?exibilityandscalability?anob ject?orientedapproach?usingauniformcommunicationmechanismbetweenob jectsgenerallycouldworkb est?Anapplicationbuiltusingthisapproachcouldactuallybefullyimplementedb eforeadecision is made as to where the co de should reside? and the co de can b e distributedasneededfor eachinstallation of theapplication?

APPENDIX:SAMPLESTATIC?DYNAMICFILEThesample static ?le ?Demo

stock?static?would contain following information:EVENTNULLL_PRIMITIVEe_IBM?intsell_stock?intqty??endEVENTNULLL_PRIMITIVEe_DEC?intbuy_stock?intqty??endEVENTNULLL_COMPOSITEe_instance?e_IBMSEQe_DEC?RULER_instanceNULLcond1test_action8RECENTe_instanceEVENTSTOCKL_PRIMITIVESTOCK_e2?intsell_stock?intqty??endEVENTSTOCKL_PRIMITIVESTOCK_e3?intbuy_stock?intqty??endEVENTSTOCKL_PRIMITIVESTOCK_e4?intget_price???endEVENTSTOCKL_COMPOSITESTOCK_e_plus?STOCK_e4PLUS5sec?EVENTSTOCKL_COMPOSITESTOCK_e_OR?STOCK_e4ORSTOCK_e3?EVENTSTOCKL_COMPOSITESTOCK_e_AND?STOCK_e4ANDSTOCK_e3?EVENTSTOCKL_COMPOSITESTOCK_e_NOT?NOT?STOCK_e4?STOCK_e3?STOCK_e4??EVENTSTOCKL_COMPOSITESTOCK_e_A?A?STOCK_e3?STOCK_e4?STOCK_e2??EVENTSTOCKL_COMPOSITESTOCK_e_Astar?A*?STOCK_e3?STOCK_e4?STOCK_e3??EVENTSTOCKL_COMPOSITESTOCK_e_P?P?STOCK_e3?5sec?STOCK_e4??EVENTSTOCKL_COMPOSITESTOCK_e_Pstar?P*?STOCK_e3?5sec?STOCK_e4??EVENTSTOCKL_COMPOSITESTOCK_e_COMP1??STOCK_e2ANDSTOCK_e3?PLUS10sec?EVENTSTOCKL_COMPOSITESTOCK_e_COMP2??P??STOCK_e4SEQSTOCK_e3?ANDSTOCK_e2?5sec?STOCK_e2??EVENTSTOCKL_COMPOSITESTOCK_e_COMP??P*?NOT????STOCK_e3?PLUS5sec?ANDSTOCK_e4?SEQ?STOCK_e2?STOCK_e4?STOCK_e2??5sec?STOCK_e4??RULER1STOCKcond1test_action3RECENTSTOCK_e_plusRULER2STOCKcond1test_action4RECENTSTOCK_e_ANDRULER3STOCKcond1test_action5RECENTSTOCK_e_ORRULER4STOCKcond1test_action6RECENTSTOCK_e_SEQRULER5STOCKcond1test_action7RECENTSTOCK_e_NOTRULER7STOCKcond1test_action9RECENTSTOCK_e_ARULER8STOCKcond1test_action10RECENTSTOCK_e_AstarRULER9STOCKcond1test_action11RECENTSTOCK_e_PRULER10STOCKcond1test_action12RECENTSTOCK_e_PstarRULER11STOCKcond1test_action13RECENTSTOCK_e_TEMPORALRULER12STOCKcond1test_action16RECENTSTOCK_e_COMP43

44Thesampledynamic?le?Demo

REFERENCES?1?Sun Microsystems Inc? Op en Lo ok? Graphical User Interface? ApplicationStyleGuidelines?Mountain View?1989??2?R?McCo ol?L?Masinter?Intro ductiontoCommonGateway?Interfacehttp:??hoohoo?ncsa?uiuc? edu? cgi ?ove rvie w?ht ml?1994??3?T?Berners?Lee?H?F?Nielson?R?T?Fielding?TheHyp ertextTransferProto col?NationalCenterforSup erComputerApplications?SoftwareDevelopmentGroup?Chicago?1992??4?J?Ousterhout?AnIntro ductionToTclandTk?Chicago?Addison?Wesley?1994??5?M? Prahlad?A Dynamic Rule Editor for Sentinel:Design and Implemen?tation?Master?sthesis?Universityof Florida? Gainesville? 1997??6?S?George?Client?Server:Past?PresentandFuture?Client?ServerIn?ternetConference?Exposition?Chicago? June12?14? 1996??7?J? Gosling and H? McGilton?The Java Language Environment:A WhitePap er?SunMicrosystemsInc??Mountain View?1995??8?V?Krishnaprasad?EventDetectionforSupp ortingActiveCapabilityinanOODBMS:Semantics?Architecture?andImplementation?Master?sthesis?Universityof Florida? Gainesville? 1994??9?S?ChakravarthyandD?Mishra?Sno op:AnExpressiveEventSp eci?ca?tionLanguageforActiveDatabases?DataandKnow ledgeEngineering?14?10?:1?26? 1994??10?D?Mishra?SNOOP:AnEventSp eci?cationLanguageforActiveDatabases?Master?sthesis?Universityof Florida? Gainesville? 1991??11?O? Diaz? A? Jaime? N? Paton?DEAR: A Debugger for Active Rules in anOb ject?OrientedContext?ProceedingsoftheFirstInternationalWork?shoponRulesinDatabaseSystems?Edinburgh?Scotland?1993?pages180?193??12?A? Jahne? S? Urban?PEARD: A Prototyp e Environment for ActiveRuleDebugging?ProcessingsoftheJournalofIntel ligentInformationSys?tems?7?2?:5?23? 1996??13?H?Liao?GlobalEventsinSentinel:DesignandImplementationofaGlobal Event Detector?Master?s thesis? University of Florida? Gainesville?1997?45

BIOGRAPHICALSKETCHSang?WooHanwasb ornonFebruary21?1971?inSeoul?Korea?HereceivedtheBachelorofSciencedegreeincomputersciencefromtheUniversityofHawaiiatManoa?Honolulu?inAugust1995?HehasworkedasaresearchassistantattheCollab orative SoftwareDevelopmentLab oratory attheUniversityof Hawaii?IntheFall of?95?hestartedhisgraduatestudieswithama jorincomputerandinformationscienceandengineeringattheUniversityofFlorida?HehasworkedintheDatabaseSystemsResearchandDevelopmentCenterofUF?HewillreceivehisMasterofSciencedegreeincomputerandinformationscienceandengineeringfrom the University of Florida? Gainesville? in Decemb er 1997?His researchinterestsinclude client?serverarchitectures?networkprogramming? userinterface andob ject?orientlanguages?46

quotesdbs_dbs31.pdfusesText_37
[PDF] 2 types of certificate of origin

[PDF] 20 000 euros en lettre

[PDF] 20 000 most common english words

[PDF] 20 centimes d euros en lettre

[PDF] 20 dollar bill president

[PDF] 20 en lettre francaise

[PDF] 20 minutes timer

[PDF] 20 minutes timer bomb

[PDF] 20 types of business letters pdf

[PDF] 20 weeks pregnant in months

[PDF] 200 000 en lettre en anglais

[PDF] 200 301 ccna implementing and administering cisco solutions (ccna)

[PDF] 200 cents euros en lettre

[PDF] 200 cmd commands

[PDF] 200 irregular verbs list pdf