learning how to build distributed, scalable applications ... · architecting, designing,...
TRANSCRIPT
Learning How To Build Learning How To Build Distributed, Scalable Distributed, Scalable Applications With Applications With COM+COM+
COM+ Team COM+ Team Microsoft CorporationMicrosoft Corporation
AgendaAgendaGoalsGoalsScenario recap and requirements Scenario recap and requirements (continued)(continued)Using COM+ to meet application Using COM+ to meet application requirements (continued) requirements (continued) Even easier Even easier -- coming soon (part 2)coming soon (part 2)ConclusionConclusion
GoalsGoalsShow by example that COM+ makes it:Show by example that COM+ makes it:
As easy to develop Server Components As easy to develop Server Components as it is to develop Client Componentsas it is to develop Client ComponentsAs easy to deliver enterprise apps as it As easy to deliver enterprise apps as it is to deliver workgroup apps! is to deliver workgroup apps!
COM+COM+COM+ Services:COM+ Services:EventsEventsSecuritySecurityLoad Load
BalancingBalancingQueued Queued ComponentsComponents
In Memory In Memory DatabaseDatabase
CompensatingCompensatingResourceResourceManagerManager
AdministrationAdministration
MTSMTS
MTS Services:MTS Services:TransactionsTransactionsResource PoolingResource PoolingSecuritySecurityAdministrationAdministration
COMCOMTheThe ModelModelTools SupportTools SupportMultiMulti--LanguageLanguageDiscovery (QI)Discovery (QI)
COM+The Caring, Sharing
Environment for yourcomponents
COM+COM+The Caring, SharingThe Caring, Sharing
Environment forEnvironment for youryourcomponentscomponents
Technology ScenarioTechnology Scenario
Application ScenarioApplication ScenarioOnline service like MSN or AOLOnline service like MSN or AOLUser login causes two databases User login causes two databases to be updatedto be updated
Customer Billing LogCustomer Billing LogCustomer login statusCustomer login status
Total connect time is trackedTotal connect time is trackedUser is notified of various activities User is notified of various activities while they are logged in while they are logged in (i.e., chat rooms)(i.e., chat rooms)
Web Web clientsclients Web Web infrastructureinfrastructureLogonLogon
BusinessBusiness applicationsapplications
LogoffLogoff
SecuritySecuritybillingbilling
RealReal--timetimeProfileProfile--directeddirected
informationinformation
ContentContent
BillingBilling
ExistingExistingBilling Billing SystemSystem
ExistingExistingBilling Billing SystemSystemExistingExistingBilling Billing SystemSystemCustomerCustomer
onlineonlinesystemsystem
ExistingExistingBilling Billing SystemSystemExistingExistingBilling Billing SystemSystemExistingExistingbilling billing systemsystem
ExistingExistingBilling Billing SystemSystemExistingExistingBilling Billing SystemSystemExistingExistingBilling Billing SystemSystemExistingExistingbilling billing systemsystem ExistingExisting
Billing Billing SystemSystemExistingExistingBilling Billing SystemSystem
OtherOthersystemssystems
Application FlowApplication Flow
Tackling The Application Tackling The Application Requirements Requirements -- Part 2Part 2
Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate Logonlegitimate LogonNo freebies! Always No freebies! Always bill for entire time bill for entire time onlineonlineUse existing Use existing billing systembilling systemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online and Customer Online and other systems other systems consistentconsistentRealReal--time two way time two way info on who is oninfo on who is onRealReal--time info on what time info on what is going onis going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
Contradictory Requirements!Contradictory Requirements!Always accept logon:Always accept logon:
Implies that we have to complete the Implies that we have to complete the customer login even if the billing customer login even if the billing system is unavailablesystem is unavailable
Always bill for entire time online:Always bill for entire time online:Implies that we must not accept logons Implies that we must not accept logons when billing system is not availablewhen billing system is not available
ClientClientApplicationApplicationComponentComponent
ServerServerApplicationApplicationComponentComponentIFooIFoo
ToleranceToleranceIssues:Issues:
AvailabilityAvailabilityResilienceResilienceFailure HandlingFailure Handling
Bus_CustomerBus_Customer
ServerServerApplicationApplicationComponentComponentIFooIFoo
MSMQMSMQ
ClientClientApplicationApplicationComponentComponent
IRecorderIRecorder
RecorderRecorder PlayerPlayerServerServer
ApplicationApplicationComponentComponentIFooIFoo
ToleranceToleranceCOM+ solution: Queued ComponentsCOM+ solution: Queued Components
Features:Features: delivery of delivery of creationcreation, method , method invocationinvocation, and , and life cyclelife cycle management management over over MSMQ queuesMSMQ queues with with transactionstransactions
Queued Components Queued Components ExampleExample
Code and attribute walkthrough Code and attribute walkthrough Login example would not allow a Login example would not allow a person to logon if the billing database person to logon if the billing database was not availablewas not availableIt is not necessary for the billing DB It is not necessary for the billing DB to be available right now as long as we to be available right now as long as we are guaranteed that the login are guaranteed that the login information will be recordedinformation will be recorded
Ref: AS10Ref: AS10
Tackling The Application Tackling The Application Requirements Requirements -- Part 2Part 2
Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate logonlegitimate logonNo freebies! Always No freebies! Always bill for entire bill for entire time onlinetime onlineUse existing Use existing billing systembilling systemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online and Customer Online and other systems other systems consistentconsistentRealReal--time two way info time two way info on who is onon who is onRealReal--time info on what time info on what is going onis going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
Responding To EnvironmentResponding To EnvironmentIssuesIssues
BusCustomerXBusCustomerX
BusCustomerCBusCustomerC
Bus_Billing23Bus_Billing23
Bus_BillingBus_Billing
Bus_CustomerBus_Customer BusCustomerABusCustomerA
You Never Told Me That!You Never Told Me That!Changing EnvironmentChanging EnvironmentObject Model? What Object Model?Object Model? What Object Model?
MulticastMulticastICustLoginICustLogin
Sink2Sink2
ICustLoginICustLoginSink3Sink3
ICustLoginICustLoginSink4Sink4
UnboundUnboundUnboundUnbound
Application ClientApplication Client
UnicastUnicastICustLoginICustLogin
Sink1Sink1
IEventXXXIEventXXX
EventEventClassClass
EventEventDatabaseDatabase
EventEventAdminAdmin
Responding To EnvironmentResponding To EnvironmentSolution:Solution: COM+ EventsCOM+ Events
Features:Features: sources consume event sinks, sources consume event sinks, system provided system provided event classevent class, managed , managed bindingbinding and and deliverydelivery optionsoptions
Events ExampleEvents ExampleEvents WalkthroughEvents Walkthrough
When the user logs in the customer status When the user logs in the customer status database is updateddatabase is updatedIn order to notify the user on things that they are In order to notify the user on things that they are interested you can publish the interesting events interested you can publish the interesting events and have clients and have clients
Poll the status database on a regular basis and Poll the status database on a regular basis and then push information to them; this is not very then push information to them; this is not very efficient doing a lot of unnecessary work; efficient doing a lot of unnecessary work; or you canor you can……Build specific interfaces, protocols, and Build specific interfaces, protocols, and infrastructure for notificationinfrastructure for notification
Code walkthroughCode walkthroughRef: AS07Ref: AS07
Tackling The Application Tackling The Application Requirements Requirements -- Part 2Part 2
Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate logonlegitimate logonNo freebies! Always No freebies! Always bill for entire bill for entire time onlinetime onlineUse existing Use existing billing systembilling systemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online and Customer Online and other systems other systems consistentconsistentRealReal--time two way time two way info on who is oninfo on who is onRealReal--time info on what time info on what is going onis going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
ApplicationApplicationClientsClients
Server Server
Server 1Server 1IBankIBank
Server 1Server 1IBankIBank
coclass Bank coclass Bank [[LBLB=Yes,]=Yes,]IIBankIIBank
Even More Scalability Even More Scalability And AvailabilityAnd Availability
Issues:Issues:WeWe’’ll never go above 600 clients! Honest!ll never go above 600 clients! Honest!Of course my application scalesOf course my application scales
What hardware are you running?What hardware are you running?
ApplicationApplicationClientClient
CreateCreateLBLB
ActivatorActivatorTrackTrack
Response TimeResponse TimeEngineEngine
LB ServiceLB Service
Response TimeResponse TimeRuntimeRuntime
Server GroupServer Group
Server 1Server 1IBankIBank
Server 1Server 1IBankIBank
coclass Bank coclass Bank [[LBLB=Yes,]=Yes,]IIBankIIBank
Select serverSelect server
Even More Scalability Even More Scalability And AvailabilityAnd Availability
Solution:Solution: COM+ Dynamic Load BalancingCOM+ Dynamic Load BalancingFeatures:Features: system provided system provided response timeresponse time load load balancing engine, @ balancing engine, @ activationactivation server server machine selection machine selection
Load Balancing ExampleLoad Balancing ExampleLoad Balancing WalkthroughLoad Balancing Walkthrough
As the online service increases in As the online service increases in popularity they will need to run the popularity they will need to run the application on multiple serversapplication on multiple serversLoad Balancing will distribute the work of Load Balancing will distribute the work of the application over the available serversthe application over the available serversIn COM+ Preview, balancing algorithm is In COM+ Preview, balancing algorithm is based on tracker statisticsbased on tracker statistics
LB set up and attribute walkthroughLB set up and attribute walkthroughRef: AS08Ref: AS08
Tackling The Application Tackling The Application Requirements Requirements -- Part 2Part 2
Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate logonlegitimate logonNo freebies! Always No freebies! Always bill for entire bill for entire time onlinetime onlineUse existing Use existing billing systembilling systemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online and Customer Online and other systems other systems consistentconsistentRealReal--time two way time two way info on who is oninfo on who is onRealReal--time info on what time info on what is going onis going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
Ultimate PerformanceUltimate PerformanceIssueIssue
DBMSDBMSClientsClients
Server GroupServer Group
Server 1Server 1IBankIBank
Server 1Server 1IBankIBank
coclass Bank coclass Bank [[LBLB=Yes,]=Yes,]IIBankIIBank
No matter how well I do everything the No matter how well I do everything the Database is still the bottleneck!Database is still the bottleneck!
ClientClient DBMSDBMSIMDBIMDBServerServer
Ultimate PerformanceUltimate PerformanceCOM+ Solution:COM+ Solution: IMDB provides IMDB provides memory speed access to data, memory speed access to data, transient state managementtransient state management
RDBMSRDBMS
Client Component ProcessClient Component Process
Client component Client component processprocess
IMDB CoreIMDB Core
A "typical"A "typical"IMDB NodeIMDB Node
IMDB ProxyIMDB Proxy
IMDB ProxyIMDB Proxy
R/W R/W R/WR/W
R/WR/W
Tables inTables inShared MemoryShared Memory
HTTPHTTP DCOMDCOM
R/OR/O
R/OR/O
RDBMSRDBMS
IMDB IMDB -- How It Works How It Works
IMDB ExampleIMDB ExampleIMDB WalkthroughIMDB WalkthroughSelecting data for use with IMDBSelecting data for use with IMDBIMDB code and IMDB code and administration walkthroughadministration walkthroughRef: AS11Ref: AS11
Tackling The Application Tackling The Application Requirements Requirements -- Part 2Part 2
Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate logonlegitimate logonNo freebies! Always No freebies! Always bill for entire time bill for entire time onlineonlineUse existing billing Use existing billing systemsystemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online and Customer Online and other systems other systems consistentconsistentRealReal--time two way time two way info on who is oninfo on who is onRealReal--time info on what time info on what is going onis going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
Ultimate ScalabilityUltimate ScalabilityIssue:Issue:
You are doing PoolingYou are doing Pooling
COM+ ServerCOM+ Server ProcessProcess
ApplicationApplicationClientClient
ApplicationApplicationServerServerApplicationApplication
ServerServerIFooIFoo
ObjectObjectinstancesinstances
Why canWhy can’’t I?t I?
COM+ ServerCOM+ Server ProcessProcess
ApplicationApplicationClientClient
PoolingPoolingServiceService
ApplicationApplicationServerServerApplicationApplication
ServerServerIFooIFoo
PooledPooledinstancesinstances
Ultimate ScalabilityUltimate ScalabilityCOM+ Solution:COM+ Solution:Object Pooling:Object Pooling: ultimate efficiency for ultimate efficiency for components whose components whose ““in Method timein Method time”” is is less than their less than their ““construction Timeconstruction Time””
COM+ ServerCOM+ Server ProcessProcess
ApplicationApplicationClientClient
PoolingPoolingServiceService
ApplicationApplicationServerServerApplicationApplication
ServerServerIFooIFoo
PooledPooledinstancesinstances
Ultimate ScalabilityUltimate ScalabilityObject Pooling WalkthroughObject Pooling WalkthroughRef: AS14Ref: AS14
Tackling The Application Tackling The Application Requirements Requirements -- Part 2Part 2
Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate logonlegitimate logonNo freebies! Always No freebies! Always bill for entire bill for entire time onlinetime onlineUse existing Use existing billing systembilling systemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online and Customer Online and other systemsother systemsconsistentconsistentRealReal--time two way time two way info on who is oninfo on who is onRealReal--time info on what time info on what is going onis going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
ApplicationApplicationComponentsComponents
CRMCRM DBMSDBMSLegacy AppLegacy App
Dealing With Legacy AppsDealing With Legacy AppsCOM+ Solution:COM+ Solution: compensating compensating Resource ManagerResource ManagerFeatures:Features: easy template for wrapping easy template for wrapping an application or a resource so that it an application or a resource so that it can participate in transactions with can participate in transactions with other resourcesother resources
How Are We Doing?How Are We Doing?Ultimate customer Ultimate customer response and response and availabilityavailabilityAlways accept Always accept legitimate logonlegitimate logonNo freebies! Always No freebies! Always bill for entire bill for entire time onlinetime onlineUse existing Use existing billing systembilling systemUse existing Use existing dev resourcesdev resourcesOtherOther……
Keep billing, Keep billing, Customer Online Customer Online and other systems and other systems consistentconsistentRealReal--time two way time two way info on who is oninfo on who is onRealReal--time info on time info on what is going onwhat is going onFlexible Flexible administrationadministrationMaximize use of Maximize use of platform, minimize platform, minimize development timedevelopment time
Even Easier! Even Easier! Coming soon to a language near you: Coming soon to a language near you: Attribute Based ProgrammingAttribute Based Programming
In Part 1 In Part 1 ““even easiereven easier”” we showed we showed integration of the IDE using Attributes integration of the IDE using Attributes and administrationand administrationThe logical next step is direct Attribute The logical next step is direct Attribute Based Programming (ABP)Based Programming (ABP)ABP demoABP demo
ConclusionConclusionCOM+ makes it:COM+ makes it:
As easy to develop Server Components As easy to develop Server Components as it is to develop Client Componentsas it is to develop Client ComponentsAs easy to deliver enterprise apps as it As easy to deliver enterprise apps as it is to deliver workgroup apps! is to deliver workgroup apps!
Call To ActionCall To ActionArchitecting, designing, developing:Architecting, designing, developing:
Assume COM+ level of service and use Assume COM+ level of service and use WindowsWindows NT 5.0 Beta 2 nowNT 5.0 Beta 2 now
Deploying and in production:Deploying and in production:Use MTS now Use MTS now -- your components will be your components will be uplifted when COM+ is installeduplifted when COM+ is installed
Everything discussed will be a standard Everything discussed will be a standard feature of Windows NTfeature of Windows NT®® 5.05.0
ResourcesResourceshttp://www.microsoft.com/comhttp://www.microsoft.com/comhttp://www.microsoft.com/msdnhttp://www.microsoft.com/msdnPDC CD:PDC CD:
COM+ SDKCOM+ SDKCOM+ Wizard previewCOM+ Wizard preview
HandsHands--on theatreon theatreAll the code from the COM+ sessionsAll the code from the COM+ sessionsSee Visual C++See Visual C++®® sessions for sessions for more on ABP!more on ABP!