Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 36 min 4 sec ago

Drupal @ Penn State: Dynamic Memory Allocation in Vagrant Virtual Machines on Windows Hosts

Sun, 12/04/2015 - 01:36

Whenever there is a constraint on the number of developers in a pool, it can make it more difficult to solve issues. As we have been developing Nittany-Vagrant, I have found that there is definitely a smaller pool of developers running on a Microsoft Windows host for their vagrant based virtual machines.

The extra credit problem of the day for me was how to allow vagrant to automatically size a virtual machine's memory pool when utilizing VirtualBox as the VM provider on Windows. This is a well known solution on OSX:

Categories: Elsewhere

DrupalOnWindows: Calling .Net Framework and .Net Assemblies from PHP

Sat, 11/04/2015 - 23:48
Language English

You know that the PHP ecosystem is not yet (but heading to) professional or truly business ready. Something as simple as doing good and solid PDF manipulation, interacting with Word and Excel and others are simply a nightmare. You will of course find libraries to handle all that, the problem is that they are all half broken, slow and not even close the the professional offering you can find the in the .Net environment.

More articles...
Categories: Elsewhere

tanay.co.in: Some quick statistics from scraping the Acquia Certification Registry

Sat, 11/04/2015 - 19:38

As Acquia Drupal Certification turned 1 recently, I was trying to make sense of how many people have taken the certification exam, especially from India.

The certification team had recently launched the Acquia Certification Registry portal @ http://training.acquia.com/registry where you can search through and browse the list of candidates that have cleared the certification exam(s).

I built a small script that scraped the results, crawling through all 20 pages currently available on the registry portal, into a spreadsheet as well as a MySQL database, that I could run queries later to mine for the data I was looking for.

Finally, after a few minutes, I had a local consolidated database of the data publicly available from the certification registry, which I could run queries against, to find the answers I was looking for.

FInally, I have the numbers that I was interested in...

Total Number of Certifications = 777

(As on the registry on Sat April 11 9am IST)

Number of People Certified = 685

Unites States tops the chart with

307 certifications of

259 certified candidates, followed by

India with 86 candidates!

Number of Certifications - Top 6 Countries

United States

307

India

86

Canada

58

Australia

48

United Kingdom

44

Belgium

35

Number of Certified Developers - Top 6 Countries

United States

259

India

76

Canada

53

Australia

45

United Kingdom

34

Belgium

32

Acquia Certified Developers are spread over 40+ Countries!

On this context, I had a quick chat with Peter Minijak from the Acquia Certification team for a more deeper insight into the numbers. Was surprised to know that this list is going to explode soon to at least 150% as the total number of registered profiles including those who are yet to give their exam currently stands at 60+!

66 Developers have

more than 1 certification!

Acquia also gives a ”Grand Master”title to candidates who have cleared the first 3 examinations. There are

11 such candidates currently.

The same are listed @ http://training.acquia.com/registry/grand-masters  

14 countries have developers holding

more than 1 certification

Feels good to see India at #2, by absolute numbers. But if seen relatively, considering the large number of Drupal shops and Service Integrators in India, I think the number is still small and definitely bound to make a huge leap in the coming months.

NOTE: These numbers were scraped from the Certification Registry portal. They are no where close to being reliable. There could be some bugs from my script or the bad queries I write ;-)  

Categories: Elsewhere

Théodore 'nod_' Biadala: Visualization of jQuery use in Drupal 8

Fri, 10/04/2015 - 20:00

Since FrontendUnited 2012 Amsterdam, I've been saying Drupal core should significantly cut it's jQuery use. Until now it was without much data to back it up. What follows is a visualization of jQuery modules use in Drupal 8 code, it's fancy so feel free to click everywhere. There is additional information in titles, be sure to check those out. Took long enough to make, sorry mobile users.

traversingattributeseventmanipulationcsssizzledataajaxoffset

2488 occurrences of jQuery-related code.

traversing attributes event manipulation css sizzle data ajax offset dimensions effects serialize wrap core deprecated deferred exports

View data from folders:

core/misc core/modules core/themes core/vendor

@media (max-width: 767px) { label {display:block;} } label {cursor:pointer;display:inline-block;cursor:pointer;margin:0;padding:0.5em 0.75em;overflow:hidden;text-align:center;} label input {position:absolute;overflow:hidden;width:1px;height:1px;} label.focus {text-decoration:underline;} #rss-friend {display:none;} #rss-fiend {display:block!important;margin:3em 0;} #bubblewrap {position:relative;height:600px;width:100%} #modules, #folders {display:flex;flex-wrap:wrap;} #modules label {flex: 1 1 auto;} #folders .selected {background-color:lightgrey;} .major {font-weight:bold;} .node, #modules label.selected {color:white;} .node { border: solid 1px white; overflow: hidden; position: absolute; display:flex; text-align:center; } .node span {flex: 1 1 auto;align-self: center;} .depth-1 {font-weight: bold;} .hidden {visibility: hidden;} .node {text-decoration: none;} .node:focus, .node:active {text-decoration: underline;}

