Marcus Perryman Microsoft

Slides:



Advertisements
Similar presentations
Service Oriented Architecture for Mobile Applications Swarupsingh Baran University of North Carolina Charlotte.
Advertisements

Module 3: Microsoft Mobility Solutions. Overview Microsoft Office Mobile Using Windows Mobile 5.0 with Exchange Server 2003 Using Windows Mobile 5.0 with.
About DataViz, Inc. In business 25 years 13+ years experience in the mobile industry Specializing in Office compatibility for non-Microsoft platforms.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
.Net Compact Framework. Microsoft.Net is often referred as Plateform for web services But.net vision is more than web services – It talks about how people.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Internet Information Server (IIS)
Chapter 14 Database Connectivity and Web Technologies
What’s new for Rich Clients? Martin Parry Developer & Platform Group Microsoft Ltd
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Query Processing in Mobile Databases
MBL290: Building Mobile Applications with Microsoft® SQL Server™ CE and the Microsoft.NET Compact Framework Kevin Collins Microsoft Senior Program Manager.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Winter Consolidated Server Deployment Guide for Hosted Messaging and Collaboration version 3.5 Philippe Maurent Principal Consultant Microsoft.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Punit Shah Technical Lead | Microsoft
Mobile CRM and beyond Martin Booth Partner Technical Specialist.
Windows Mobile 5.0 Features & Functionality! Wim Verhaeghen - Erwin van Hunen -
Building Offline/Cache Mode Web Apps Using Sync Framework Mike Clark Group Manager Cloud Data Services Team
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
XML Web Services in Visual Studio.NET Peter Ty Developer Evangelist.NET and Developer Group.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
AGENDA 1.Introduction 2.Course Policy 3.What is SQL 2000 Server? 4.Client-Server Architecture and Communications 5.SQL 2000 Versions 6.SQL 2000 Server.
DAT413: SQL Server ™ CE: Building Mobile Applications with SQL Server CE and Smart Device Extensions Kevin Collins Senior Program Manager Microsoft Corporation.
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Four Configuring Outlook and Outlook Web Access.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
Developing Reporting Solutions with SQL Server
By: Bill Stevenson Jose Plancarte Erik Magsino. Overview Messaging and collaboration server Send and Receive electronic mail and other forms of interactive.
Fundamentals of Database Chapter 7 Database Technologies.
1 Introduction to Microsoft Windows 2000 Windows 2000 Overview Windows 2000 Architecture Overview Windows 2000 Directory Services Overview Logging On to.
Azure Services Platform Update James Conard Sr. Director Developer & Platform Evangelism Microsoft Corporation.
Windows Forms in Visual Studio 2005 Mike Pelton Systems Engineer Microsoft Ltd
Why data services? Common challenges when creating rich web applications Creating rich web applications with data services Future scenarios & roadmap.
Enabling Enterprise Applications Marcus Perryman Microsoft
NA-MIC National Alliance for Medical Image Computing UCSD: Engineering Core 2 Portal and Grid Infrastructure.
Windows Role-Based Access Control Longhorn Update
MBL401.Net Compact Framework: Data Access Best Practices Paul Foster Mobile solutions architect.
Extending the Enterprise using.NET CF and SQL CE Marcus Perryman Principal Consultant Microsoft.
Building High Performance, Robust Server Applications with Internet Information Server 5.0 Van Van IIS - Program Manager Microsoft Corporation.
ASP.NET (Active Server Page) SNU OOPSLA Lab. October 2005.
Mobile Applications and SQL Server Mobile v3.0 (Laguna) Kevin Collins Senior Program Manager Microsoft Corporation.
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
The Mobile Architect Morgan Skinner. Agenda Common Patterns and Designs Common Patterns and Designs Architecting Mobile Applications Architecting Mobile.
Features Of SQL Server 2000: 1. Internet Integration: SQL Server 2000 works with other products to form a stable and secure data store for internet and.
SVR201 SQL Server 2005 Mobile Edition: The Evolution Of SQL Server CE Scott Smith Program Manager Visual Studio for Devices Microsoft Corporation.
IPS Infrastructure Technological Overview of Work Done.
Gowtham Prasad K N Partner Technical Consultant | Microsoft Corporation |
Introduction to SQL Server 2000 Reporting Services Jeff Dumas Technical Specialist Microsoft Corporation
Exploring Networked Data and Data Stores Lesson 3.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
The Holmes Platform and Applications
Introducing the Microsoft® .NET Framework
Intra-Farm Shared Services
Integrating Enterprise Applications Into SharePoint® Portal Server
MIX 09 6/5/2018 9:14 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Enterprise Library Overview
The Client/Server Database Environment
The Application Lifecycle
Chapter 10 ADO.
Visual Studio + SQL Server Is Better
SharePoint 2007 Developer Overview Collaboration BI Features
Mark Quirk Head of Technology Developer & Platform Group
Getting Data Where and When You Want it with SQL Server 2005
Presentation transcript:

