SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Taking it all Offline with SQL Anywhere
Eric Farrar, Product Manager
Sybase iAnywhere
September 17, 2008
Simple MySQL and PHP Blog
The Offline Problem
The Offline Problem


   Why not user Gears?
     App must be written in JavaScript
     No PHP code reuse
     Lack of encryption, security, strict referential integrity, etc
     How do you sync?
   What do we need to host an offline version of the application?
     Web Server
     Database
     PHP installation
     Synchronization
Enter SQL Anywhere


  SQL Anywhere is an enterprise caliber, full-featured, SQL
  relational database
  Sybase SQL Anywhere ≠ Sybase ASE
  Over 15 years old, over 10 million deployed seats
  Roots in the embedded and mobile space
  Supports
    triggers, stored procedures (SQL, PHP, Perl, Java, .NET),
    materialized views, full text search, full referential integrity, FIPS
    approved encryption, 

    10 megabyte footprint
    1 user     1000s of users
    1 Megabytes       100s of Gigabytes
SQL Anywhere and PHP


  Newly re-written module for PHP
  API based off of the mysql API
    sasql_<FUNCTION NAME>()
  Supports:
    Prepared statements
    Stored procedures with INOUT parameters
    Multiple-result sets
What We Need


   Built-in HTTP server
     HTTP
     SOAP
   It is a database
   External Environments:
     PHP
     Perl
     .NET
     Java
     C (external libraries)
What We Need Cont.


  Built-in synchronization
    MySQL
    Oracle
    MS SQL Server
    IBM DB2
    SQL Anywhere
    Sybase ASE
Stand-Alone Application




                          Apache
                                   MySQL
                          + PHP




                           PHP
                           Files
MobiLink and Synchronization


   MobiLink acts as a ‘sync server’
   Makes a regular database connection to consolidated
   database
   Handles all synchronization traffic
   Set up in farms to scale out (> 100,000 syncing remotes)
   Write sync scripts to handle business logic of sync
     SQL (native dialect of consolidated database)
     .NET
     Java
   Conflicts detected at column or row level
Adding MobiLink




                  MobiLink Server
Client Sync (dbmlsync)


   Uploads all changes to database since last sync
   All synchronization happens in a SINGLE transaction
     Any failures will cause a full rollback
   Sends both current value, and original synced value of rows
   Can be run on demanded, or scheduled
Sync!!




         Client Sync Server   MobiLink Server
Syncing Files


                                              Offline
                                               PHP
                                              Files




       Client Sync Server   MobiLink Server
Storing Files in the Database


                                                  Offline
                                                   PHP
                                                  Files




       Client Sync Server       MobiLink Server
Conflicts


   What if two people change the same blog post?
     Posts are stored a single row in the database
     Need to ‘merge’ the rows
   Solution:
     Use diff3 utility as our custom business logic
     diff3 requires:
        Original
        My changed copy
        Their changed copy
SQL Anywhere as a Server


  While this example has used SQL Anywhere as the remote,
  SQL Anywhere can also be used as the server
Where to get more information


   SQL Anywhere Web Forum
     http://groups.google.com/group/sql-anywhere-web-development/
   My Blog – “Peering Behind the Browser”
     http://iablog.sybase.com/efarrar
   SQL Anywhere PHP Module page
     http://www.sybase.com/detail?id=1019698

Weitere Àhnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

SAP HANA SPS1- SAP HANA Hardware Platforms
SAP HANA SPS1- SAP HANA Hardware PlatformsSAP HANA SPS1- SAP HANA Hardware Platforms
SAP HANA SPS1- SAP HANA Hardware Platforms
 
What's new on SAP HANA Smart Data Access
What's new on SAP HANA Smart Data AccessWhat's new on SAP HANA Smart Data Access
What's new on SAP HANA Smart Data Access
 
What's New in SAP HANA SPS 11 Backup and Recovery (Operations)
What's New in SAP HANA SPS 11 Backup and Recovery (Operations)What's New in SAP HANA SPS 11 Backup and Recovery (Operations)
What's New in SAP HANA SPS 11 Backup and Recovery (Operations)
 