I've been working on a tool that inspect javascript files and show all jQuery methods and Sizzle selectors used in that file. I will be releasing it soon, once the npm namespace issue has been sorted out and I polished it a little bit more. Meanwhile, I ran it on Drupal code and got this: View raw data.

dataQuery.display();
Categories: Elsewhere

DrupalCon News: Announcing DrupalCon Los Angeles Keynote Speaker Whitney Hess

Fri, 10/04/2015 - 18:16

We are so excited to announce our final keynote speaker for the upcoming DrupalCon Los Angeles, Whitney Hess.

Whitney is a coach, writer and speaker helping people bring their whole selves to their work. For the last decade, she has coached hundreds of companies on how to make their products easier and more pleasurable to use, boost the bottom line, and do work they love. Whitney is the co-host the podcast Designing Yourself, writes on her blog Pleasure & Pain, and speaks at conferences and corporations worldwide. 

Categories: Elsewhere

Drupal Association News: New Try Drupal Program

Fri, 10/04/2015 - 18:05

One of the Drupal Association's primary missions is to grow the adoption of Drupal.  We are about to launch a new program on April 15th called Try Drupal.  The program will make it easy and fast for evaluators to try Drupal and have a simple, great experience while on Drupal.org.

We’ve created Try Drupal with our Premium Hosting Supporters to make it easier for CMS evaluators and Drupal.org newcomers to test and work with a Drupal demo site.  The Program will showcase a selection of Hosting Companies where a new user can quickly (in less than 20 minutes) sign up and have a Drupal demo site up and running for them to use for free. 

This is part of the Drupal Association’s initiative to develop a new revenue stream through advertising programs on Drupal.org.  This revenue will help fund various site initiatives by the Association to improve Drupal.org performance, and make it easier to use and more secure.  After interviewing many members of the community, we determined that new advertising products should be useful to Drupal.org visitors, support our mission to grow the adoption of Drupal, and should not interfere with visitors contributing to the project.

To ensure a positive Drupal experience, partners need to adhere to the following guidelines:

  • Users are directed to a self-serve sign up platform
  • Users can create a free account for the demo site that accommodates a trial installation of Drupal 7 or 8
  • Users can create a website in 20 minutes or less
  • The demo site should be available to the user for a minimum of one day upon sign up
  • The partner cannot include a paywall or require a credit card upon sign up

The Try Drupal program will be featured on the homepage of Drupal.org.  It will launch with a larger iterative change to the homepage, with an emphasis on helping users move from newcomer, to learner, to skilled Drupal community members.

It’s important that we fund Drupal.org improvements, and that we do so in a responsible way that respects the community. We anticipate rolling out more key advertising programs throughout 2015, stay tuned for more updates.  Thanks for taking the time to read about our initiatives, and please tell us your thoughts!

Categories: Elsewhere

SitePoint PHP Drupal: Integrate Elasticsearch with Silex

Fri, 10/04/2015 - 18:00

In the previous article I started exploring the integration between Drupal 7 and the Elasticsearch engine (henceforth referred to as Elastic). The goal was to see how we can combine these open source technologies to achieve a high performance application that uses the best of both worlds. If you’re just now joining us, you should check out this repository which contains relevant code for these articles.

We’ll now create a small Silex application that reads data straight from Elastic and returns it to the user.

Silex app

Silex is a great PHP micro framework developed by the same people that are behind the Symfony project. It is in fact using mainly Symfony components but at a more simplified level. Let’s see how we can get started really quickly with a Silex app.

There is more than one way. You can add it as a dependency to an existent composer based project:

"silex/silex": "~1.2",

Or you can even create a new project using a nice little skeleton provided by the creator:

composer.phar create-project fabpot/silex-skeleton

Continue reading %Integrate Elasticsearch with Silex%

Categories: Elsewhere

Midwestern Mac, LLC: Thoughts on the Acquia Certified Developer - Back End Specialist Exam

Fri, 10/04/2015 - 17:31

