Elsewhere

SitePoint PHP Drupal: Integrate Elasticsearch with Silex

Planet Drupal - 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

Planet Drupal - 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

Planet Drupal - 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

Planet Drupal - 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

Dirk Eddelbuettel: drat 0.0.3: More features, more fixes, more documentation

Planet Debian - Fri, 10/04/2015 - 14:14

Several weeks ago we introduced the drat package. Its name stands for drat R Archive Template, and it helps with easy-to-create and easy-to-use repositories for R packages. Two early blog posts describe drat: First Steps Towards Lightweight Repositories, and Publishing a Package, and since the previous release, a a guest post on drat was also added to the blog.

Several people have started to use drat to publish their packages, and this is a very encouraging sign. I also created a new repository and may have more to say about this in another post once I get time to write something up.

Today version 0.0.3 arrived on CRAN. It rounds out functionality, adds some fixes and brings more documentation:

  • git support via git2r is improved; it is still optional (ie commit=TRUE is needed when adding packages) but plan to expand it
  • several small bugs got fixed, including issues #9 and #7,
  • four new vignettes got added, including two guests posts by Steven and Colin as well as two focusing, respectively, on drat for authors and and drat for users.

The work on the vignettes is clearly in progress as Colin's guest post isn't really finished yet, and I am not too impressed with how the markdown is rendered at CRAN so some may still become pdf files instead.

Courtesy of CRANberries, there is a comparison to the previous release. More detailed information is on the drat page.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: Elsewhere

Lullabot: Mental Health and Open Source

Planet Drupal - 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!

Planet Drupal - 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

Planet Drupal - 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

Planet Drupal - 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

Mario Lang: A C++ sample collection

Planet Debian - Thu, 09/04/2015 - 21:10

I am one of those people that best learns from looking at examples. No matter if I am trying to learn a programming pattern/idiom, or a completely new library or framework. Documentation is good (if it is good!) for diving into the details, but to get me started, I always want to look at a self contained example so that I can get a picture of the thing in my head.

So I was very excited when a few days ago, CppSamples was announced on the ISO C++ Blog.

While it is a very young site, it already contains some very useful gems. It is maintained over at GitHub, so it is also rather easy to suggest new additions, or improve the existing examples by submitting a pull request.

Give it a try, it is really quite nice. In my book, the best resource I have found so far in 2015.

BTW, Debian has a standard location for finding examples provided by a package. It is /usr/share/doc/<package>/examples/. I consider that very useful.

Categories: Elsewhere

Drupal Watchdog: VIDEO: DrupalCon Amsterdam Interview: Dries Buytaert

Planet Drupal - 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

Planet Drupal - 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

Lars Wirzenius: DPL elections for 2015 are going on

Planet Debian - Thu, 09/04/2015 - 17:53

The Debian Project Leader electsions are going on. This is the yearly election for the leader, where members of the project vote for a new leader for a year. The debate this year seemed to me to be quite quiet, and voting activity seems to not be very high, either. Pity. Many years ago, the election period used to be quite energetic, bringing up some quite good viewpoints.

There seems to also not have been the usual repeat of the voting announcement, not sure what's going there. There's time until next Tuesday midnight (in the UTC time zone) to vote. Below are links to the vote page (with instructions for voting) and the (corrected) initial announcment.

I voted for Neil as my top candidate. I think he's got the best background and personality for being the leader of this project of ours.

Categories: Elsewhere

Drupal Watchdog: Testing 1 2 3

Planet Drupal - 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

Planet Drupal - 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

Daniel Pocock: Never fly Etihad again?

Planet Debian - Thu, 09/04/2015 - 17:05

This is the first time we've flown out to Australia with Etihad and it may also be the last.

We were due to fly back into Europe at CDG and head down to Lyon for the mini-DebConf this weekend.

Lets look at how our Etihad experience has worked out:

21:00 UTC Tuesday - waking up on Wednesday morning in Melbourne (UTC+10)

13:00 UTC Wednesday - leaving Melbourne about 11pm Wednesday night, a 12-13 hour flight to Abu Dhabi. We had heard about the air traffic control strikes in France (where we are going) and asked the airline if we should fly and they told us everything would be OK.