What's new on SAP HANA Workload Management
What's new on SAP HANA Workload ManagementWhat's new on SAP HANA Workload Management
What's new on SAP HANA Workload Management
 
What's New for SAP HANA Smart Data Integration & Smart Data Quality
What's New for SAP HANA Smart Data Integration & Smart Data QualityWhat's New for SAP HANA Smart Data Integration & Smart Data Quality
What's New for SAP HANA Smart Data Integration & Smart Data Quality
 
SAP HANA SPS09 - Smart Data Streaming
SAP HANA SPS09 - Smart Data StreamingSAP HANA SPS09 - Smart Data Streaming
SAP HANA SPS09 - Smart Data Streaming
 
SAP HANA SPS09 - Security
SAP HANA SPS09 - SecuritySAP HANA SPS09 - Security
SAP HANA SPS09 - Security
 
SAP HANA SPS10- Multitenant Database Containers
SAP HANA SPS10- Multitenant Database ContainersSAP HANA SPS10- Multitenant Database Containers
SAP HANA SPS10- Multitenant Database Containers
 
SAP HANA SPS09- Administration Monitoring
SAP HANA SPS09- Administration MonitoringSAP HANA SPS09- Administration Monitoring
SAP HANA SPS09- Administration Monitoring
 
SAP HANA SPS09 - XS Programming Model
SAP HANA SPS09 - XS Programming ModelSAP HANA SPS09 - XS Programming Model
SAP HANA SPS09 - XS Programming Model
 
What's New in SAP HANA SPS 11 Application Lifecycle Management
What's New in SAP HANA SPS 11 Application Lifecycle ManagementWhat's New in SAP HANA SPS 11 Application Lifecycle Management
What's New in SAP HANA SPS 11 Application Lifecycle Management
 
SAP HANA SPS10- Series Data/ TimeSeries
SAP HANA SPS10- Series Data/ TimeSeriesSAP HANA SPS10- Series Data/ TimeSeries
SAP HANA SPS10- Series Data/ TimeSeries
 
SAP HANA SPS10- SAP DB Control Center
SAP HANA SPS10- SAP DB Control CenterSAP HANA SPS10- SAP DB Control Center
SAP HANA SPS10- SAP DB Control Center
 
What's New in SAP HANA SPS 11 Operations
What's New in SAP HANA SPS 11 OperationsWhat's New in SAP HANA SPS 11 Operations
What's New in SAP HANA SPS 11 Operations
 
SAP HANA SPS10- SQLScript
SAP HANA SPS10- SQLScriptSAP HANA SPS10- SQLScript
SAP HANA SPS10- SQLScript
 
What's New in SPS11 Overview
What's New in SPS11 OverviewWhat's New in SPS11 Overview
What's New in SPS11 Overview
 
What's New in SAP HANA SPS 11 Platform Lifecycle Management (Operations)
What's New in SAP HANA SPS 11 Platform Lifecycle Management (Operations)What's New in SAP HANA SPS 11 Platform Lifecycle Management (Operations)
What's New in SAP HANA SPS 11 Platform Lifecycle Management (Operations)
 
What's new in SAP HANA SPS 11 Security
What's new in SAP HANA SPS 11 SecurityWhat's new in SAP HANA SPS 11 Security
What's new in SAP HANA SPS 11 Security
 
SAP HANA SPS09 - SAP HANA Scalability
SAP HANA SPS09 - SAP HANA ScalabilitySAP HANA SPS09 - SAP HANA Scalability
SAP HANA SPS09 - SAP HANA Scalability
 
Spark Usage in Enterprise Business Operations
Spark Usage in Enterprise Business OperationsSpark Usage in Enterprise Business Operations
Spark Usage in Enterprise Business Operations
 

Ähnlich wie Taking it all offline with SQL Anywhere

Scalable Web Architectures and Infrastructure
Scalable Web Architectures and InfrastructureScalable Web Architectures and Infrastructure
Scalable Web Architectures and Infrastructure
george.james
 
Php apache vs iis By Hafedh Yahmadi
Php apache vs iis  By Hafedh YahmadiPhp apache vs iis  By Hafedh Yahmadi
Php apache vs iis By Hafedh Yahmadi
TechdaysTunisia
 
Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02
kishore2526
 
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechConSharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SPTechCon
 