Marcus Perryman Microsoft The Mobile Architect Marcus Perryman Microsoft

Agenda Common Patterns and Designs Architecting Mobile Applications Synchronization Web Services SQL CE MSMQ Performance Deployment

Common Patterns and Designs Document tested simple mechanisms Provide common terminology for architects and developers Promote Re-use Flexibility Cohesion Patterns and practices Documents best practices for whatever – MVC, Visitor pattern etc GOF

Defining SOA Service-Oriented Architecture is an approach to organizing information technology in which data, logic, and infrastructure resources are accessed by routing messages between network interfaces Basic value proposition is to provide consistent, stable interfaces in front of diverse or volatile implementations Establish context for information exchange across organizations Encapsulate complexity within organizations Enable context-sensitive information processing Organising data and logic Message based not object based SOA is static whilst backend can change Based on sending messages between components – chunky not chatty

Microsoft’s Vision for SOA Service orientation will encapsulate and componentize processes and systems Help manage complexity Permit controlled change Support continuous improvement Business capabilities and business processes will be modeled as services Organizations will expose touchpoints into these processes to both internal and extra-organizational actors Allows automation of processes that have defied automation until now On the path to the Agile Enterprise

Three Tier Pattern Presentation Layer Business Layer Data Access Layer Order Entry Web Pages Reporting Web Pages Business Layer Order Management Reporting Management User Management Data Access Layer ADO.NET Order Data Access Reporting Data Access

Service Orientated Architecture Security Presentation Layer Order Entry Web Pages Reporting Web Pages Business Layer Service Interfaces Order Management Reporting Management User Management Can extend a traditional 3 tier app so that other front ends could be added to the application Data Access Layer ADO.NET Order Data Access Reporting Data Access Services

Mobile Architectures Need to address Communication From device to server or device Security Are communications secure? Is data secured? Performance Deployment All of the above can impact physical and logical Designs

Server Applications Supports large number of devices ASP.NET Mobile Web Pages HTML for Pocket IE WML for WAP Browsers Supports large number of devices Low cost deployment Centralized logic Online only Browser user interface Will see some demonstrations of this later in the day

Client Applications Targets a Smartclient Deployment required Server Web Services MSMQ HTTP Channel Targets a Smartclient Deployment required Can work disconnected Rich user interface Outlook is a good example of a smart client application

Online / Offline Smartclient applications need to support online / offline Synchronization Options One / Both ways Application / Database level Need to ensure that an application still responds when the network is unavailable

Synchronization Consider your applications requirements Both Ways Multi-user updates of data Web Services SQL CE Replication One Way Mutually exclusive data MSMQ SQL CE Remote Data Access SMS Can intercept SMS messages using a COM component to tell the device something has happened – such as a webservice being moved to another URL

Synchronization Application Application Sync Data Sync User Interface Application Logic Data Access Layer Business Layer Web Services UI Application Sync Data Sync SQL Server CE Two types of sync – app sync or low level data sync Application Sync Data Sync High reuse of logic Slower synchronization Fast synchronization Low level of logic Data collisions

Web Services Synchronous Asynchronous Security Good for small, quick packets of data Block the current thread Asynchronous Good for larger packets of data Callback when processing finished Check for exceptions due to connectivity issues Security Recommended to use SSL Digest or Clear Text authentication Currently no support for WSE Custom via SOAP headers Product group are looking at the future roadmap of WSE, currently there is a user sample on GotDotNet that shows how to do some WSE stuff (WS:Security)

Web Services Considerations Store and Forward Web service requests cached Executed when network available Variable re-try algorithm Data Compression GSM data costs Conserve bandwidth

Smart connected architecture SmartClient Application WebRequestCompleted Custom WS Proxy Asynchronous Timed Event Network Test Order Service Store and Forward The proxy is running on the client and can be used to ensure that webservice calls are potentially stored & forwarded etc Store Map Service Web Service