02:30 UTC Thursday - touchdown in Abu Dhabi, 6:30 am local time. Go to the transfer counter to ask for our boarding passes to CDG. At this stage, we were told that the connecting flight to CDG had been delayed 20 hours due to French strikes. As we are trying to reach Lyon for the mini-DebConf this weekend, we asked if we could leave Abu Dhabi on a 09:00 flight to Geneva. The Etihad staff told us to contact our travel agent (the flight was booked through Expedia) and for the next hour everybody's time was wasted making calls to Expedia who kept telling us to speak to Etihad. Whenever the Etihad customer service staff tried to speak to Expedia, the Expedia call center would hang up.

Eventually, the Etihad staff told us that the deadline for putting us on the Geneva flight had passed and we would be stuck in Abu Dhabi for at least 20 hours.

For flights to and from Europe, airlines have a responsibility to arrange hotels for passengers if there is a lengthy delay. If the airline is at fault, they must also pay some extra cash compensation but for a strike situation that is not applicable.

Etihad has repeatedly fobbed us off. Initially we were given vouchers for Burger King or a pizza slice and told to hang around the transfer counter.

By about 12:00 UTC (4pm local time, nine hours of waiting around the transfer counter) there was still no solution. One passenger was so upset that the airport security were called to speak to him and he was taken away. The airline staff kept giving excuses. Some passengers had been sent to a hotel but others left behind. I asked them again about our hotel and they kept trying to fob me off.

Faced with the possibility that I would miss two nights of sleep and eight hours time difference coming into Europe, I continued asking the Etihad staff to own up to their responsibilities and they eventually offered us access to their airport lounge. We discovered some other passengers in the lounge too, including the passenger who had earlier been escorted away by security.

This is unlike anything we've experienced with any other airline.

At every opportunity (the check-in at Melbourne, or when the Geneva flight was boarding), the airline has failed to make arrangements that would have avoided cost and inconvenience.

Assuming the flight goes ahead with a 20 hour delay, we will arrive in CDG some time Friday morning and not really sleep in a proper bed again until Friday night, about 70 hours after getting up in Melbourne on Wednesday morning. Thanks Etihad, you are a waking nightmare.

The airline has been evasive about how they will deal with our onward travel from CDG to Lyon. We had booked a TGV train ticket already but it is not valid after such a long delay and it seems quite possible that trains will be busier than usual thanks to the air traffic control strike. So we don't even know if we will be loitering around a Paris airport or railway station for hours on Friday and nobody from the airline or Expedia really seems to care.

Conclusion

The only conclusion I can reach from this experience is that Etihad can't be trusted, certainly not for long journies such as Australia to Europe. Having flown through Singapore, Kuala Lumpur and Hong Kong, I know that air passengers have plenty of options available and there are many airlines that do go the extra mile to look after passengers especially on such long journeys. The airline missed opportunities to re-route us at every opportunity. It looks like they help some passengers (like those who did get to hotels) but leave many others high and dry just to stay within their budget.

Categories: Elsewhere

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

Planet Drupal - 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

Planet Drupal - 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

Code Karate: Creating dynamic allowed values options for an entity field

Planet Drupal - Thu, 09/04/2015 - 14:59

If you are building out a Drupal 7 site you may some day run into a situation where you need to h

Categories: Elsewhere

Midwestern Mac, LLC: Solr for Drupal Developers, Part 3: Testing Solr locally

Planet Drupal - Thu, 09/04/2015 - 05:05

In earlier Solr for Drupal Developers posts, you learned about Apache Solr and it's history in and integration with Drupal. In this post, I'm going to walk you through a quick guide to getting Apache Solr running on your local workstation so you can test it out with a Drupal site you're working on.

The guide below is for those using Mac or Linux workstations, but if you're using Windows (or even if you run Mac or Linux), you can use Drupal VM instead, which optionally installs Apache Solr alongside Drupal.

As an aside, I am writing this series of blog posts from the perspective of a Drupal developer who has worked with large-scale, highly customized Solr search for Mercy (example), and with a variety of small-to-medium sites who are using Hosted Apache Solr, a service I've been running as part of Midwestern Mac since early 2011.

Installing Apache Solr in a Virtual Machine

Apache Solr can be run directly from any computer that has Java 1.7 or later, so technically you could run it on any modern Mac, Windows, or Linux workstation natively. But to keep your local workstation cleaner, and to save time and hassle (especially if you don't want to kludge your computer with a Java runtime!), this guide will show you how to set up an Apache Solr virtual machine using Vagrant, VirtualBox, and Ansible.

Let's get started:

Categories: Elsewhere

Pages

Subscribe to jfhovinne aggregator - Elsewhere