A little under a year ago, I took the Acquia Certified Developer exam at DrupalCon Austin, and posted Thoughts on the Acquia Drupal Developer Certification Exam. My overall thoughts on the idea of certifications for OSS like Drupal remain unchanged, so go read that previous post to hear them.

I wanted to post a little more about the additional certifications Acquia is now offering; in addition to the initial, more generalist-oriented Acquia Certified Developer Exam, Acquia now offers:

Earlier today, I took the Back End Specialist Exam, which focuses more specifically on things like Drupal's core API, general PHP syntax and style, secure code, content caching, debugging, and interacting with the Drupal community.

Like the other certification exams, you get 90 minutes to complete the exam (60 questions total), and you have to take the exam either online or in a testing center with an active proctor. This time, I elected to take the exam on my own computer, which was a little more annoying than taking the exam in-person at a test center (as I did at DrupalCon last year).

Categories: Elsewhere

Promet Source: Composing a Drupal 7 Site

Fri, 10/04/2015 - 17:07

With Drupal 8 on it's way in, PHP's standard practice of using Composer is working its way into a Drupal developer's normal life. Jump ahead of the curve with Promet Source and start using this tool for your Drupal 7 projects with this complete demonstration of a composer workflow using the following packages:

Categories: Elsewhere

InternetDevels: Big Manual for creating CTools popups in Drupal 7

Fri, 10/04/2015 - 15:55

Creating CTools popups (modal windows) is not a complicated thing, but it has many important nuances. Therefore, this article is devoted to the various nuances of popup creation.

The simplest CTools popup

Read more
Categories: Elsewhere

Lullabot: Mental Health and Open Source

Fri, 10/04/2015 - 11:01

This week we have a special episode to talk about mental health. This is a hard topic for many people to speak about publicly, so we're lucky to have Addison Berry joined by Mike Bell, Greg Dunlap, and Blake Hall to dive into this subject. Mike recently gave a presentation on this topic at Drupalcamp London. The four of us discuss some of the pressures we feel, ways we try to handle them, ideas for how the community can support help support all of us in good mental health, and some resources to check out.

Categories: Elsewhere

Chuva Inc.: Drupal Developer Days 2015 is next week!

Fri, 10/04/2015 - 05:00

Next week, Drupal Developer Days 2015 will be held in Montpellier, France. For those of you who haven't heard of the event before, Drupal Developer Days is the second most important Drupal event in Europe, held every spring in a different city from the old continent.

The event is highly technical (expect several advanced talks about Drupal 8 and beyond) and still has the cozy atmosphere we used to have in the old DrupalCons (DrupalCon Barcelona 2007, anyone?), lately it has been my favorite Drupal event.

Every year, we from Chuva ship around 5 of our Drupal Developers to attend the event, it's a 10.000 km trip from our home in São Paulo State, Brazil to Montpellier, France; but it's well worth the effort as it allows us an unique opportunity to meet our friends from the Drupal Community, Contribute code on the several sprints and share knowledge with our fellow Drupalistas.

If you haven't booked your flight and bought your ticket yet, there is still time, the late bird ticket is only 150.00 € (which is a bargain when you compare that with $ 550 USD for DrupalCon LA, huh?), it's your best opportunity to connect, meet, share with other drupalistas, buy your ticket here!

DrupalDeveloperDayMontpellierdrupal planet
Categories: Elsewhere

Mediacurrent: Why Good Markup Matters

Thu, 09/04/2015 - 22:21

I recently had the opportunity to work on a project for one of our clients that consisted of building two landing pages using only HTML, CSS and JavaScript. This is not a typical project for us, almost all of the projects we work on are Drupal projects. However, it was a reminder of how great things can be when we have full control of markup authoring.

After working with Drupal for a while, not having to deal with 10 nested divs just to get to the element I want to theme, was refreshing.

Categories: Elsewhere

Shomeya: Web-Consulting's Dirty Little Secret

Thu, 09/04/2015 - 22:05

It's the day after a launch and your client calls you in a sheer panic. Traffic is not as high as they'd like! Why aren't their new social media features paying off? Don't you know what you're doing? And to top it all off the site is slow! You need to fix this now.

As you listen to your client yell, you drift back in time to that first meeting where you both are posturing and laying down the ground rules for each other. Business as usual planning out the new details with excitement and anticipation.

And then the moment comes back to you. The moment when you said nonchalantly, "We can do that feature, but it may cause the site to slow down. Why is this feature so important?" And the client, also nonchalantly said, "We just need it, our competitors all have it." And you both went back to going over the other features on the list, not realizing that you had just wasted thousands of your client's dollars and hours of your life on something that most users don't give a flying flip about bringing almost zero value to the world, all because everybody's doing it. This is how the business just works, and hardly anyone ever questions it.

