Web tech note–Cloudflare review

Cloudflare is a free or cheap CDN. This review relates to the free version. There are plenty of other explanations of how this works, so I will not repeat them here, beyond saying that it is a network of servers around the world which should serve static content, such as images and css files, from a server local to the client. Cloudflare also increases security by challenging automated attempts to access the site from spam and hacking bots.

My experiences with Cloudflare.

There is a free version, and a ‘Pro’ version which provides prefetching of web pages it thinks the client may want, and enhanced security. There is a saying that if it sounds too good to be true, it probably is. However, during the dot com bubble there were many good free services. Whether or not Cloudflare will be able to continue this business model, who knows. For now it seems excellent. I have not been with Cloudflare long enough to comment on their Analytics.

Downsides

I have only had an account for a couple of days and comment on this. The additional layer of caching is extremely irritating when you are constantly editing the site, notwithstanding that Cloudflare has a development mode.

Cutting spam

My website is fairly new and the bots have not found it yet. I do not yet know whether I need anything over and above the spam protection already installed. Other reviewers report positively on this aspect of Cloudflare, which has to be worth having, provided there are no false positives, challenging genuine visitors. I have not been using Cloudflare long enough to know, and of course one rarely gets to hear of a genuine visitor turned away.

Cloudflare adds to, but does not replace, tuning the server and site for speed

I have done a lot of work to get this website working fast. There is no substitute for tuning the server and website by hand for your needs. Cloudflare is only serving static content, so the speed of generation of your page, by WordPress or Drupal or whatever CMS you are using, is still down to your own server. If you are going to tune that server to be fast, and if you are using Cloudflare, you need to think through the additional implications for how to set up the server, rather than just switch on Cloudflare and forget it. Having said that, if your approach is to make the most of the server or hosting account you have, without a lot of tinkering to improve performance, it is safe to just switch Cloudflare on, and you can reasonably expect an improvement in performance. That is especially true if you are on a low grade hosting account or an overworked server.

Cloudflare support

The emails back from staff are friendly and helpful. When I sent a request at the beginning of the weekend, I had to wait until Monday for a reply. I cannot complain about that with a free service! Even with their paid service, considering its low price, this would be acceptable IMO.

Speed tests on Cloudflare

Impressionistic speed tests, with and without Cloudflare, from same location and time of day, two days running: very hard to say whether Cloudflare improves speed, but on the whole page load times using Cloudflare have been a positive experience.

Timing page load with Firebug, with and without Cloudflare, from same location and time of day: hard to judge because the browser cache may contribute to load times, and various other factors, especially with multi-layer caching on the server.

After several page views I was getting these average times (averages of load times to view seven or eight different pages on the site):

page size first page lookup browser refresh
with
Cloudflare: 8.34m 1.63s (onload 2.73s) 2.35s (onload 4.4s)
without
Cloudflare: 6.1mb 1.32s (onload 2.48s) 1.65s (onload 4.02s)

The first page lookup might have been pulling some files from the browser cache, so I take the figures for refresh times as more reliable. On this basis, Cloudflare wins.

Webpagetest.com results, testing from Paris, and Dulles TX. I ran about 15 of these tests. Results are variable, of course.

The results without Cloudflare, for the dedicated server, running Varnish (but a poor hit rate for WordPress, a problem I am working on!), and with W3 Total Cache page cache enabled, gave speeds in the range of 2.3s-3.7s (excluding a few slow ‘outliers’). The slowest page loads I saw with Cloudflare were 2.3s. If they are claiming an average improvement of performance of 30%, I would not argue.

Takeaway conclusions from review of use of Cloudflare on Classics Blog

Cloudflare is worth using because it gives some speed advantage. It adds to rather than replaces the need to tune your website and server. It is not only for sites on slow servers, either (though keeping bots out and saving bandwidth is more important if you are underpowered). The claimed security advantage and the analytics are probably worth having but it is too soon for me judge. Cloudflare support is good considering the price. Downtime: who knows? So far, so good.

Quote of the month–Greek Accents

Quote

In bidding a last farewell to a subject in which I never took
more than a languid interest, I may be permitted to say that in
England, at all events, every man will accent his Greek properly
who wishes to stand well with the world. He whose accents
are irreproachable may indeed be no better than a heathen, but
concerning that man who misplaces them, or, worse still, altogether
omits them, damaging inferences will certainly be drawn,
and in most instances with justice.

H. W. Chandler A Practical Introduction to Greek Accentuation (Second ed.) (Oxford: 1881), from Preface to the Second Edition

 

The Cambridge Latin Course: Failure and Survival

Featured

