Make your own eBooks

Use our Remix App to mix & match content. In minutes make your own course packs, training bundles, custom travel guides, you name it. Even add your own title & cover.


Slices & Articles Get by the slice or add to your own ebook

Medium 9781449304195

10. Server-Side YUI

Evan Goer Yahoo Press ePub

For many frontend engineers, running JavaScript on the server is an attractive notion. Wouldnt it be nice if you didnt have to write reams of code in JavaScript on the client, and then have to write much of that logic again in some other language for the server?

The good news for those engineers is that in recent years, the practice of writing server-side JavaScript has started to cross over into the mainstream. Clearly it hasnt become mainstream yet, as we still have to constantly say server-side JavaScript instead of just JavaScript. Nevertheless, the server offers us the opportunity to write some really interesting JavaScript applications. And as a framework designed to tame JavaScript applications, it should be no surprise that YUI has focused on the server as one of its primary environments.

The specific server-side environment YUI targets is the popular Node.js framework. In a nutshell, Node.js is a JavaScript platform built on top of the V8 JavaScript runtime, with libraries for HTTP and other types of I/O. Just like a browser, Node.js runs in an event loop. And just like the browser, the primary way to pass messages and perform other I/O interactions in Node.js is to set listeners and respond asynchronously with callback functions. For many longtime backend engineers, writing asynchronous code in an event loop feels deeply weird. But for frontend engineers, this model is strikingly familiar.

See All Chapters
Medium 9780596005733

1. Introduction

Dan Tow O'Reilly Media ePub

Well begun is half done.

This book is for readers who already know SQL and have an opportunity to tune SQL or the database where the SQL executes. It includes specific techniques for tuning on Oracle, Microsoft SQL Server, and IBM DB2. However, the main problem of SQL tuning is finding the optimum path to the data. (The path to the data is known as the execution plan.) This optimum path is virtually independent of the database vendor, and most of this book covers a vendor-independent solution to that problem.

The least interesting, easiest parts of the SQL tuning problem are vendor-specific techniques for viewing and controlling execution plans. For completeness, this book covers these parts of SQL tuning as well, for Oracle, Microsoft SQL Server, and IBM DB2. Even on other databases, though (and on the original databases, as new releases bring change), the vendor-independent core of this book will still apply. As such, this book is fairly universal and timeless, as computer science texts go. I have used the method at the core of this book for 10 years, on four different vendors' databases, and I expect it to apply for at least another 10 years. You can always use your own vendor's current documentation (usually available online) to review the comparatively simple, release-dependent, vendor-specific techniques for viewing and controlling execution plans.

See All Chapters
Medium 9780596521974

8. MapReduce Features

Tom White O'Reilly Media ePub

This chapter looks at some of the more advanced features of MapReduce, including counters and sorting and joining datasets.

There are often things you would like to know about the data you are analyzing but which are peripheral to the analysis you are performing. For example, if you were counting invalid records, and discovered that the proportion of invalid records in the whole dataset was very high, you might be prompted to check why so many records were being marked as invalidperhaps there is a bug in the part of the program that detects invalid records? Or if the data were of poor quality and genuinely did have very many invalid records, after discovering this, you might decide to increase the size of the dataset so that the number of good records was large enough for meaningful analysis.

Counters are a useful channel for gathering statistics about the job: for quality control, or for application level-statistics. They are also useful for problem diagnosis. If you are tempted to put a log message into your map or reduce task, then it is often better to see whether you can use a counter instead to record that a particular condition occurred. In addition to counter values being much easier to retrieve than log output for large distributed jobs, you get a record of the number of times that condition occurred, which is more work to obtain from a set of logfiles.

See All Chapters
Medium 9780253354839

2. Enemy of the Species

Catriona Mortimer-Sandilands Indiana University Press ePub


For at least a decade, a common strategy for promoting acceptance of racial, ethnic, and religious minorities in many corporate and educational institutions has been to insist that diversity in any population is superior to homogeneity. Homogeneity, it is said, tends toward stagnation. If the “population” is a work team, for example, advocates of diversity suggest that homogeneity of perspective is likely to equal redundancy of ideas and approaches—in other words, impoverished creativity leading to reduced productivity. If the population is a student body, advocates suggest that homogeneity of background and social position is likely to result in reinforcement of received opinions rather than educational challenge and advancement. Diversity, then, is a crucial factor in healthy development; it is a stimulus to improvement and a defense against the stupidity of unquestioned routine.

Some advocates for lgbtq inclusion in corporate and educational institutions have claimed the same benefits for sexual diversity and diversity of gender expression. Steven Keyes, vice president for compensation, benefits, and human resources policy at Nationwide Insurance, explains, “Having a corporate culture that embraces diversity improves the productivity of our associates, helps the company recruit the best talent and makes Nationwide more competitive in the insurance and financial services industry” (Keyes 2007). In my home university, the University of Richmond, lgbtq and allied groups have spent years petitioning for inclusion in the institution’s ongoing “diversity initiative” in the hope of receiving recognition, material support for programming, and protection from discrimination and harassment. Institutions such as mine consider diversity valuable, so the most obvious way to persuade institutional elites to accept and protect queer people is to present ourselves as representatives of a form of diversity, sexual diversity.

See All Chapters
Medium 9780253017697

6 Boulogne

Otto Schrag Indiana University Press ePub

In theory we owned the car, but our officer-driver, a tall man of patronizing dignity, treated it as if it were his, as in some practical way it was. We had become totally dependent not only on the car but on his ability to make it move. He seemed to know it intimately, understood its moods, and knew what to kick or shake or adjust to make it start after it sputtered out. He was cordial, courtly, even relaxed, but he would not let himself be rushed. “Madame must understand. . . . But Madame must surely know.”

It was now my mother who was in a hurry; somewhere during one of the many repair stops on the way south into Boulogne she had heard a rumor that the bridges over the Somme, some ninety kilometers to the south, would be blown up the next day, and she wanted to drive through the night. She had a feeling, she said, that the information was correct. But he refused; he wanted to get some rest. Surely Madame must know that in wartime it is dangerous to drive at night.

By the time we reached Boulogne, the city and its port had been subject to intermittent German bombardment for a week. In peacetime it had been a fishing port and a major embarkation point for Channel traffic to Dover and Folkestone and, like Calais, a landing place for British tourists headed south. In 1804, Napoleon had assembled his grande armée there—some 200,000 men—for an invasion of England, but the plan was so ill-conceived that it was aborted even before Nelson’s defeat of the French at Trafalgar guaranteed the British control of the Channel. Many years later, I learned that its casino had once made it also a major destination for French vacationers.

See All Chapters

See All Slices