Read more
Categories: Elsewhere

Drupal Watchdog: VIDEO: DrupalCon Amsterdam Interview: Dries Buytaert

Thu, 09/04/2015 - 19:19

On the final Sprint Day of DrupalCon Amsterdam, DRIES BUYTAERT (Drupal Creator and Co-Founder & CTO Acquia) generously interrupts his lunch-break for this interview. We find a quiet – more or less – hallway and begin.

RONNIE RAY: What was the first computer you owned?

DRIES BUYTAERT: The first one that I actually used was a Commodore 64, when I was about six years old. It was my dad's, so I can't say that I owned it, but I was able to use it. I liked to use it.

So when I was about six or seven years old, my parents bought me some computer books for kids. They were in BASIC. What you had to do was type over these programs. I could barely read or write at the age of six, right? And so I literally spent hours copy-pasting BASIC code from the book into the computer. And then when I would run the program – assuming I did the copy-pasting right, there would be a very little game that I could play.

So that’s how I learned BASIC programming even before I could write or read.

My dad was a doctor, a medical doctor. He asked me to automate – or to basically make a patient management system – a computer program instead of using paper. And one night he came home from work and he gave me Clipper. I don’t know if anyone remembers Clipper, but it was a data base and programming language not unlike D-Base. He gave me a stack of books, a compiler book, and all these books in English, which was really hard. I remember spending my entire summer vacation trying to help him build this program so he could use a computer to manage his patients. I would read these books along with a dictionary, English to Dutch, to try to figure out how this all works.

So increasingly more I got into computers. And then when I finished high school – when I was 17 – I enrolled in a computer science program at the local university.

RR: Listening?

DRIES: I listen to music whenever I can. When I wake up, one of the first things I do is turn on the music. Or when I get home from work, one of the first things I do is turn on music. I listen to everything, and I like a variety. Part of me is still stuck, sort of, in the late-‘90s music, whether it’s Pearl Jam or these kinds of bands.

RR: Reading?

DRIES: I read a lot. I love reading, I love writing as well. I primarily read business books.

RR: What’s on your nightstand now?

DRIES: I was actually reading a book on stoicism, which told the history of stoicism and then tries to apply it to modern life.

There is a new book from Peter Thielson, an early investor in FaceBook and co-founder of PayPal. It’s called From Zero to One, which is a book of start-ups.

Ever since I moved to the U.S. I’ve gotten into American football. Just watching it on Sunday afternoon, it’s kind of a nice lazy activity after a very active week or travel. I like to sit down on the couch and watch football for an hour or two. I usually don’t watch the entire game, just record it and then I’ll fly through it and watch the end.

RR: To sum up...

DRIES: I’m kind of really interested in scaling, both from a technical point of view -- my PhD research was about scaling software in Java, virtual machines, and Java applications. A lot of the work I did in Drupal also involved scalability in Drupal. Even in business: How do we scale the Drupal Association? How do we grow that organization? Or how do we scale Acquia?

So I feel like maybe it’s a bit of a theme. I’m interested in both the technology side, and also the business side and the people side, and I think that excites me. It excites me to think about what we could be, and I’m trying to figure out: If this is what we want to be, how do we actually get there?

Tags:  DrupalCon Amsterdam DrupalCon Video Video: 
Categories: Elsewhere

Drupal Watchdog: VIDEO: DrupalCon Amsterdam Interview: Dries Buytaert

Thu, 09/04/2015 - 19:19

On the final Sprint Day of DrupalCon Amsterdam, DRIES BUYTAERT (Drupal Creator and Co-Founder & CTO Acquia) generously interrupts his lunch-break for this interview. We find a quiet – more or less – hallway and begin.

RONNIE RAY: What was the first computer you owned?

DRIES BUYTAERT: The first one that I actually used was a Commodore 64, when I was about six years old. It was my dad's, so I can't say that I owned it, but I was able to use it. I liked to use it.

So when I was about six or seven years old, my parents bought me some computer books for kids. They were in BASIC. What you had to do was type over these programs. I could barely read or write at the age of six, right? And so I literally spent hours copy-pasting BASIC code from the book into the computer. And then when I would run the program – assuming I did the copy-pasting right, there would be a very little game that I could play.

So that’s how I learned BASIC programming even before I could write or read.