My first Latin lesson was in a classroom constructed almost entirely of asbestos. The boys (it was a boys’ school) called the block ‘The Cowsheds.’ I was 12. That year, my school became an early adopter of the Cambridge Latin Course. Like asbestos as a building material for schools, The Cambridge Latin Course was as misconceived as it was innovative. In order to survive, the course, and its early students, had to jettison (you could say, ‘betray’) its founding philosophy.

The first lesson was supposed to start with the teacher playing a tape. Our teacher had had difficulty furnishing himself with a cassette player, so he read the opening pages of the course himself. The school’s three full-time Classics teachers had all retrained to use the ‘authentic’ pronunciation propounded by Sydney Allen in Vox Latina (there is a copy of Vox Latina on Google Books). Nevertheless, their vowels were reassuringly English. That struck me as one of the good things about Latin. The tapes, when we heard them, were read in a (to us) grotesque and almost impenetrable Italianate accent.

Then one turned to the book. Or pamphlet, rather. Each unit was divided into something like ten modules, and there was a stapled pamphlet for each. The first ones had orange covers. Little pictures like a comic, with legends along the lines of ‘Caecilius est pater’ and ‘Metella est mater,’ mimicked the ‘do and say’ method used by some modern language teachers. It described a household in Pompeii. Conveniently, there was a slave, whose name slips my mind, and a fetching ancilla, who presumably performed the same kinds of service for the head of the household as a Swedish au pair.

a fecthing ancilla

A fetching ancilla: but what is the mistress saying to her? The Cambridge Latin Course made slavery seem cuddly.

This approach got you interested in Latin. When an enemy of Latin told me,

Latin is a dead language,

As dead as dead can be,

It killed the ancient Romans,

And now it’s killing me,

I was surprised. Latin was fun. I looked forward to the next unit, with differently-coloured pamphlets.

The pamphlets contained fairly huge vocabulary lists, with ostensibly lexical items like ‘ego sum=I am,’ ‘id est=it is,’ and ‘ita vero=yes.’ (Did first century Romans really not have a word for ‘yes’?) At the end they would slip in a little grammar. For example the singular of a second declension noun. Terms like declension were eschewed though. Vocative was ignored. Nominative, accusative, dative, genitive and ablative were forms A, B, C, D and E. The unconventional order together with unconventional names made these snippets of grammar impossibly confusing for a student to use in conjunction with any ordinary grammar book. But who cared? We were learning grammar by osmosis.

Eventually were given a reference grammar. Very patchy in coverage, the term ‘reference grammar’ indicated that the manner it which was supposed to be used was quite different than the use of Kennedy’s ‘primer.’ It was to refresh the memory. No one thought of learning paradigms, because they had been picked up by hearing, reading, and a quick scan of each pamphlet’s grammar section for the week or so during which it was on one’s hands.

This, of course, failed. In our fourth year of Latin it was time for the exams which one takes at 16 (at that time in England and Wales called O-levels, where O was for ‘ordinary’). In keeping with the presentation of Latin as familiar and personal, the set texts were selections from Catullus, and from Pliny’s letters. We were of course wholly unable to translate these with that grammar we had absorbed by osmosis from the entertaining pamphlets, and vaguely Mediterranean-sounding tapes. The teacher provided a translation, and any boy of reasonable diligence could get it by heart well enough to pass his Latin O-level.

The following year I started my A-level. It immediately became apparent that whereas a boy who had studied under the old system (which the school had abandoned the previous year) could construe and translate easier passages of Sallust, Caesar, Tacitus, Vergil and Ovid, we could not. The Cambridge Latin Course had spent four years convincing us that Latin was a great subject. Now we had to start learning it, hindered by our vague knowledge of bits of mis-ordered and mis-named paradigms. The idea that the tenses and moods of the Latin verb could be set out in tabular form, or that there can be said to be five declensions, was a revelation, and very helpful. I assumed the Cambridge Latin Course would die. It flourished by keeping its engaging materials, while gradually abandoning its core ideals.

Where did it go wrong? The spoken element was admirable, and there should have been far more of it, not less. A few minutes of a tape cannot compare with imbibing a language by hearing daily. But a catastrophic mistake was to remove the attempt to teach us to write Latin. What is the logic of teaching Latin like a living language, if you remove all writing skills, presumably on the basis that they involve learning a little syntax? Finally, for adults (even for 12 year olds), learning an inflected language without a little rote learning of accidence does not work. I picked up German from the TV, but I have read a few tables of articles, adjective inflections, and verbs and memorised them.

You could say the Cambridge Latin Course changed my life. It ensured I was not put off Latin, but it left me with lot a remedial work to do which probably changed the course of my school and university career, and which for a while caused me to go to the opposite extreme and adopt vigorously traditionalist attitudes towards philology and the learning of ancient languages. I did, and to some extent still do, resent the wasted years. But school was like that generally. If the Cambridge Latin Course is now helping students learn Latin well, it must be valued and praised.