Anvita Gita Supersite Case Study Nov2000
Anvita   Gita Supersite Case Study Nov2000Anvita   Gita Supersite Case Study Nov2000
Anvita Gita Supersite Case Study Nov2000
guest6e7a1b1
 

Ähnlich wie Taking it all offline with SQL Anywhere (20)

Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
A Microsoft primer for PHP devs
A Microsoft primer for PHP devsA Microsoft primer for PHP devs
A Microsoft primer for PHP devs
 
Scalable Web Architectures and Infrastructure
Scalable Web Architectures and InfrastructureScalable Web Architectures and Infrastructure
Scalable Web Architectures and Infrastructure
 
Web Hosting
Web HostingWeb Hosting
Web Hosting
 
Web programming
Web programmingWeb programming
Web programming
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for Enterprises
 
Php apache vs iis By Hafedh Yahmadi
Php apache vs iis  By Hafedh YahmadiPhp apache vs iis  By Hafedh Yahmadi
Php apache vs iis By Hafedh Yahmadi
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02Websphereinterview 100725022705-phpapp02
Websphereinterview 100725022705-phpapp02
 
Dot Net Nuke Presentation
Dot Net Nuke PresentationDot Net Nuke Presentation
Dot Net Nuke Presentation
 
devops_
devops_devops_
devops_
 
Siebel Resume Arquitecture
Siebel Resume ArquitectureSiebel Resume Arquitecture
Siebel Resume Arquitecture
 
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechConSharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
SharePoint Data Anywhere and Everywhere by Chris Beckett - SPTechCon
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone js
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Wordpress on Windows
Wordpress on WindowsWordpress on Windows
Wordpress on Windows
 
Single Page Apps
Single Page AppsSingle Page Apps
Single Page Apps
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Anvita Gita Supersite Case Study Nov2000
Anvita   Gita Supersite Case Study Nov2000Anvita   Gita Supersite Case Study Nov2000
Anvita Gita Supersite Case Study Nov2000
 

Mehr von ZendCon

Mehr von ZendCon (20)

Framework Shootout
Framework ShootoutFramework Shootout
Framework Shootout
 
Zend_Tool: Practical use and Extending
Zend_Tool: Practical use and ExtendingZend_Tool: Practical use and Extending
Zend_Tool: Practical use and Extending
 
PHP on IBM i Tutorial
PHP on IBM i TutorialPHP on IBM i Tutorial
PHP on IBM i Tutorial
 
PHP on Windows - What's New
PHP on Windows - What's NewPHP on Windows - What's New
PHP on Windows - What's New
 
PHP and Platform Independance in the Cloud
PHP and Platform Independance in the CloudPHP and Platform Independance in the Cloud
PHP and Platform Independance in the Cloud
 
I18n with PHP 5.3
I18n with PHP 5.3I18n with PHP 5.3
I18n with PHP 5.3
 
Cloud Computing: The Hard Problems Never Go Away
Cloud Computing: The Hard Problems Never Go AwayCloud Computing: The Hard Problems Never Go Away
Cloud Computing: The Hard Problems Never Go Away
 
Planning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local DatabasesPlanning for Synchronization with Browser-Local Databases
Planning for Synchronization with Browser-Local Databases
 
Magento - a Zend Framework Application
Magento - a Zend Framework ApplicationMagento - a Zend Framework Application
Magento - a Zend Framework Application
 
Enterprise-Class PHP Security
Enterprise-Class PHP SecurityEnterprise-Class PHP Security
Enterprise-Class PHP Security
 
PHP and IBM i - Database Alternatives
PHP and IBM i - Database AlternativesPHP and IBM i - Database Alternatives
PHP and IBM i - Database Alternatives
 
Zend Core on IBM i - Security Considerations
Zend Core on IBM i - Security ConsiderationsZend Core on IBM i - Security Considerations
Zend Core on IBM i - Security Considerations
 
Application Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server TracingApplication Diagnosis with Zend Server Tracing
Application Diagnosis with Zend Server Tracing
 