My dad was a doctor, a medical doctor. He asked me to automate – or to basically make a patient management system – a computer program instead of using paper. And one night he came home from work and he gave me Clipper. I don’t know if anyone remembers Clipper, but it was a data base and programming language not unlike D-Base. He gave me a stack of books, a compiler book, and all these books in English, which was really hard. I remember spending my entire summer vacation trying to help him build this program so he could use a computer to manage his patients. I would read these books along with a dictionary, English to Dutch, to try to figure out how this all works.

So increasingly more I got into computers. And then when I finished high school – when I was 17 – I enrolled in a computer science program at the local university.

RR: Listening?

DRIES: I listen to music whenever I can. When I wake up, one of the first things I do is turn on the music. Or when I get home from work, one of the first things I do is turn on music. I listen to everything, and I like a variety. Part of me is still stuck, sort of, in the late-‘90s music, whether it’s Pearl Jam or these kinds of bands.

RR: Reading?

DRIES: I read a lot. I love reading, I love writing as well. I primarily read business books.

RR: What’s on your nightstand now?

DRIES: I was actually reading a book on stoicism, which told the history of stoicism and then tries to apply it to modern life.

There is a new book from Peter Thielson, an early investor in FaceBook and co-founder of PayPal. It’s called From Zero to One, which is a book of start-ups.

Ever since I moved to the U.S. I’ve gotten into American football. Just watching it on Sunday afternoon, it’s kind of a nice lazy activity after a very active week or travel. I like to sit down on the couch and watch football for an hour or two. I usually don’t watch the entire game, just record it and then I’ll fly through it and watch the end.

RR: To sum up...

DRIES: I’m kind of really interested in scaling, both from a technical point of view -- my PhD research was about scaling software in Java, virtual machines, and Java applications. A lot of the work I did in Drupal also involved scalability in Drupal. Even in business: How do we scale the Drupal Association? How do we grow that organization? Or how do we scale Acquia?

So I feel like maybe it’s a bit of a theme. I’m interested in both the technology side, and also the business side and the people side, and I think that excites me. It excites me to think about what we could be, and I’m trying to figure out: If this is what we want to be, how do we actually get there?

Tags:  DrupalCon Amsterdam DrupalCon Video Video: 
Categories: Elsewhere

Drupal Watchdog: Testing 1 2 3

Thu, 09/04/2015 - 17:47
Column

In Behat, anything that doesn’t throw an exception is treated as a success. Every custom step definition presents the developer with the responsibility to check for exceptions and the opportunity to increase the value of scenario automation by providing meaningful feedback about failure.

We’ll explore this opportunity in the custom step definitions in the following scenario for a site whose main source of income results from presenting a discounted sale product on the front page:

Scenario: Daily Deal discount Given I am on the homepage When I click the Daily Deal "Buy now!" link Then I should see the product title And the sale price should reflect the discount advertised on the homepage

The product and discount change daily, so instead of matching literal text, the first custom step will use a css selector to find the discount amount and product title.

To start implementing, run the scenario to generate stubs for the custom steps. Note: --append-snippets can be used to write the output directly to the FeatureContext.php file.

It wouldn’t be uncommon to find the first custom step implemented with something like:

