data persistence in a web hosted world
Download
Skip this Video
Download Presentation
Data Persistence In A Web Hosted World

Loading in 2 Seconds...

play fullscreen
1 / 33

data persistence in - PowerPoint PPT Presentation


  • 259 Views
  • Uploaded on

Data Persistence In A Web Hosted World. Jeff Ammons. The Atlanta Journal-Constitution Developer/DBA GGMUG.com President Gwinnett, Georgia, Microsoft User Group 2 nd Thursday, 6:30 PM Gwinnett Tech Blog: http://ammonsonline.com/jeffablog. Agenda. Define Hosted Environment

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'data persistence in ' - Gideon


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
jeff ammons
Jeff Ammons
  • The Atlanta Journal-Constitution
    • Developer/DBA
  • GGMUG.com
    • President
    • Gwinnett, Georgia, Microsoft User Group
    • 2nd Thursday, 6:30 PM Gwinnett Tech
  • Blog: http://ammonsonline.com/jeffablog
agenda
Agenda
  • Define Hosted Environment
  • Explore Data Persistence Options
  • DBA Tasks With Hosted SQL Server
  • Data Access With LINQ and Entity Framework
what is hosted environment
What Is Hosted Environment?
  • Web
  • Shared Server
  • Managed By Hosting Company
what s included
What’s Included?
  • Web Server
  • File Storage
  • Database
  • Bandwidth
  • Email
examples
Examples
  • GoDaddy
  • Hostgator
  • DiscountASP.net
  • Bizhostnet.com
who is this environment for
Who Is This Environment For?
  • Start-ups
  • Non-profit organizations
  • Personal use
why choose a hosted env
Why Choose A Hosted Env?
  • Lost cost ($5-$20/month)
  • Quick Start
  • Fewer People Required
  • No hardware to buy
  • No hardware to maintain
  • No server room
challenges
Challenges
  • Server Access
  • Server Options
  • Server Load
  • Dude, Where’s My Data?
  • Dude, Who Can See My Data?
microsoft vs foss the foss advantage
Microsoft vs FOSS:The FOSS Advantage
  • Lots of FOSS based sites (LAMP)
  • Lots of FOSS sample code
  • Zero start-up cost
  • MS stack seen as ugly and corporate-looking
microsoft vs foss the empire strikes back
Microsoft vs FOSS:The Empire Strikes Back
  • Asp.Net MVC
  • JQuery supported OFFICIALLY
  • Visual Studio Express Edition
  • BizSpark
  • WebsiteSpark
  • You CAN achieve zero start-up cost
  • You CAN make good looking sites
asp net options
Asp.Net Options

SharePoint

WebForms

MVC

ASP.NET

data persistence options
Data Persistence Options
  • MySQL
  • SQL Server
  • File Based
    • XML
    • JSON
why not mysql
Why Not MySQL?
  • .Net naturally works better with SQL Server
    • LINQ To SQL works ONLY with SQL Server
    • Entity Framework support for MySQL is dodgy
  • This is NOT MySQL Saturday…
sql server
SQL Server
  • $15/month = Unlimited 200 MB DBs
  • Good basic set of functionality
  • Choice of access methods
    • LINQ To SQL
    • Entity Framework
    • ADO
    • Etc.
what s missing
What’s Missing?

Missing In Action

Alternative

  • Agent
  • SSIS
  • SSRS
  • SSAS
  • Wish You Had Agent
  • Stored Procs
  • ASP App Perhaps With Silverlight, why not?
  • None
types of access
Types Of Access
  • Direct Access
    • SQL Server Management Studio
    • Expose YOUR database directly to the Internet
  • Web Admin
    • Primitive tools
    • CYDB
typical dba tasks
Typical DBA Tasks
  • Set Up
    • Schemas
    • Tables
    • Indexes
    • Views
    • Stored Procedures
  • Backups/Restores
  • Imports/Exports
developer dba
Developer/DBA
  • Developers vs DBAs
  • Objects vs Relational Data
    • ORM
what is linq
What Is LINQ?
  • Language INtegrated Query
  • SQL-like language construct for .Net
    • Joins
      • Tables
      • Objects
      • Both
    • Aggregation
    • Selection
example linq query
Example LINQ Query

var orderedModuleList = from module in itemList.getList()

orderby module.Name

select module;

linq to lots of stuff
LINQ To Lots Of Stuff
  • LINQ To Entities
  • LINQ To SQL
  • LINQ To Objects
  • LINQ To XML
file system options
File System Options
  • POCO (Built-in .Net Serialization)
  • XML
why why why
Why? Why? Why?
  • Not ALL apps need relational databases
    • Burn the heretic!!!
  • SMALL datasets
  • Lots of Readers/Few Publishers
    • Blog
    • Informational site
    • Personal site
  • Excessive DB Traffic
example
Example
  • Custom ASP.Net Membership Provider
  • Basic log-on info
  • Works great with 10-30,000 users
  • Total DOG with 500,000 users
  • No calls to DB server
  • Most start-ups would KILL to get 10,000 users
goals for your project
Goals For Your Project
  • Website itself
  • Web app others can use
strategy 1 sql server
Strategy 1: SQL Server
  • Your hosting plan gives you all the DBs you need
  • Latency of calling DB server is acceptable
  • Don’t kill yourself by calling DB too much
    • Cache, Cache, Cache
strategy 2 file system now sql server later
Strategy 2: File System Now, SQL Server Later
  • Repository Pattern
  • LINQ lets you query object collections
  • Switch to SQL Server if you grow
  • Not as big a deal as it once was
    • SQL Server now pretty cheap
helpful links
Helpful Links
  • MSDN: Dynamic Management Views and Functions
    • http://msdn.microsoft.com/en-us/library/ms188754.aspx
  • SQLServerCentral
    • http://www.sqlservercentral.com/
  • SQLBlog
    • http://sqlblog.com/
helpful queries
Helpful Queries
  • SELECT SERVERPROPERTY(\'productversion\'), SERVERPROPERTY (\'productlevel\'), SERVERPROPERTY (\'edition\')
  • select top 100 *from sys.dm_tran_locks
  • select login_name, count(1)from sys.dm_exec_sessionsgroup by login_nameorder by count(1) desc
  • SELECT creation_time ,cursor_id ,name ,c.session_id ,login_name FROM sys.dm_exec_cursors(0) AS c JOIN sys.dm_exec_sessions AS s ON c.session_id = s.session_id WHERE DATEDIFF(mi, c.creation_time, GETDATE()) > 5;
ad