• Save
dClass
Upcoming SlideShare
Loading in...5
×
 

dClass

on

  • 203 views

dClass VUG7 presentation

dClass VUG7 presentation

Statistics

Views

Total Views
203
Views on SlideShare
203
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    dClass dClass Presentation Transcript

    • dClass and VarnishReza Naghibireza.naghibi@yahoo.comVUG 7 May 2013
    • Agenda• What is dClass?• Brief history of device detection• Device classification in Varnish usingdClass• Device classification and developers• Apache DeviceMap• The future of dClass
    • What is dClass?• dClass is search reversed• Search is discovery, dClass isclassification• dClass indexes searches• Searches are patterns• Patterns represent knowledge• dClass indexes knowledge
    • How does dClass work?• dClass uses a handful of performanceoptimizations• Algorithms == speed• Memory efficiency == speed• dClass precompiles all regex• dClass breaks out of dead input by walking theinput as it walks the pattern tree• Concise patterns == high performance
    • History of device detection• User-Agent header was designed for this• Browsers, screen sizes, network speeds,and CPU speeds all progressed at‘relatively’ the same pace• Mobile devices and tablets changed that• Client fragmentation led to developerfragmentation
    • Server side device ‘detection’• It is not detection, its classification!• The device classes we care most about:– Smart phones– Tablets– Desktop browsers– Web Crawlers– Feature phones (maybe?)• Each class has different requirements• Browser version targeting is available (thinkIE)
    • Device ‘detection’ challenges• Device detection used to be difficult:– Logic was messy and non performant– New devices are released every month• dClass + Varnish is clean and performant• Apache DeviceMap (formally OpenDDR) andother commercial offerings stay ontop ofreleases• How often do you update your website? Thatis how often you should update your DDR!
    • dClass + Varnish• The solution is completely contained within Varnish• VCL is expressive! Lots of options:– Send device classification header to backend. Serve differentviews on same URL and domain.– Redirect requests to device specific domain or rewrite to devicespecific URL. Can still have single backend.– Mix and match• Upstream caching (CDN) complicates this, may needto use cookies (or just find a better CDN…)• Varnish can even serve device classification JSON forclient side use
    • dClass + Varnish configurationSource:https://github.com/TheWeatherChannel/dClassVCL:https://raw.github.com/TheWeatherChannel/dClass/master/servers/varnish/dclass.vcl• To update your DDR just use vcl.load andvcl.use in varnishadm (no downtime!)• Apache DeviceMap has monthly DDRupdates• Vendors/Admins/SysOps, offer this to yourclients!
    • Device classification + developers• Device classification will simplify your code• Device classification is just another backendparameter• It can be completely transparent to theweb stack like load balancing or caching• Projects like dClass and DeviceMap havemade device classification more accessiblethan ever
    • Apache DeviceMap• Was born out of the OpenDDR project• Still in incubator status, so look for bigchanges in the upcoming months• Have an issue with a device, tell us!• Contribute!http://incubator.apache.org/devicemap/
    • dClass and the future• dClass is a powerful pattern classificationengine• Better classification leads to things likehigher order reasoning and richerinteractions• webClass (http://rezsoft.org/webclass)• Contribute!
    • Questions?• I am always available for questions andsupport– Email: reza.naghibi@yahoo.com– LinkedIn: Reza Naghibi– Twitter: rezaberry