Your SlideShare is downloading. ×
0
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Taking it all offline with SQL Anywhere
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Taking it all offline with SQL Anywhere

3,176

Published on

"This talk will examine how SQL Anywhere can help take your current PHP application offline by locally hosting, managing, serving, and synchronizing your PHP application and data with your current …

"This talk will examine how SQL Anywhere can help take your current PHP application offline by locally hosting, managing, serving, and synchronizing your PHP application and data with your current database.
"

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,176
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
79
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Taking it all Offline with SQL Anywhere Eric Farrar, Product Manager Sybase iAnywhere September 17, 2008
  • 2. Simple MySQL and PHP Blog
  • 3. The Offline Problem
  • 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

×