LitwareHR v2: an S+S reference application 1/16/2019 LitwareHR v2: an S+S reference application Gianpaolo Carraro gianpc@microsoft.com http://blogs.msdn.com/gianpaolo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
“S+S World” Build
Why LitwareHR? Architecture Guidance (whitepapers) Bits (code) for a common application scenario Meant to be: Reference for ISVs wanting to move to S+S Reference for Hoster to host an S+S solution Reference for Enterprise to consume an S+S solution
S+S Architecture: Build Application Architecture Designing a “back end as a service” Multi-tenancy vs. Isolation Customization: Metadata - Templatized Service Layer design Scale & Performance Self Service / Try before you buy Designing the “right” front end Disconnected experience Smart Client tenant customization Office as UI Taking advantage of “Cloud Services” Silverlight Streaming (Future) additional cloud infrastructure SilverLight Streaming LitwareHR
LitwareHR Overview Rich Client Secure Web Client Web Client Network http://www.codeplex.com/litwarehr Rich Client Offline Support Rich Visualization Batch Entry Office Integration Secure Web Client Private admin site Authentication Authorization Web Client Public Web site Apply for jobs Network HR Application (job site) Single instance multi-tenant
LitwareHR Demo
High Level Architecture Private Website Functional Services Web Client Multi-Tenant Data Access Internet Public Website Metadata Services SQL Server Smart Client WCF WF ASP.NET REST/ SOAP APIs
Database Extensibility Patterns Extension Table Xml Columns Fixed Columns
Multi-Tenant DB Performance Testing SQL Server 2005: HP Proliant DL 380 1 Dual Core Proc (1.8 Ghz) 4 GB Memory 3 spindles SCSI 10000 RPM
Extension Table Shared table with schema common to all tenants Shared extension table that contains one row for each field unique to a tenant
Extension Table – View (one join per table) Shared fields A view is created for each tenant Custom fields
Test Retrieve a random page of records from a random tenant view SELECT *, ROW_NUMBER() OVER (ORDER BY Id) as RowNumber FROM entity_tenant(x) WHERE RowNumber >= (#y) and RowNumber <= (#z) Notes: (#y) and (#z) are random values based on the number of records Page Size = (#z) - (#y) Randomization
How Does it Scale? 9 Extension Fields
How Does it Scale? Tx/sec, CPU use and memory (with side effect of I/O activity) Memory pressure & I/O Activity No relevant I/O Activity 25 concurrent users
“Theory behind this” MSDN Article: http://msdn2.microsoft.com/en-us/library/aa479086.aspx
Metadata Driven Architecture Application Configuration and Designer Tools User Interface Workflow and Rules Entity Model “Polymorphic” Runtime Meta Data Service Tenant Profile and Configuration Data
UI and Workflow configuration UI config CSS upload too permissive? What is safe to replace? Workflow config Runtime behavioral checking Model validation Workflow too restrictive?
Templatized Configuration Policies Security, Fairness and Halting Policies Design Time Metadata Designer Policy Enforcement Engine Runtime Policy Enforcement Engine Runtime Standard Customers Runtime Metadata Runtime Metadata Trusted Partners Application Instance Premium Customers Runtime Metadata Templatized Designers
Software + Services Blueprints Architecture Assumptions Overview Configuring Data Access Adding Optional Projects
Entity Definition Blueprint Software + Services Blueprints Entity Definition Blueprint Work done so far Extract data model code & scripts from LitwareHR Unit Tests for data model base code Entity Wizard User Experience