Insights from the Experts: How PHP Leaders Are Transforming High-Impact PHP A...
Insights from the Experts: How PHP Leaders Are Transforming High-Impact PHP A...Insights from the Experts: How PHP Leaders Are Transforming High-Impact PHP A...
Insights from the Experts: How PHP Leaders Are Transforming High-Impact PHP A...
 
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and ScalabilitySolving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
 
Joe Staner Zend Con 2008
Joe Staner Zend Con 2008Joe Staner Zend Con 2008
Joe Staner Zend Con 2008
 
Tiery Eyed
Tiery EyedTiery Eyed
Tiery Eyed
 
Make your PHP Application Software-as-a-Service (SaaS) Ready with the Paralle...
Make your PHP Application Software-as-a-Service (SaaS) Ready with the Paralle...Make your PHP Application Software-as-a-Service (SaaS) Ready with the Paralle...
Make your PHP Application Software-as-a-Service (SaaS) Ready with the Paralle...
 
DB2 Storage Engine for MySQL and Open Source Applications Session
DB2 Storage Engine for MySQL and Open Source Applications SessionDB2 Storage Engine for MySQL and Open Source Applications Session
DB2 Storage Engine for MySQL and Open Source Applications Session
 
Digital Identity
Digital IdentityDigital Identity
Digital Identity
 

KĂŒrzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

KĂŒrzlich hochgeladen (20)

Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Taking it all offline with SQL Anywhere

  • 1. Taking it all Offline with SQL Anywhere Eric Farrar, Product Manager Sybase iAnywhere September 17, 2008
  • 4. The Offline Problem Why not user Gears? App must be written in JavaScript No PHP code reuse Lack of encryption, security, strict referential integrity, etc How do you sync? What do we need to host an offline version of the application? Web Server Database PHP installation Synchronization
  • 5. Enter SQL Anywhere SQL Anywhere is an enterprise caliber, full-featured, SQL relational database Sybase SQL Anywhere ≠ Sybase ASE Over 15 years old, over 10 million deployed seats Roots in the embedded and mobile space Supports triggers, stored procedures (SQL, PHP, Perl, Java, .NET), materialized views, full text search, full referential integrity, FIPS approved encryption, 
 10 megabyte footprint 1 user 1000s of users 1 Megabytes 100s of Gigabytes
  • 6. SQL Anywhere and PHP Newly re-written module for PHP API based off of the mysql API sasql_<FUNCTION NAME>() Supports: Prepared statements Stored procedures with INOUT parameters Multiple-result sets
  • 7. What We Need Built-in HTTP server HTTP SOAP It is a database External Environments: PHP Perl .NET Java C (external libraries)
  • 8. What We Need Cont. Built-in synchronization MySQL Oracle MS SQL Server IBM DB2 SQL Anywhere Sybase ASE
  • 9. Stand-Alone Application Apache MySQL + PHP PHP Files
  • 10. MobiLink and Synchronization MobiLink acts as a ‘sync server’ Makes a regular database connection to consolidated database Handles all synchronization traffic Set up in farms to scale out (> 100,000 syncing remotes) Write sync scripts to handle business logic of sync SQL (native dialect of consolidated database) .NET Java Conflicts detected at column or row level
  • 11. Adding MobiLink MobiLink Server
  • 12. Client Sync (dbmlsync) Uploads all changes to database since last sync All synchronization happens in a SINGLE transaction Any failures will cause a full rollback Sends both current value, and original synced value of rows Can be run on demanded, or scheduled
  • 13. Sync!! Client Sync Server MobiLink Server
  • 14. Syncing Files Offline PHP Files Client Sync Server MobiLink Server
  • 15. Storing Files in the Database Offline PHP Files Client Sync Server MobiLink Server
  • 16. Conflicts What if two people change the same blog post? Posts are stored a single row in the database Need to ‘merge’ the rows Solution: Use diff3 utility as our custom business logic diff3 requires: Original My changed copy Their changed copy
  • 17. SQL Anywhere as a Server While this example has used SQL Anywhere as the remote, SQL Anywhere can also be used as the server
  • 18. Where to get more information SQL Anywhere Web Forum http://groups.google.com/group/sql-anywhere-web-development/ My Blog – “Peering Behind the Browser” http://iablog.sybase.com/efarrar SQL Anywhere PHP Module page http://www.sybase.com/detail?id=1019698