Titel der Präsentation - Mayflower Blog - Mayflower.de

bawltherapistΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 9 μήνες)

257 εμφανίσεις

100,000 SQLiteinstallations–lessonslearned
International PHP Conference2005, 11/09/2005
Björn Schotte
©MAYFLOWER GmbH 2005
2
„100,000 SQLiteinstalls“
Björn Schotte -„PHP Pioneer“
❙1998/1999: PHP-Center.de
❙2000: world‘sfirstPHP Conference
❙2001: editor-in-chiefPHP Magazin
❙2001: International PHP Conference
❙2001: co-founderof ThinkPHP
❙2004: refoundingMayflower GmbH
©MAYFLOWER GmbH 2005
3
„100,000 SQLiteinstalls“
ThinkPHP–TheLAMP Experts
❙high-levelsoftwaredevelopmentsince2001
❙PHP trainingsformorethan300 peoplefromTop50
companies
❙PHP Support –http://www.thinkphp.de/support/
❙Enterprise PHP Support
❙Guaranteedreactiontimesup to 2 hours
❙Basic, Professional, Gold –24/7 availableon request
❙FosteringthePHP communityand PHP itselfin Germany
❙„ThinkPHPbyMayflower“–a divisionof Mayflower GmbH
©MAYFLOWER GmbH 2005
4
„100,000 SQLiteinstalls“
Mayflower GmbH
❙~ 35 employees
❙„ThinkPHP–byMayflower“
❙Customersinclude:
❙Siemens COM
❙VaillantGroup
❙TelefónicaGermany
❙Landeshauptstadt München
❙HypoVereinsbank
❙Sixt AG
❙Stadtwerke München
(SWM)
❙Bundeskriminalamt
❙…
❙4 managingpartners
(foundersof ThinkPHP)
❙2 offices(Munichand
Würzburg)
❙well-knownin thePHP
community
❙KnowhowismorethanPHP-
only(High Performance web
architecture, .NET, …)
❙Big projectsin therangeof
man-yearswithPHP (HVB,
Vaillant, Sixt, Telefónica)
❙OpenSourceSoftware vendor
(i.e. PHProjekt, Outlook Sync,
…)
©MAYFLOWER GmbH 2005
5
„100,000 SQLiteinstalls“
Thecustomer
❙VaillantGroup
❙a leadingeuropeanheatingdevicemanufacturer
❙about9,000 employees
❙revenues2004: 1,8 billion€
❙ten brands: Vaillant, SaunierDuval, Bulex, Glowworm,
Bongioanni, …
©MAYFLOWER GmbH 2005
6
„100,000 SQLiteinstalls“
Theproject: spare partsshop
❙Ifpartsof theboilerortheheatingsystembreakdown, the
installerneedsa spare part
❙Vaillantprovidesa web shopforbuyingthosespare parts
❙SearchableforEAN numbers, devicegroupsetc.
❙Theshopprovidesexplodedimagesof thedevicesforthe
installerto easilyrecognizethespare parthe issearching
©MAYFLOWER GmbH 2005
7
„100,000 SQLiteinstalls“
Spare parts: let‘slookat it
©MAYFLOWER GmbH 2005
8
„100,000 SQLiteinstalls“
Thesituationbefore
❙wedisplacedan alreadyexistingversion
❙thatwas:
❙ASP web application
❙accessdatabasefordeliveringtheshopon CD
❙Not veryflexible
❙explodedimageshadto be„hotpointed“(forHTML
image map) bya 3rd party
©MAYFLOWER GmbH 2005
9
„100,000 SQLiteinstalls“
Thenewsystem, Web
❙web shopbasedon PHP and MySQL
❙importerforSAP basedcatalogdata(CSV files)
❙OCR technology (usinggocr) to automagicallytryto
„hotpoint“explodedimageswhenuploadedvia WebDAV
❙a Flash-basededitorto editthehotpointsforeachimage
❙integratingmorethan30,000 spare partsdatafromSAP
❙basedon theChairman frameworkof Mayflower
❙DB abstractionlayer(PHPLIB)
❙easilyimplementeda SQLitedriver
©MAYFLOWER GmbH 2005
10
„100,000 SQLiteinstalls“
SQLite2: SELECTs
$db->query(„selecta.foo, b.barfromtblAa,
tblBb wherea.id=b.id“);
while($db->next_record()) {
print$db->f(„foo“); // error!
}
Error! Becausesqlite_fetch_array() deliversin thiscase
„a.foo“as thearraykey
Youhaveto stripout the„a.“to worktransparently.
©MAYFLOWER GmbH 2005
11
„100,000 SQLiteinstalls“
Thenewsystem, CD version
❙MySQL2SQLite converter
❙Microwebas thewebservercomponent
❙PHP as thescriptinglanguage: 1:1 copyof theweb shop
❙of coursewithouttheadmintools☺
❙MySQLwas no choicefortheCD version
❙licensecostwouldbetoohigh
©MAYFLOWER GmbH 2005
12
„100,000 SQLiteinstalls“
Thearchitectureof theWeb2CD process
❙Goal: to providethecustomerthepossibilityto createthe
countryCD versionsstandalone
❙formerly, a 3rd party hadto generateitat high cost
❙Solution: InstallAnywherepackageron theweb!
©MAYFLOWER GmbH 2005
13
„100,000 SQLiteinstalls“
Thearchitectureof theWeb2CD process
❙thecountryadminsof thespare partsshophavetheirown
interface
❙theycangeneratea packagedCD versionon thefly
❙Thegenerationshouldbeavailableovertheweb
independantlyof a 3rd party
©MAYFLOWER GmbH 2005
14
„100,000 SQLiteinstalls“
Thearchitectureof theWeb2CD process
❙in thebackgroundvia cron-/batchjob:
❙convertrelevant MySQLtablesto SQLite
❙packageall thescriptsand explodedimages(>1,000
images)
❙runInstallAnywhereon Linuxcommandline(XML
configurationfile) to packagea .EXE file
❙mailto countryadminthathis CD isready!
❙Vaillantreducesthetime to packagea CD versionfrom
aboutseveralmonthsto severaldays!
©MAYFLOWER GmbH 2005
15
„100,000 SQLiteinstalls“
UsingSQLitein thisproject, I
❙SQLitehas no licensingcost, MySQLlicensingcostwere
toohigh
❙itwas availablenotonlyforPHP5, butalso forPHP4
❙theproblemdomainisa classicalone-user-application
❙wedon‘tneedconcurrencyas in a normal web
application
❙itmainlyisa read-onlyapplication(cartdatawill be
savedin a clientcookieforlaterusage)
❙BUT: it‘sprettyfast, evenfromCD!
❙currently, there‘sSQLite3, butwestayusingSQLite2
©MAYFLOWER GmbH 2005
16
„100,000 SQLiteinstalls“
UsingSQLitein thisproject, II
❙youcan‘tportyourexistingtablestructure1:1 to SQLite2
❙consultthehomepageof SQLite,
http://www.sqlite.org/
❙weendedup in writinga convertertoolthatconvertsthe
tablestructurein a batch
❙don‘ttryto importthedataon a slowserver/desktop
system
❙as SQLiteisjust onedatabasefile, I/O speedis
important
❙on a slowdesktopsystem, morethan30 minutes
needed
❙on a normal server, 2 minutesneeded
©MAYFLOWER GmbH 2005
17
„100,000 SQLiteinstalls“
Therol
l
outphaseof theapplication
❙firstdeadlinefortheGerman market, othercountriesfollowed
❙biggestmarketwithabout80,000 CDs to beshipped
❙Whatdoesthatmean?
Wecan‘tcontroltheend user‘ssystemconfiguration!
©MAYFLOWER GmbH 2005
18
„100,000 SQLiteinstalls“
Problems duringrollout
❙usershadproblemswiththeMicrowebserver
❙becausetheyusedInternet providerslikeAOL, T-Online
etc.
❙withinolderwindowsversions, therewas theTCP/IP socket
missing
❙thecallcenterhadto guidetheusersthroughthe
installation
❙thereweresomeproblemswithphp.iniset
t
ings
❙Wehadto givetheman update of php.ini
❙aftertwoverystrongweeks, wesolvednearlyevery
problem
❙SQLitewas likea rock!
©MAYFLOWER GmbH 2005
19
„100,000 SQLiteinstalls“
Otherpossibleimplementations?
❙in ourcase:
❙beawareof notbeingableto controltheuser‘s
environment
❙ifthat‘sokay, thenMicroweb+PHP+SQLiteisa good
choice
❙XUL/Flexxa choiceforimplementation?
❙yes, butat a highercost: youhaveto writethe
applicationtwotimes
❙withXUL, youareboundto theMozilla platform
©MAYFLOWER GmbH 2005
20
„100,000 SQLiteinstalls“
Otherpossibleimplementations?
❙improvements: PHP-in-a-box.exe
❙useDelphi:
❙IntegrateWebserver and PHP itselfinto.exe
❙Point itto thedocumentroot
❙UseSQLiteas database
❙or:
❙IntegrateWebserver, PHP and PHP scriptsinto.exe
❙UseSQLiteas database
❙usecase: „PHProjektin a box“(projectPHProjekt.exe)
©MAYFLOWER GmbH 2005
21
„100,000 SQLiteinstalls“
PHProjektin a box: let‘shavea look!
❙Download at http://www.thinkforge.org/
Thankyou!
Björn Schotte
Mayflower GmbH
Pleichertorstr. 2
97070 Würzburg
+49 (931) 35 9 65 -0
schotte@mayflower.de