Data Compression Server side Client side Windows 2003 Server Enable compression and gzip.dll via MMC Modify metabase adding asmx to HcScriptFileExtensions for gzip and deflate compression filters Client side Need to override GetWebRequest and GetWebResponse .NET Compact Framework SP1 Client applications need some additional coding to be able to exploit. Data compression on the server side requires WS 2003 Link that documents these changes later in the presentation On client override methods – only works in .NET CF V1 SP1 Extra code on the client to call GZip.Deflate – no inbuilt support, thrid party free library (on the CD)

Client Data Compression public class GzipProxy : SoapHttpClientProtocol { protected override WebRequest GetWebRequest(System.Uri uri) WebRequest req = base.GetWebRequest(uri); req.Headers.Add("Accept-Encoding", "gzip, deflate"); return req; } protected override WebResponse GetWebResponse(WebRequest req) return new CompressedHttpWebResponse(req); On the way out we say that we can accept compressed results On the way back in, we need to unzip it using the CompressedHttpWebResponse class (again available on the CD)

SQL Server CE 2.0 Runs on Pocket PC 2000+ Smartphone version coming 1.5MB memory footprint Compact Framework Support Authentication and Encryption Connectivity Remote Data Access - SQL7/2000 Merge Synchronization – SQL2000 Can call SQLCE from eVB, CF and natively Single user

Database Feature Set Rich functionality for small footprint Multi-column indexes Referential integrity Sub-selects (IN) Defaults Inner/outer joins One file database Null support Unicode support Transactions Data-types Real, Numeric, NVarChar, NText, Image, Integer, DateTime, VarBinary, UniqueIdentifier, Money Having/group by Seek on index Set functions Identity attribute Local security - DB encryption (128bit) and database password No stored procedures