Note on the Cambridge Latin Course today

This has  been a review of the Cambridge Latin Course as it was in its early days. Here is the homepage of the Cambridge Schools Classics Project, including the now-mature Cambridge Latin Course, which has to a great extent learnt from its youthful mistakes.

Web tech note–configuring Varnish 3 to cache with Drupal and WordPress

I am a fan of Varnish caching reverse proxy. It is running on the servier where this blog is hosted. In theory it is not very relevant for this site because I am using Cloudflare, a free CDN which claims to cache the website. I am not sure how how long they keep the cache, but every request I make for a page from a logged-out browser is in fact hitting my server, so server speed is important.

WordPress is anyway fast and offers sophisticated caching with the W3 Total Cache plugin (or various other plugins which are almost as effective and simpler to use), but nothing beats Varnish serving pages from the Varnish cache for speed, particulary if you have a busy site (as I hope Classics Blog will be: yes, a server technology which should stay reasonably functional for 1,000,000 page requests per day is a little excessive at present!).

My server has several Drupal sites on it, in particular an online shop I built for a bookseller friend, P J Hilton, so Varnish has to be configured to work with Drupal. Every time you upgrade Varnish, they seem to change the syntax of the configuration language, so you have to amend the config file, which is a pain. Anyway, now I am using the new Varnish 3, and have finally got it to work, using the VCL config file which can be downloaded here. The file is called drupal_trial because writing it has been a trial (I regret upgrading from Varnish 2, which was working fine). And because it is a work in progress, I am trying things out.

What about WordPress? WordPress seems to set a PHPSESSID cookie for non-logged-in users, and other cookies. In any event, the Drupal 6 and Drupal 7 sites were being cached nicely with this Varnish config, but I was struggling to get clssicsbog.net (on WordPress) to cache.

The quick and dirty solution was to strip all cookies for non-logged-in users on a per-URL basis (i.e. for http://classcsblog.net only).

Pop this into a Varnish config file basically written for Drupal:

# remove cookies for my WordPress site, normalize namespace first
if (req.http.host ~ “(?i)^(www.)?classcsblog.net”) {
set req.http.host = “classicsblog.net”;
}
if (req.http.host == “classicsblog.net”) {
if (!(req.url ~ “wp-(login|admin)”)) {
remove req.http.Cookie;
}
}

It works!

Scholia Reviews, ed. John Hilton

Before I get to Scholia Reviews, edited by John Hilton, a quick update. If the blog has been slow lately, I have not been inactive. A post on the rained-off permiere of the Mörbische Seefestspiel (ORF broadcast the dress-rehearsal), and the Bregenzer Fesspiel, about to begin, was lost during a database restore. This is all brought on by technical problems caused by my constant efforts to tune the (already good) server which hosts this blog (posts by John_B here in case anyone is interested).

Thanks to John Hilton for your comment on Scholarship & Imagination: Should a Classics Curriculum include Visiting Greece and Rome? John is on the staff at University of Natal, Durban. We met when were were both writing commentaries on parts of Heliodorus Aethiopica for our PhD dissertations. A lot of John’s work has an African dimension (although it is unlikely Heliodorus ever visited Ethiopia). Incidentally, he has written about the history of the use of the name Anzania. Last time we spoke about his work, he was working on the influence of Roman law on slavery, on the development of Dutch law to deal with slavery in South Africa.

Another of John’s projects is Scholia Reviews, which has been producing admirable reviews on new Classics books since 1993 (and to which I have contributed, which reminds me, there are some books waiting to be reviewed….).

I have just read John Jacob’s review of David Butterfield and Christopher Stray (edd.), A. E. Housman: Classical Scholar. London: 2009 (Scholia Reviews, click the link for 2011 reviews). It is odd how much affection Housman commands: when depressed, if I want to feel more depressed I might read Housman’s verse, but if I want to be cheered up I have, from time to time, turned to vicious sarcasm contained in the Introduction to his edition of Lucan. BTW, afficionados say he liked it to be pronouced Hoos-man not House-man.

Anway, I just started reading John Hilton’s own review Susan A. Stephens and Phiroze Vasunia, Classics and Colonial Cultures. Oxford, 2010 (Scholia Reviews, click the link for 2010 reviews) and I am spellbound: if only the traditions of excellence in the major centres of scholarship, and the culturally diverse innovationism of outlying departments and students of Classics had more contact, all would benefit. There is some contact and some mutual respect, but nothing like enough. That is for another blog post: now to finish reading John’s review.