/** * @When /^I click the Daily Deal "([^"]*)" link$/ */ public function iClickTheDailyDealLink($linkText) { $page = $this->getSession()->getPage(); // Limit to the Daily deal block $el = $page->find('css','#daily'); // Find the title for use in the next step $this->product = $el->find('css','h2')->getText(); // Find the discount amount for use in the next step $this->discount = $el->find('css','span#dd-discount')->getText(); // Go to the product page $link = $el->findLink($linkText); if (empty($link)) { throw new Exception('Link not found'); } $link->click(); }

There are many ways to improve this step definition, but with respect to exceptions, the first and perhaps most important thing is:

Categories: Elsewhere

Drupal Watchdog: Testing 1 2 3

Thu, 09/04/2015 - 17:47
Column

In Behat, anything that doesn’t throw an exception is treated as a success. Every custom step definition presents the developer with the responsibility to check for exceptions and the opportunity to increase the value of scenario automation by providing meaningful feedback about failure.

We’ll explore this opportunity in the custom step definitions in the following scenario for a site whose main source of income results from presenting a discounted sale product on the front page:

Scenario: Daily Deal discount Given I am on the homepage When I click the Daily Deal "Buy now!" link Then I should see the product title And the sale price should reflect the discount advertised on the homepage

The product and discount change daily, so instead of matching literal text, the first custom step will use a css selector to find the discount amount and product title.

To start implementing, run the scenario to generate stubs for the custom steps. Note: --append-snippets can be used to write the output directly to the FeatureContext.php file.

It wouldn’t be uncommon to find the first custom step implemented with something like:

/** * @When /^I click the Daily Deal "([^"]*)" link$/ */ public function iClickTheDailyDealLink($linkText) { $page = $this->getSession()->getPage(); // Limit to the Daily deal block $el = $page->find('css','#daily'); // Find the title for use in the next step $this->product = $el->find('css','h2')->getText(); // Find the discount amount for use in the next step $this->discount = $el->find('css','span#dd-discount')->getText(); // Go to the product page $link = $el->findLink($linkText); if (empty($link)) { throw new Exception('Link not found'); } $link->click(); }

There are many ways to improve this step definition, but with respect to exceptions, the first and perhaps most important thing is:

Categories: Elsewhere

Wim Leers: Drupal 8 now has page caching enabled by default

Thu, 09/04/2015 - 16:25

After more than a year and probably hundreds of patches, yesterday it finally happened! As of 13:11:56 CET, April 8, 2015, Drupal 8 officially has page caching enabled by default!1 And not the same page caching as in Drupal 7: this page cache comes is instantly updated when something is changed.

The hundreds of patches can be summarized very simply: cache tags, cache tags, cache tags. Slightly less simple: cacheability metadata is of vital importance in Drupal 8. Without it, we’d have to do the same as in Drupal 7: whenever content is created or a comment is posted, clear the entire page cache. Yes, that is as bad as it sounds! But without that metadata, it simply isn’t possible to do better.2

I’ve been working on this near-full time since the end of 2013 thanks to Acquia, but obviously I didn’t do this alone — so enormous thanks to all of you who helped!

This is arguably the biggest step yet to make Drupal Fast By Default. I hate slow sites with a passion, so you can probably see why I personally see this as a big victory :)

Benchmark

Out of the box, Drupal 8 is now between 2 and 200 times faster than Drupal 7 for anonymous users: Drupal 8 will respond in constant time, for Drupal 7 it depends on the complexity of the page.

On my machine ( ab -c1 -n 1000, PHP 5.5.11, Intel Core i7 2.8 GHz, warm caches,):

Drupal 7
  • Front-page: 18.5 ms/request (55 requests/s)
  • node/1: 23.5 ms/request (43 requests/s)
  • More complex pages: easily hundreds of milliseconds, only few requests per second.
Drupal 8

Always 8.3 ms/request (120 requests/s)3.

Win-win

The real beauty is that it’s a win-win: enterprise (Acquia), medium, small, tiny (hobbyist) all win:

  • Enterprise sites get very nice reverse proxy/CDN-based hosting
  • Tiny sites can easily serve 100 requests/second (>8 million requests/day) on shared hosting.

So my work was sponsored by Acquia, but benefits everyone!

People have been expressing concerns that Drupal 8 has become too complex, that it doesn’t care about site builders anymore, that it is only for enterprises, etc. I think this is a good counterexample.
Yes, we added the complexity of cacheability metadata, but that only affects developers — for whom we have good documentation. And most importantly: site builders reap the benefits: they don’t even have to think about this anymore. Manually clearing caches is a thing of the past starting with Drupal 8!

Page cache is just a built-in reverse proxy

Drupal’s page cache is just a built-in reverse proxy. It’s basically “poormansvarnish”.

Drupal 8 bubbles all cacheability metadata up along the render tree, just like JavaScript events bubble up along the DOM tree. When it reaches the tree’s root, it also bubbles up to the response level, in the form of the X-Drupal-Cache-Tags header.

The page cache uses that header to know what cache tags it should be invalidated by. And because of that, other (“real”) reverse proxies can do exactly the same. The company behind Varnish even blogged about it. And CDNs are even starting to support this exact technique out of the box, for example Fastly.

Last but not least: all of Drupal 8’s integration tests use the page cache by default, which means all of our integration tests effectively verify that Drupal works correctly even if they’re behind a reverse proxy!

New possibilities for small sites (and shared hosting)

On one end of the spectrum, I see great shared hosting providers starting to offer Varnish even on their smallest plans. For example: Gandi offers Varnish on their €4/month plans. If users can configure Varnish — or even better, if they pre-configure Varnish to support Drupal 8’s cache tag-based invalidation — then almost all traffic will be handled by Varnish.

For 90% or more of all sites, this would quite simply be good enough: very cheap, very fast, very flexible.4

I can’t wait until we see the first hosting provider offering such awesome integration out of the box!

New possibilities for enterprise sites (and enterprise hosting)

On the other hand of the spectrum, enterprise hosting now gains the ability to invalidate (purge) all and only the affected pages on a CDN5. Without having to generate a list of URLs that a modified piece of content may appear on, and then purge those URLs. Without having to write lots of hooks to catch all the cases where said content is being modified.

At least equally important: it finally allows for caching content that previously was generated dynamically for every request, because it was a strong requirement that the information always be up-to-date6. With cache tag support, and strong guarantees that cache tags indeed are invalidated when necessary, such use cases now can cache the content and still be confident that updates will immediately propagate.

New possibilities for developers

Finally, the addition of cache tags and by extension, all render cacheability metadata (cache tags, contexts and max-age), allow for greater insight and tooling when analyzing hosting, infrastructure, performance and caching problems. Previously, you had to analyze/debug a lot of code to figure out why something that was cached was not being invalidated when appropriate by said code.

Because it’s now all standardized, we can build better tools — we can even automatically detect likely problems: suspiciously frequent cache tag invalidations, suspiciously many cache tags … (but also cache contexts that cause too many variations, too low or too high maximum ages …).

Next steps

Warm cache performance is now excellent, but only for anonymous users.

Next week, at Drupal Dev Days Montpellier, we’ll be working on improving Drupal 8’s cold cache performance (including bootstrap and routing performance). That will also help improve performance for authenticated users.

But we already have been working several weeks on improving performance for authenticated users. Together with the above, we should be able to outperform Drupal 7. This is the plan that Fabian Franz and I have been working towards:

  1. smartly caching partial pages for all users (including authenticated users): d.o/node/2429617, which requires cache contexts to be correct
  2. sending the dynamic, uncacheable parts of the page via a BigPipe-like mechanism: d.o/node/2429287
  1. That’s commit 25c41d0a6d7806b403a4c0c555f7dadea2d349f2. 

  2. In other words: all of this is made possible thanks to optimal cache invalidation. Yes, that quote

  3. We’re also working on making the page cache faster. 5 ms/request, or 200 requests per second should be possible. 

  4. And not something any other CMS offers as far as I know — if there is one, please leave a comment! 

  5. Keep an eye on the Purge module for Drupal 8. It will make it very easy to apply cache tag-based invalidation to self-hosted reverse proxies (Varnish, ngninx…), but also to put your entire site behind a CDN and still enjoy instantaneous invalidations! 

  6. You could already use #cache[expire] in Drupal 7, but in Drupal 8, the combination of #cache[max-age] and #cache[tags] means that you have both time-based invalidation and instantaneous tag-based invalidation. Whichever invalidation happens first, invalidates the cached data. And therefore: updates occur as expected. 

  • Acquia
  • Drupal
  • WPO
  • performance
Categories: Elsewhere

Drupal Association News: What's new on Drupal.org - March 2015

Thu, 09/04/2015 - 15:35

Look for links to our Strategic Roadmap highlighting how this work falls into our priorities set by the Drupal Association Board and Drupal.org Working Groups.

Better account creation Community User Role

The Community user role is the next step of a larger project of improving user role progression on Drupal.org. We began this work by streamlining the account creation and login workflow, which makes it easier for newcomers to jump into Drupal.org and contribute without losing context. The Community user role extends this work further by providing new tools to our existing community members and broadly expanding the base of users who can help shepherd newcomers into the community.

We started by simply adding a “New” indicator to all user accounts under 90 days old. It’s a small but critical change that helps long standing community members recognize newcomers to the fold, and encourages them to give these new users a warm welcome and a bit of extra help.

The basis of the Community user role is the old spam fighter role, which previously was manually granted to only a small subset of users. This role has primarily been responsible for confirming that other users on the site are not spammers (by granting them ‘trusted’, now called ‘confirmed’). The expanded Community role has the same job - to confirm that users are human - but will now be a role that can be automatically achieved when users reach a certain level of engagement on Drupal.org. We expect as many as 10,000 users to receive this role in the initial grant when the new feature is enabled. This should dramatically increase the attention paid to confirm new users, and make the process of confirming new users at code sprints and training days much, much easier.

The role itself has already been created, and the ‘confirm’ button appears on user profiles. Early April we’ll make sure that users with Community role can confirm users within comments as well - and then enable the initial role grant along with a communication to all Community users.

Organization and user profile improvements Issue Comment Attribution and maintainer Credit UI

In mid march we launched the UI for attributing comments as individuals - as individuals on behalf of an organization - or as individuals on behalf of an organization and/or a customer.

Since the release of the comment attribution feature 3 weeks ago, we’ve seen 5,564 comments in the issue queues attributed to an organization, representing around 14% of total comments in the issues queues.

We’ve also just launched the UI for project maintainers to take the attribution data and store final credit for the users and organizations.

All these steps bring a greater level of transparency and introspection to the project and let give us some real data about how Drupal is driven forward. Work on this attribution system will be ongoing, with an option to explicitly attribute comments as a volunteer being released shortly, and work towards integrating these attributions into commit messages coming up soon. We’ll also be updating both organization and user profiles to better display the work that has been credited in issues.

Making Drupal.org Search Usable

We have scheduled time with a community member that has extensive Solr configuration experience to see what quick wins we can achieve through better configuration.

More extensive search improvements are going to come out of the content strategy work as we define the most important information to show per content type when they appear as a result in search.

Content Strategy and Redesign

The draft Governance plan outline was finished and presented to Working Group members last month. This follows previously shared draft Drupal.org Content Model. Forum One was busy working on the first draft version of the updated Site map for Drupal.org.

In the second half of the month we were focused on working out detailed content types outline. We had a set of brainstorming meetings, where we discussed how all those potential new content types could be implemented technically. Those brainstorms, as well as helpful feedback from the Working Groups, led us to some of the new ideas and changes to the original plans. Hence we are now working on the next revision of all content strategy deliverables, revision which will incorporate all feedback from the Working Group members we have so far.

At this point all the different conversations about separate parts of the whole content strategy project fall into place and we see a clear picture of future state content strategy and information architecture of Drupal.org. We are excited to transfer this vision into a set of slides we can share with the Working Groups, Board and the Drupal Community.

DrupalCI (community initiative and Drupal 8 blocker)

We’ve just wrapped up hosting the DrupalCI sprint made possible by Drupal 8 accelerate. It was a herculean effort, but we made tremendous progress.

The architecture of the complete stack was built out, the test runner code built to it’s final form, containers for test environments created, and we ran through the complete chain from API → Test Runner → Results Site. There is still significant work ahead, but the community members who joined us in Portland did phenomenal work and put in long nights and extra days to produce an impressive testing suite.

Association staff architected the integration point between Drupal.org and the DrupalCI API and designed the UI for interacting with DrupalCI in the issue queues. On April 8th, association staff and the community volunteers we sprinted with met to recap the sprint and discuss the roadmap items that remain.

Special thanks to our community volunteers who sprinted with us in Portland: Jeremy Thorson, Nick Schuch, Bastian Widmer, Ricardo Amaro, Paul Mitchum, Mike Prasuhn,
Karoly Negyesi-- and to Shayamala Rajaram, Angie Byron, and Jonathan Hedstrom who helped us from afar!

Revenue-related projects (funding our work) Try Drupal

Early in April, we’ll be releasing some small changes to the Drupal.org home page -- changes that we will continue to iterate on over the course of the coming months. Primarily we’re trying to create rational pathways through the front page for each of our user personas, as well as updating the homepage to better promote and support some of our revenue programs. Try Drupal is one such program that serves both goals.

For Newcomers to the Drupal community Try Drupal will ensure that their first experience with Drupal is first class, by helping these users create a Drupal site in 20 minutes or less. In return, our partners providing this service get to put the best of their work forward together with the best of Drupal.

DrupalCon Barcelona

Even as we ramp up to DrupalCon Los Angeles in May, we’re getting ready to release the full site for DrupalCon Barcelona. This will be the second site on the new events.Drupal.org unified site, so we’ve be proving out some of the work we did to make it multi-event friendly, and making some additional adjustments and changes as we need them.

We’ll also be preparing for announcements for next year’s cons (Shh!) so there’s some additional UX and feature work underway to support those upcoming sites as well.

Sustaining Support and Maintenance Elections 2015

Elections were a great success this year. Improvements to the candidate profiles, ballot pages, and voting UI helped us reach our highest level of community engagement in Board elections. 24 candidates from 14 countries nominated, and with 1,432 ballots cast, we doubled our voter turnout compared to last year.

Congratulations to Addison Berry who joins as the new Director-at-Large from the community!

We’re collecting feedback on the experience from both candidates and voters and will continue to improve the elections process next year.

Fastly

The Drupal.org updates infrastructure (updates.drupal.org) is next to receive an architecture refresh. We are working to move the updates infrastructure to use a similar “instance purge” model, allowing for updates to be delivered more quickly. This also lets us set a very long TTL because new updates will purge the previous versions.

---
As always, we’d like to say thanks to all volunteers who are working with us and to the Drupal Association Supporters, who made it possible for us to work on these projects.

Follow us on Twitter for regular updates: @drupal_org, @drupal_infra.

Personal blog tags: whats new on Drupal.org
Categories: Elsewhere

Pages