CE Data Access Storage Architecture Enterprise Backend Oracle / db2 / etc .NET CF / Managed Stack XML/BizTalk/CS 2002 VS .NET (VB.NET, C#) Native/Unmanaged Stack eVB 3.0 eVC 3.0 ADO.NET Ethernet SQL Server CE Data Provider SQL Server Client Data Provider TDS ADO CE v3.1 Well Connected CLR / .NET CF OLEDB CE OLEDB / Replication API 802.11b, CDPD, GSM, CDMA, TDMA, etc. SQL CE Edition v2.0 Data Provider Backend stuff can talk to SQL Server. PPC can use TDS directly to go to SQL 2000. Need to have a good network connection for this, and this uses the SQL Server client data provider SQL CE provider talks to SQL CE (local) database Can also replicate data over HTTP – need to add in some stuff on the server to enable this. Server Agent sits inside IIS and talks up to SQL Server Client Agent: Replication and RDA IIS Server Agent: Replication and Remote Data Access OLEDB QP/Cursor Engine/ES OLEDB HTTP Storage Engine / Repl Tracking Occasionally Connected CLIENT SERVER

Remote Data Access (RDA) Very simple read/write access to data in remote SQL Server 7 or later Cached remote data Rows are pulled down to the client Rows can be tracked and later pushed back to server, or Non-tracked, local only Connection flexibility Continuous connection Intermittent connections Submit SQL to server Pull down a set of rows, update and push back up again Can copy an entire table down to work with Tracked changes means that RDA keeps a track of what has changed, so that later on just changes can be sent back to the server when synchronising. Local only means you would lose this information

Remote Data Access (RDA) Applications can use RDA via three methods: Pull: Client submits SQL query, creating a new table of qualifying rows. Changes made to table can be tracked or non-tracked Push: With tracked changes, Push method sends modified rows back to server and applies them SubmitSQL: Client submits any valid SQL Server SQL statement which is forwarded to SQL Server for execution

RDA Code // Initialize the RDA object. SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess(); rda.InternetUrl = "http://marcpe02/sqlce/sscesa20.dll"; rda.LocalConnectionString = @"Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\pubsce.sdf"; rda.Pull( "Sales", "Select * from Sales", rdaOleDbConnectString, RdaTrackOption.TrackingOnWithIndexes, "ErrorTable");

Merge Replication Based on SQL Server 2000 bi-directional implementation Ideal for mobile use Update data on client and/or server Merge and resolve conflict based on server-side rules Easy synchronization when connected Flexible data partitioning: vertical, horizontal, and dynamic Anonymous pull subscriptions Auto Ranged Identity Support Vertical = Select Columns Horizontal = Select Rows Dynamic = Based on filter criteria, such as the current connected user using SUSER_SNAME()

Replication code SqlCeReplication rep = new SqlCeReplication();; // Set the Replication object. rep.InternetUrl = "http://marcpe02/sqlce/sscesa20.dll"; rep.InternetLogin = ""; rep.InternetPassword = ""; rep.Publisher = “marcpe02"; rep.PublisherDatabase = "northwind"; rep.PublisherLogin = "pubs"; rep.PublisherPassword = "pubs"; rep.Publication = "northwindpublisher"; rep.SubscriberConnectionString = LocalDB; rep.Subscriber = "HP2210"; // Add a new subscripton and create the local database file rep.AddSubscription(AddOption.CreateDatabase); // Transfer the initial snapshot of data if this is the first // time is this called. Subsequent calls will transfer only the // changes to the data rep.Synchronize();

DataSet vs SQL CE DataSet SQL CE Inbuilt to Compact Framework Need to deploy Extra runtime RAM requirement Limited filter capability Rich ANSI SQL support Serializable to XML Persists on filesystem Supports Web services Remote data access and synchronization over HTTP Works with .NET Runtime Requires SQL Server Performance limited to smaller data Large databases up to 2GB No inbuilt security 128-bit Encryption support Client Access Licensing

Microsoft Message Queue

MSMQ Implements asynchronous communications Provides guaranteed delivery, efficient routing, priority based messaging. Usernames storage support roaming NIC tracking Transparent, salvageable storage Small footprint ~150KB Support for private queues only NIC Tracking – Tracks whether the network is up or down Messages can be stored locally and then forwarded – could put on an SD card

Communication Options Transport Summary Web Services Internet Ready Industry standards / High level of interoperability Highly extensible Application synchronization SQL CE Designed for data manipulation Synchronization Enabled Can communicate to SQL Server Secure (Smartphone support coming) MSMQ Guaranteed delivery Extension of backend MSMQ systems Network tracking built in (Managed support coming)

Other Considerations Performance Security & Deployment Raw Application Perceived Response Backend Servers Security & Deployment See Securing and Deploying your Mobile Application Security session is on the CD

Performance - WinForms Load and cache Forms in the background Populate data separate from Form.Show() Pre-populate data, or Load data async to Form.Show() Parent controls top-down e.g. Form  panels  controls Keep event handling code tight Process bigger operations asynchronously Blocking in event handlers will affect UI responsiveness Rather than doing o.Controls.Add ( child ) , call child.Parent = parent

Performance - XML Use XmlTextReader and XmlTextWriter Smaller memory footprint than using XmlDocument XmlTextReader is a pull model parser which only reads a “window” of the data Design XML schema first, then code Understand the structure of your XML document Use elements to group Allows use of Skip() in XmlTextReader Use attributes to reduce size

Performance - Data If data is local…instead of DataSet… Leverage SQL CE native in-proc database Query data using DataReader Use TableDirect command type for fast index searches Equivalent to “SELECT * FROM foo” Limit open SqlCeCommand/DataReaders Dispose when complete If data is remote… Use SQL CE replication When using Web Services Save data locally in SQL CE for faster access and storage Don’t save remote DataSets as XML to device If you do, save Schema as well

Performance - Server Aggregate multiple Web service calls where possible Stress test the server, find your limits Implement stateless calls for web farms For large user base, partition times users can replicate SQL data Replication from CE can kill the server so you may want to partition times where users can sync up

Deployment Considerations Installation CAB format for installation Desktop ActiveSync Web page URL Email Service Indication / Service Loading Messages SD/CF Card What is user base? Ongoing How to ensure users are running latest versions? Operators can send out Service Indication / Service Loading messages, to for instance tell you that you need to update code App Updater Block?. Could SMS a user to say that there is a new version available.

Summary Store and Forward connectivity can help connected/disconnected environment Web Services Standardised Extensible SQL CE Designed for data manipulation Secure MSMQ Extension of backend MSMQ systems Guaranteed delivery Design with performance in mind

Resources Patterns & Practices .NET Compact Framework FAQ http://www.microsoft.com/resources/practices/ .NET Compact Framework FAQ http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.aspx SharpZipLib Compression Library (note licensing) http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx IIS 6.0 HTTP Compression http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/maintain/operate/iis6perf.asp SQL CE and SQL 2000 sp3a http://www.microsoft.com/sql/ce/downloads/sp3.asp MSMQ http://msdn.microsoft.com/msdnmag/issues/01/12/MSMQCE/default.aspx

© 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.