We can not always start a new project from scratch and choose the right architecture and framework to guarantee scalability and performance, sometimes we have to deal with existing and grown systems. Here I'll show you our findings when we analyzed spelix.at, a web based system for cave management. The hotspots that we identified can be found in various systems all over the world.
3. 3
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE
… into a world below us …
4. 4
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE
… full of mystery …
5. 5
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE
… full of surprise …
6. 6
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE
… full of secrets …
7. 7
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE
A world to be discovered
8. 8
COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE
To be explored
9. 9
9
our
history
in
digital
cave
management
• 1989:
first
PC
version:
survey
data
analysis,
simple
list
generator
• 1996:
database
version
based
on
MS
Access:
master
data,
tour
reports,
extended
lists,
data
export
• challenge:
mulM
user
capability
• Import
/
export
files
distributed
via
email
/
disc
• MySQL
database
on
webserver
ODBC
client/server
connecMons
• Originally
intended
for
1
(our)
caving
club
(Linz)
• IntegraMon
of
the
HallstaX
club
• 2006:
consideraMons
within
the
caver’s
associaMon
in
Austria
to
use
a
web
database
as
the
base
for
the
Austrian
cave
directory
10. 10
10
Spelix
1.0
• 2008:
Web
frontend
• HTML
/
JavaScript
• Server:
LAMP
12. 12
12
a
growing
community
• Established
as
the
Austrian
cave
directory
• Most
clubs
in
Austria
have
accounts
(2012:
120)
• Inquiry
from
Germany
to
use
Spelix
for
“Schwäbische
Alb”
• Workshops,
trainings
• Special
feature
requests
• Changing
workflows
• More
and
more
user
complaints
• Complaints
regarding
performance
• More
developers
!!!
Time for a new
major version ?
13. 13
13
Analyzing
Spelix
2.0
Performance !
Are we able to
onboard more users ?
14. 14
14
From
the
user’s
perspec,ve
So
what
does
that
mean
in
detail
?
15. 15
15
networking
• Create
container
files
for
CSS
and
JS
• Use
sprites
for
icons
HTTP Redirects
16. 16
16
Java
Script
• showCave
is
the
hotspot
in
Java
Script
17. 17
17
server
contribu,on
• ‘getcaves’
is
our
server
side
hotspot
18. 18
18
Server
side
transac,on
details
• Always
load
complete
list
of
cave
groups
• Always
load
complete
list
of
caves
for
selected
group
• =>
lack
of
data
caching
19. 19
19
digging
into
getCaves…
Time
to
check
the
database
!
20. 20
20
Database
execu,on
plan
Review
and
tune
database
views
!
23. 23
23
Considera,ons
for
a
new
version
• Improve
user
experience
measures
• Scale
system
for
extended
user
community
• Flexible
data
structure
• MulMmedia
integraMon
• Mobile
environment
• Development
environment
• Google
API
V2
disconMnued
24. 24
24
Spelix
3
• New
map
window
(Leaflet
API)
• Map
based
logic
• Mobile
capability
• Local
data
storage
• Restructured
database
• GPS
integraMon
• Enhanced
document
management
25. 25
25
First
impression
• Looks
beXer
• Network:
sMll
too
many
roundtrips
(css,
js,
images)
• JavaScript:
well,
there
is
a
lot
to
do
on
the
page…
26. 26
26
User
experience
Let’s roll up our sleeves…
27. 27
27
Session
cache
• select
*
from
sys2:
read
user
preferences
from
DB
• Store
record
in
$_SESSION
35. 35
35
Sessions
in
PHP
• session_start()
locks
the
file
where
session
data
are
stored
• Released
when
script
ends
• Use
session_write_close()
to
unlock
the
file
before
execuMng
slower
code
• Or
create
your
own
save
handler
with
session_set_save_handler()