SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Similar a 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
 

Similar a 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
 

Más de ZendCon

Más de 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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

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