Layer Drupal with emerging technologies to create a performant, scalable data purveyor. Modularizing the architecture creates performant applications for all content and all users.
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Drupal as a Data Purveyor, Part II
1. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Drupal as
a Data Purveyor
Layering Drupal with emerging technologies to create a
performant, scalable data purveyor.
2. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
ASTONISH DESIGN
C H A N G E G A M E
Diana Montalion Dupuis
@dianadupuis
Sam Heuck
@samheuck
Andrew Elster
@filmknurd
3. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
ASTONISH DESIGN
C H A N G E G A M E
We have a new website: astonishdesign.com
@Astonish_Design
4. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
An open-source content management PHP/MySQL framework designed
for rapid development of content-rich web applications.
5. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Reasons (among many)
• Growth: evolving tool
• Foundation skill set
• User features
6. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
http://jdhancock.com/ • JD Hancock• http://farm9.staticflickr.com/8322/8031897271_9c63e48a29_b.jpg
7. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
“Big” Data
"Big" in relation to the amount
of content Drupal is designed
to manage
8. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Volume
9. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Velocity
BIKE WALLS• http://www.bikewalls.com
10. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Variety
11. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Content
•Every kind of data
•Coming from everywhere
12. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Current Issues
•Bootstrapping
•Bottlenecks - Normalized - Join Happy
•Lack of solution architecture
13. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Views
Rapid
Development
Platform
Visitors
& Content
Authors
Miners
Who is the user?
14. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Welcome to the future
When modularizing the architecture creates performant applications for
all content and all users.
15. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Traditional Optimizations
16. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Duplicate
Data
Rapid
Development
Platform
API
Denormalized
Document Storage for READS
Normalized
Relational for WRITES
Data Mining
Content & Data
Creation
17. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Cost of Bootstrap
• Hooks allow modules to
customize behavior
• Drupal calls hooks during each
stage of bootstrap
• More modules, more hooks
called, slower bootstrap
18. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Massive Callstacks
19. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Bootstrap on Every Request
20. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Views
Rapid
Development
Platform
Visitors
& Content
Authors
Miners
Backbone.js
Twisted
JS
Photon
Vert.x
Celluloid::IO
PYTHON
PHP
JAVA
RUBY
21. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Views
Rapid
Development
Platform
Visitors
& Content
Authors
Miners
Backbone.js
Twisted
JS
Photon
Vert.x
Celluloid::IO
PYTHON
PHP
JAVA
RUBY
Sources
22. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
API and Node.JS
23. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Why Proxy External Sources?
OK
your.domai
GET
OK
other.domain
OPTION
Yes
GET
24. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
RESTful
RobertTadlock • http://www.flickr.com/photos/rtadlock/2716877199/
http://apigee.com/about/api-best-practices Since you are building the API, you
can make it any way you want, but
following some good basic REST
conventions is a good idea.
It will make it easier to integrate
with front end frameworks.
25. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Pick a Framework
Express or Restify
•http://expressjs.com
•http://mcavage.github.com/node-restify
26. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Pick a Connector
Tony Hisgett • http://www.flickr.com/photos/hisgett/
http://mongoosejs.com/
Mongoose
Alternatives
•Mongolia
•Mongo Skin
•Native MongoDB Driver
27. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Example
Express & Mongoose
28. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Create a Resource
29. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Create an Endpoint
http://domain/resources
{ [
{
“someField”: “blah blah blah”
“anotherField”: 2
}
...
] }
30. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
On the Front-end
31. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Views
Rapid
Development
Platform
Visitors
& Content
Authors
Miners
Backbone.js
Twisted
JS
Photon
Vert.x
Celluloid::IO
PYTHON
PHP
JAVA
RUBY
Sources
32. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Isn’t JS Slow?
Yes but....
1. JS and devices continue to improve
2. We've improved the overall round
trip: faster data, smaller payload, no
bootstrap. It's still faster overall.
33. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Organize Your Code
On the front-end, you could write everything
as AJAX calls and jQuery DOM manipulation,
but that will get messy very quickly as your
application grows in sophistication.
In the interests of maintainability and sanity,
use a framework that organizes your code and
abstracts away the DOM. There are many to
choose from. A new one probably came out
this morning.
34. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
We use Ember because it is straightforward
to use, powerful, flexible, and still fairly light
weight. Backbone has been around for a
while and is quite nice, but we like how
Ember handles garbage collection and the
other goodies it ships with.
What Why How
http://www.emberjs.com Why Discourse Uses Ember •Official Guides
•Resources
•Fire Up Ember
•Ember Camp
•DarthdeusV. Ember
•
35. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Results from
Rich Snippets
For Algebraix, all the data comes from an
external source, so it makes sense to run the
application on the client side, as opposed to
importing the data into Drupal first.
It also makes the control panel feel more
responsive. No more click and hope while
waiting for the interface to receive data. Now
we've created a conversation with the user.
36. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
37. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Essential question ...
Why use Drupal?
Don’t use Drupal if you don’t need it.
38. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
The role of the themer
Front engineer
39. ASTONISH DESIGN
C H A N G E G A M E astonishdesign.com@astonishdesign #ddtx13
Questions?