Shared posts

15 May 01:25

Essa é dedicada aos colegas da engenharia de computação unicamp, turma de 92 :)

by Eduardo Maçan

Essa é dedicada  aos colegas da engenharia de computação unicamp, turma de 92 :)

Essa é dedicada aos colegas da engenharia de computação unicamp, turma de 92 :)

08 May 09:42

(FT3) Some more tidbits about the “geomembrane” Olympus sensor.

by 43rumors

Share

EM1

Source “Simon” added some info to his previous “geomembrane” rumor (43rumors post here):

I asked again to explain me what ment “Geomembrane”. He said, that this is a shortcut for “Gyro Electodes Organic Membran”. That means for non engineers like me, that you can upgrade the “view angle”for the sensor from (EM-1)today 36 ° to the new sensor 58°. This leads to an increasing absorption capability. BUT again, this for the future System expecting announced in September 2016 !!

As fare as i understood it right, that means the Sensor will make 10 photos to one high resolution picture. With the em-5 mkII You Need a tripod, with the new em-1 you Can Do it freehand.


For sources: Sources can send me anonymous info at 43rumors@gmail.com (create a fake gmail account) or via contact form you see on the right sidebar. Thanks!

To get notified on all upcoming news and rumors be sure to subscribe on 43rumors here:
RSS feed: http://www.43rumors.com/feed/
Facebook: https://www.facebook.com/43rumors
Twitter: https://twitter.com/43rumors
GooglePlus: https://plus.google.com/+43rumors/posts

Rumors classification explained (FT= FourThirds):
FT1=1-20% chance the rumor is correct
FT2=21-40% chance the rumor is correct
FT3=41-60% chance the rumor is correct
FT4=61-80% chance the rumor is correct
FT5=81-99% chance the rumor is correct

Share

03 May 23:37

http://feedproxy.google.com/~r/EduardoMacan/~3/pQfjbabyTq0/

by Eduardo Maçan

A organização "Transparência Internacional" divulgou a atualização do seu ranking de percepção da corrupção. Aqui uma apresentação no formato de mapa interativo.

Entre nossos vizinhos, perdemos de goleada para Uruguai e Chile, mas somos menos corruptos que os outros (A Guiana entrou no índice da França). O país mais corrupto da América do Sul é a Venezuela (que surpresa!) bem próxima da Coréia do Norte, lá na lanterna.

Quanto mais vermelho-escuro no mapa, mais corrupto.

http://i100.independent.co.uk/article/the-most-corrupt-countries-in-the-world-ranked-in-order--xJUZ5u9j_x

The most corrupt countries in the world, ranked in order

---The most corrupt countries in the world, ranked in orderPosted 5 months ago by Evan Bartlett in newsUpvoteUpvoted Click on the map to scroll Transparency International has released its annual Corruption Perceptions Index, which ranks 175 countries on their levels of public sector corruption. A st…

30 Apr 17:22

Debian GNU/Hurd 2015 released

by ris
Debian GNU/Hurd 2015 has been released. "This is a snapshot of Debian "sid" at the time of the stable Debian "jessie" release (April 2015), so it is mostly based on the same sources. It is not an official Debian release, but it is an official Debian GNU/Hurd port release."
27 Apr 13:08

"O melhor modelo de processos é, com frequência, prontamente derrotado pelo mau comportamento humano" Communications of the ACM, vol 58, pg 63.

by Eduardo Maçan

"O melhor modelo de processos é, com frequência,  prontamente derrotado pelo mau comportamento humano" Communications of the ACM, vol 58, pg 63.

"O melhor modelo de processos é, com frequência, prontamente derrotado pelo mau comportamento humano" Communications of the ACM, vol 58, pg 63.

22 Apr 21:05

Armenia’s Genocide and Obama’s Shame

by David P. Goldman

Despite a 2008 campaign promise “to recognize the Armenian genocide,” President Obama refuses to follow Pope Francis’ example and call the murder of 1.5 million Armenian civilians by its right name. Of all the despicable things this administration has done, this one stands out for vile hypocrisy. CNN reports:

President Barack Obama, wary of damaging relations with Turkey amid growing unrest in the Middle East, won’t use the 100th anniversary of the massacre of Armenians under the Ottoman Empire to declare the brutal episode a genocide.

Despite Obama’s campaign promise in 2008 to “recognize the Armenian Genocide” as president, the White House on Tuesday issued a carefully worded statement on a high-level administration meeting with Armenian groups that avoided using the term “genocide.”

An administration official said Obama, who will mark the centennial this Friday, would similarly avoid using the word. The term angers Ankara, which denies that Ottoman Turks carried out a genocide.

“President Obama’s surrender to Turkey represents a national disgrace. It is, very simply, a betrayal of truth, a betrayal of trust,” said Ken Hachikian, the chairman of the Armenian National Committee of America.

Despite the threat of retaliation against Turkey’s small and defenseless Christian community–the remnant of what once was a fifth of the Turkish population–the Vatican has had the courage to use the word genocide, and first did so in 2000. Not Obama, whose concern for Muslim sensibilities outweighs every other consideration.

If you don’t think telling the truth matters, think again: The world’s disgusting indifference to the Armenian genocide is what convinced Adolf Hitler that he could get away with genocide, too. This is what Hitler said about the matter in 1939:

My decision to attack Poland was arrived at last spring. Originally, I feared that the political constellation would compel me to strike simultaneously at England, Russia, France, and Poland. Even this risk would have had to be taken….Our strength consists in our speed and in our brutality. Genghis Khan led millions of women and children to slaughter — with premeditation and a happy heart. History sees in him solely the founder of a state. It’s a matter of indifference to me what a weak western European civilization will say about me.

I have issued the command — and I’ll have anybody who utters but one word of criticism executed by a firing squad — that our war aim does not consist in reaching certain lines, but in the physical destruction of the enemy. Accordingly, I have placed my death-head formations in readiness — for the present only in the East — with orders to them to send to death mercilessly and without compassion, men, women, and children of Polish derivation and language. Only thus shall we gain the living space (Lebensraum)which we need. Who, after all, speaks today of the annihilation of the Armenians?

43 countries–including Russia, Italyk, France, Sweden Poland and the Netherlands–recognize the Armenian genocide. Not the United States of America. It is a shame and disgrace.

17 Apr 13:48

http://feedproxy.google.com/~r/EduardoMacan/~3/A800RN0TH1o/

by Eduardo Maçan

Vixe, mais um fundo de pensão dilapidado? Que inocência da minha parte achar que fosse só o fundo de pensão dos correios. É fácil recompô-lo! Como no caso dos correios basta descontar uma parte do salário de todos os contribuintes do fundo durante alguns anos.

Se você não leu "A Revolução dos Bichos", aqui vai um spoiler: É por essas e outras que o cavalo morre.

Gilberto Dimenstein

Preparem-se para esse escândalo: descobriram que o fundo de pensão da Petrobras ( Petros), dirigido por sindicalistas ligados à CUT ( ou seja PT), produziu um rombo de mais de R$ 6 bilhões. Isso mesmo, R$ 6 bilhões. Suspeita-se de um misto de roubalheira com má gestão, além de uso político dos recursos.
Só espero que não venham cobrar essa fatura da sociedade. Processem os irresponsáveis. Ou cubram a despesa com os funcionários.
Quando eu alertava que o aparelhamento da máquina pública sairia caro, confesso que não imaginava que seria tão caro.

13 Apr 16:18

Blackmagic announces two amazing Micro Cinema Cameras with MFT mount!

by 43rumors

Share

Bildschirmfoto 2015-04-13 um 18.18.32

We have two new Micro Four Thirds cameras from Blackmagic. All the info can be read here:
Blackmagic Micro Cinema Camera info (Click here).
Blackmagic Micro Studio Camera 4K info (Click here).

You can preorder the camera at BHphoto (Click here) and Adorama (Click here).

From the press text:

Introducing the Blackmagic Micro Cinema Camera, a miniaturized Super 16mm, professional digital film camera that is designed to be operated remotely and capture action anywhere! A revolutionary built in expansion port has PWM and S.Bus inputs so you can use a model airplane remote control to operate the camera wirelessly. Imagine adjusting focus, iris and zoom wirelessly! The Micro Cinema Camera is a true digital film camera that features built in RAW and ProRes recording, 13 stops of dynamic range, a global shutter and an MFT lens mount. You get a true digital film camera that can go where no other digital film camera can!

Bildschirmfoto 2015-04-13 um 18.21.35

The Super 16 sensor is full 1080 HD resolution and has an incredible 13 stops of dynamic range and global shutter up to 30 frames per second. Most DSLR and action cameras use a rolling shutter that exposes different parts of the image in fractions of a second, causing video to appear skewed or wobbly when the camera moves or vibrates. The Blackmagic Micro Cinema Camera’s global shutter acts more like a still camera, exposing the entire image at the same time so you get distortion and ripple free video! With an ISO up to 1600, the Blackmagic Micro Cinema Camera also gives you great quality, even in locations with low lighting.

-

Share

12 Apr 01:59

Why Don’t Americans Trust Republicans on Foreign Policy?

by David P. Goldman

Riddle me this, fellow Republicans. An NBC survey April 9 reports that a huge majority (70%) of Americans doubt that Iran will abide by any agreement to limit its nuclear arms–but a majority (54%) still thinks Obama will do a better job than the Republicans in dealing with Iran!

A majority of Americans – 54 percent – trust Barack Obama to do a better job handling an agreement with Iran over its nuclear program, compared to 42 percent who say they trust the Republicans in Congress. But nearly 7 in 10 Americans say that Iran is not likely to abide by the agreement that has been reached.

Fifty-three percent think Iranian nukes are a “major threat,” and only 37% think they are a “minor threat.” Most Americans, in short, think Iran is a major threat to American security and think that Obama’s nuclear deal is a joke–but they still want Obama in charge of the negotiations, not us.

Maybe NBC made the numbers up. Maybe a proofreader got the numbers reversed. And maybe pigs will sprout wings.

There is a much simpler explanation: Most Americans don’t trust Republicans on matters of war and peace. Not after the nation-building disasters in Iraq and Afghanistan, that is. Why should they trust us? Our leadership has never admitted it made a mistake. Sen. Ted Cruz, to be sure, had the gumption last fall to say that “we got too involved in nation-building” and that “we should not be trying to turn Iraq into Switzerland”–and was excoriated for his trouble by the Bushies. The Republican mainstream is too busy trying to defend the Bush record to address the distrust of American voters.

One gets weary and grows shrill sounding the same note for a decade. I wish the problem would go away.  A couple of weeks ago a friend who served in senior defense positions in the Bush administration remonstrated, “Why do we have to worry about what mistakes were made back then?” The American public doesn’t remember a lot, but it does remember the disruption of millions of lives after the deployment of 2.6 million Americans in Iraq and Afghanistan–not to mention 6,000 dead, 52,000 wounded in action, and hundreds of thousands of other injuries.

11 Apr 18:18

David McGoveran Interview

by noreply@blogger.com (Fabian Pascal)
DBDebunk readers should know of David McGoveran (see his bibliography under FUNDAMENTALS), whose work on relational theory and practice has appeared or been discussed on the old site and here over the years. On more than one occasion I mentioned the Principle of Orthogonal Design (POOD) identified by David, who had published several years ago work he did on the subject with Chris Date. The POOD has relevance to updating relations and particularly views and led to Date's VIEW UPDATING AND RELATIONAL THEORY book .

I recently mentioned that David's and Date's understandings on POOD have diverged since their joint effort--currently Date and Darwen reject the POOD as formulated then and David has problems with Date's understanding of it and with their THE THIRD MANIFESTO (TTM) book.

David is working on a book tentatively titled LOGIC FOR SERIOUS DATABASE FOLKS where he will detail his views on RDM in general and POOD and view updating in particular, but in the meantime I asked him to publish an early draft of a chapter on the latter subject, which he did-- Can All Relations Be Updated?--and which he has just revised.

He has asked me to post a clarification on the nature of the differences with Date and Darwen (see next) and I used the opportunity to interview him about his impressive career, which covers much more than database management. David provided written answers to questions.

Read more »
07 Apr 23:00

Open Standards around the world

Document Freedom Day is the day when we talk about Open Standards around the world. In 2015, all together, we turned this day once more into a global event with 63 local event organisers in 31 countries on 4 continents. Volunteers around the world, accompanied by international organisations as well as politicians and public services joined our demand for document freedom. Read our report to see what happened during Document Freedom Day 2015.

Support FSFE, join the Fellowship
Make a one time donation

07 Apr 16:54

A Case for Preemptive War Against Iran

by David P. Goldman

Crossposted from Asia Times

 

Most of the great wars of the past would have been far less bloody had they begun sooner. That emphatically is true of the First World War: if Germany had launched a preemptive assault on France during the First Morocco Crisis of 1905, before Britain had signed the Entente Cordiale with France and while Russia was busy with an internal rebellion, the result would have been a repeat of the Franco-Prussian War of 1870 rather than the ghastly war of attrition that all but ruined Western civilization. It was a tragedy that the vacillating Kaiser Wilhelm II rejected the counsel of his general staff and kept the peace. I do not mean to impute moral superiority to Wilhelmine Germany, but to argue, simply, that swift victory by one side was preferable to what followed. It is hardly controversial to argue that Britain and France should have prepared for war with Germany and preempted Hitler’s ambitions no later than the 1936 re-occupation of the Rhineland.

The West likes to think that it has attained a higher plane of rationality, after the great blood-lettings of its past–the two World Wars of the last century, the Napoleonic Wars of the 19th century, and the Thirty Years’ War of the 17th century. This is a self-consoling delusion: it is not more rational, but only enervated. It confuses its own lack of interest in the future with moderation. Willful blindness about our own past blinds us to the character of the prospective combatants in the Middle East. In 1914 Europe had achieved an unprecedented prosperity, dependent on a web of commercial relations binding all the European nations into a single economic organism. The peoples of Europe had less to fear from hunger, disease, or domestic violence than any peoples in human history. Europe’s monarchies, moreover, were linked by family ties more closely than at any time in the past. Nonetheless the Europeans chose to eschew their prosperity and sacrifice themselves in now-incomprehensible numbers–for what? For each nation’s belief in its own Chosenness, as I argued in my 2011 book, How Civilizations Die.

Francesco Sisci argues that the economic development of the Eurasian continent under the benign influence of China’s “One Belt, One Road” program may be an important force for peace. That view was also expressed by China’s special envoy for the Middle East, Gong Xiaosheng. The question to ask is why Europe’s prosperity and economic interdependence failed to hinder the outbreak of the First World War. China’s view of the world is rational, but rational to a fault: the Chinese, who have created a civilization that has endured thousands of years by integrating different peoples and suppressing ethnic differences, fail to appreciate how irrationally the barbarians outside their civilization may behave. There is a path towards a Pax Sinica in the Middle East, I argued in 2013, but it requires the calculated use of Chinese influence to frighten the Iranians into behaving themselves. China has concentrated on economic diplomacy, and succeeded brilliantly in the case of the Asia Infrastructure Investment Bank, but I see no indication of a paralle effort in the realm of strategic diplomacy.

Some wars will happen, whether we want them to or not. They arise from the roots of national identity. The nations of Europe fought the First World War in the ultimately futile effort to avoid becoming what they are today, I wrote on the 100th anniversary of the outbreak of the First World War: “Men are immoderate. We are not as different from our fathers as we like to think. The childless, hedonistic Europeans of today are the same people who fought and died in their millions for king and country in 1618 or 1814. Anything worth living for is worth dying for; if we can think of nothing we would die for, it means that we have nothing to live for, either – like today’s Europeans. Europe learned at length that blood and soil, Kultur and Grandeur, were not worth fighting for. But Europe could find nothing to live for after it forswore the national gods of its violent past. It is dying of enervation and ennui, disgusted with its past and unconcerned for its future, unwilling to bring sufficient numbers of children into the world to ensure its survival for another century.”

Iran has not yet learned this lesson, and it will only learn it the same way the nations of Europe learned it in the past century. It may be that the ayatollahs are following an apocalyptic script that ultimately will lead to their mutual destruction in a nuclear war with Israel or one of their Sunni neighbors. I doubt that, and I do not think the issue is important. Iran’s position in the Middle East today parallels the position of democratic France in 1914: an ambitious power with grand ambitions at the cusp of demographic decline, whose last chance to assert its regional dominance is at hand. The German and French population were more less equal at the outbreak of the Franco-Prussian War in 1870; by 1913, Germany had grown by 70% while France had stagnated, probably because France was the first country to secularize.

germanyfrance

 

Anglo-Saxon historiography long has blamed Germany for the First World War, an easy conviction before the bar of history given its culpability for the Second. Christopher Clark has now shown in his bestselling book The Sleepwalkers  that Russia’s mobilization forced Germany’s hand. If one believes the memoirs of the French ambassador to St. Petersburg, Maurice Paleologue, France urged the Czar towards war. Four-fifths of France’s military age men were already mobilized in the eight months before the outbreak of war, against half of Germany’s. A war of attrition of sorts had already begun; France needed an early resolution because, unlike Germany, it could not sustain the costs continued mobilization.

Demographically, Iran is in a position comparable to that of France in 1914: its military-age population is now approximately half that of three most important Sunni states combined (Pakistan, Turkey and Egypt). By 2020 the ratio will shift to only one-fourth, due to the collapse of Iran’s fertility rate from 7 children per female in 1979 to only 1.6 in 2012. Its 125,000 Revolutionary Guards constitute the best fighting force in the region after overthrow of the Saddam Hussein regime in Iraq. Although Iran lacks a modern air force, it is the dominant land power in the Levant. Saudi Arabia’s new Sunni coalition is an attempt to respond to Iran’s depredations in Yemen and elsewhere, but the fractious and divided Sunnis are far from acting in concert. Pakistan is too preoccupied with India and its internal extremists to send soldiers on foreign adventures, and Turkey has no desire to commit to Saudi leadership in the region. Iran’s strength will peak during the next several years, especially if the lifting of sanctions gives it the money and authority to modernize its armed forces.

UN World Population Prospects (Low Variant)

UN World Population Prospects (Low Variant)

I do not propose to argue that belligerence is a mechanical function of demographics. The point, rather, is that all the factors that contributed to European bellicosity in 1914, and above all to German aggression in 1939, apply a fortiori to Iran: national messianism, the perception of historical injustice, the willingness to sacrifice arbitrary large numbers of lives, contempt for the humanity of neighboring states and–above all–the entirely rational perception that time is running out, and that an inevitable war with neighboring states will become impossible to win not very far into the future.

Even if the proposed agreement with Iran succeeded in suppressing development of nuclear weapons–in my view an unlikely outcome–it will given Iran the resources to prepare for the final settling of accounts with the Sunnis on what ultimately will be an horrific scale. If European diplomats were deluded in their attempts to maintain the balance of power in the years before World War I, today’s diplomats are mad to believe that a balance of power can be established between Iran and its Sunni neighbors. War is already joined in Syria, Iraq, Yemen, Somalia, Lebanon and Libya. War is not a choice. It is an event. If Iran were to triumph in the relative short-term, Sunni revenge would be all more terrible in the aftermath. A generation hence, a third of Iranians will be older than 60, the first time in all of history that a poor country will carry such an enormous burden of dependent elderly. The younger populations of its Sunni neighbors will overwhelm it. One has to go back in history before the Thirty Years War, perhaps to Tamerlane, to conceive of the carnage that this will cause. If Iran has nuclear weapons they will be used, and others will use nuclear weapons as well.

The balance of power in the Middle East fell apart when the United States forced a Shia majority government on Iraq through the elections of 2006. That was a catastrophic error. Nothing will quite restore it. But the next best thing, and the best alternative under the circumstances, is to suppress Iran’s ambitions and reinforce the conservative Sunni states as a bulwark against chaos. I continue to believe, as I have argued since 2005, that an American preemptive strike on Iran’s nuclear facilities is the best course of action.

*  *  *  *

Postscript, from Michael Morell, Acting and Deputy Director of CIA 2010-2013:

Last month, a senior adviser to Iranian President Hassan Rouhani spoke at a conference in Tehran on “Iran, Nationalism, History, and Culture.” The adviser made clear that Iran’s ambition is to become a regional hegemon — in short, to reestablish the Persian empire…

The adviser, Ali Younesi — who was head of intelligence for former president Mohammad Khatami — told conference attendees, “Since its inception, Iran has [always] had a global [dimension]. It was born an empire. Iran’s leaders, officials and administrators have always thought in the global” dimension.

Younesi defined the territory of the Iranian empire, which he called “Greater Iran,” as reaching from the borders of China and including the Indian subcontinent, the north and south Caucasus and the Persian Gulf. He said Iraq is the capital of the Iranian Empire — a reference to the ancient city of Babylon, in present-day Iraq, which was the center of Persian life for centuries.

“We are protecting the interests of [all] the people in the region — because they are all Iran’s people,” he said. “We must try to once again spread the banner of Islamic-Iranian unity and peace in the region. Iran must bear this responsibility, as it did in the past.”

07 Apr 18:14

A força da narrativa

by Norma

Ando escrevendo muito, mas para mim mesma e/ou para minha dissertação de mestrado, que defendo até o fim do ano, se Deus quiser. Por isso este blog anda parado ("anda parado" é ótimo). Mas tenho publicado coisinhas no Facebook, onde tudo brilha por segundos até desaparecer para sempre - quando não quero que certas coisas desapareçam, publico-as no blog, e é assim que será, até segunda ordem.

Por isso vim aqui hoje: vale a pena dobrar e guardar essa entrevista de Umberto Eco, publicada na revista Época em 2011, quando ele completou 80 anos. Críticas à internet, política internacional, conspirações, hobbies preferidos e a força da narrativa, que segundo ele "é mais efetiva do que qualquer tecnologia". Se quiser conversar sobre o conteúdo, vá aos comentários! Vamos deixar de lado um pouquinho aquele buraco negro que é o Facebook.

 

06 Apr 09:42

Gripen Calendar Image Of The Month

by Saab AB
.:

April_gripen.jpg
Gripen is built for information sharing and collaboration. Its unique data fusion and datalink capabilities are powerful communications solutions, providing superior information advantages.

Photo: Christo Crous​

Download the calendar here​.

Published: 4/6/2015 11:32 AM
06 Apr 04:00

Operating Systems

One of the survivors, poking around in the ruins with the point of a spear, uncovers a singed photo of Richard Stallman. They stare in silence. "This," one of them finally says, "This is a man who BELIEVED in something."
03 Apr 19:50

FSF Blogs: Thousands of Spaniards leave Twitter for GNU social

This guest post was submitted by Daniel Dianes, a Spanish free software activist. Leer esto en español.

Unlike Twitter, which is controlled by a centralized authority, GNU social is a network of independent servers called nodes. Federation technology allows users to communicate between nodes, preserving the unified experience of traditional social media systems, and the free GNU social software allows anybody with an Internet connection to start their own public or private node and join the network. These administrators can even customize their nodes to suit the unique needs of their users.

Since GNU social is decentralized, it's harder for a company or government to censor content or shut down the network when they feel threatened by it. This is more than a hypothetical threat—it has been attempted multiple times by oppressive governments. Spreading out user data also makes bulk surveillance considerably more difficult, as there is no single database to crack into and copy.

Twitter user @Barbijaputa is popular in Spain, with more than 167,000 followers. She's known for criticizing the government or any other political parties or groups of power.

On January 14th, Twitter suspended @Barbijaputa's account after she participated in a conversation about sexually transmitted diseases. The next day, she created a profile on GNU social node Quitter.se and started posting. Her Twitter followers proved willing to follow her all the way to GNU social, and began joining existing nodes en masse and starting their own.

The growth was so explosive that the some of the existing GNU social nodes were unable to handle the traffic. On January 15th, a Quitter administrator posted this note:

"Due to high traffic, I need to stop the registrations for some time to get back in control. Has been a crazy day (15.01.15) on quitter.no and .is - -regards @knuthollund"

The node Quitter.es (Quitter Spain) was created to handle some of the extra people that overloaded existing GNU social instances like Quitter.no and Quitter.is. Quitter Spain now has 6,667 users and counting and Quitter.se reports 4,982 users, due in part to the incoming Spanish users.

GNU social is not the only federated social network challenging the centralized status quo. GNU MediaGoblin lets users publish images, videos, 3D models, and other files, Diaspora* provides a Facebook-like experience and pump.io is another option for microblogging. The Free Software Foundation runs a GNU social node at https://status.fsf.org.

Get started with GNU social today by picking from this list of nodes, and follow the Free Software Foundation at @fsf. Or try pump.io, and follow the FSF account @fsf there. Even if you don't have as many followers as @Barbijaputa, encourage them to follow you!

Daniel Dianes, FSF member #9171

03 Apr 20:35

Cool test: Olympus AIR with the 300mm Four Thirds lens!

by 43rumors

Share

OLYMPUS DIGITAL CAMERA

One of the advantages of the new Olympus AIR MFT “lens-camera” is that it allows a new kind of shooting with huge tele lenses! The picture on top shows how you can hold the 300mm f/2.8 Four Thirds lens without having to use the tripod. Something that would be much harder to do if you would have a “normal” DSLR or Mirrorless camera on it.

DC.watch posted a full set of images to show how it works (Click on it to enlarge):

Image samples shot with tha combo can be seen at DC.watch.

via photorumors.

 

Share

01 Apr 18:09

Why Are Jews Liberal?

by David P. Goldman

Liberals believe that social engineering can bring about universal success; conservatives want to foster individual responsibility and initiative. For liberals, the failure of an individual is a failure of society; for conservatives, individuals should be allowed to succeed or fail on their own merits. There are degrees, of course; most conservatives eschew Social Darwinism or Ayn Rand’s egotism, and most liberals do not believe in the strict application of the Communist maxim, “from each according to his abilities, to each according to his needs.” But that is the bright line that divides us conservatives from the liberals.

Why are (most) Jews liberals? That is a trickier question than it might seem. The usual explanation is that Napoleon freed the Jews from the ghetto, and Jews ever since have looked to the secular enlightenment as the source of their welfare rather than the often oppressive attitudes of traditional society. The European Socialists in general advanced Jewish interests while European conservatives in general impaired them. Without the French socialists (during the brief postwar premiership of Leon Blum), Britain almost certainly would have arranged for a successful Arab invasion of Palestine to crush the State of Israel in the cradle. There is something to that, but not enough.

Judaism, as historian Paul Johnson once observed, balances individual and collective. Christians who observe an Orthodox Jewish service will be struck by apparent lack of cohesion. During the preliminary reading of Psalms, worshipers proceed at their own pace, sometimes singing lines out loud. When the congregation stands, individuals will rise and sit down at their own pace rather than as a group. The recitation of the Eighteen Benedictions, the prayer at the center of each Jewish service, is an individual audience with the Lord, and some congregants will remains standing even after the leader begins the public repetition; latecomers will stand and recite after the service has moved on. A derogatory German expression cites “Geschrei wie in einer Judenschule,” or screaming as in a synagogue, referring to the occasional cacophony. There are to be sure moments when the congregation speaks as one. When the congregation declares the Shmah (“Hear!”), it does so in two parts: the first (Deut. 6:4-9) is written in first person singular, and the second (Deut. 11:13-21) restates the same themes in first person plural.

In that respect Judaism is in inherently conservative. Christians enter the Church together as Gentiles to be inducted into Israel, and although they are adopted as individuals, they worship as a body; Jews are already members of God’s people and go to synagogue for a private audience with Almighty as well as collective functions. Jewish law provides for the poor, but the prophets want every man to sit under his own vine and fig  tree — not the vine and fig tree of a collective farm. And the 10th Commandment specifically forbids a Jew to covet anything of his neighbors (as the rabbis observed, it reads “do not covet, covet,” the only one of the Decalogue to use the emphasis of repetition).

That’s the problem: The vulnerability of the conservative model, as de Tocqueville observed in 1835, is that the losers will use their political power to expropriate the winners and vote themselves rich. It is a proud and self-confident people indeed that is composed of individuals willing to accept failure, pick themselves up, and try again, rather than coveting the success of the winners. If popular jealousy erupts against the success of one’s own countrymen, all the more so will it be directed against a minority.

01 Apr 09:49

Francesco Canovai: Automating Barman with Puppet: it2ndq/barman (part two)

In the first part of this article we configured Vagrant to execute two Ubuntu 14.04 Trusty Tahr virtual machines, respectively called pg and backup. In this second part we will look at how to use Puppet to set up and configure a PostgreSQL server on pg and back it up via Barman from the backup box.


Puppet: configurationpuppet-barman-part-2-inside

After defining the machines as per the previous article, we need to specify the required Puppet modules that librarian-puppet will manage for us.

Two modules are required:

  1. puppetlabs/postgresql (https://github.com/puppetlabs/puppetlabs-postgresql/) to install PostgreSQL on the pg VM
  2. it2ndq/barman (https://github.com/2ndquadrant-it/puppet-barman) to install Barman on backup

Both modules will be installed from Puppet Forge. For the puppetlabs/postgresql module, we’ll have to use version 4.2.0 at most at the moment, as the latest version (4.3.0) is breaking the postgres_password parameter we’ll be using later (see this pull request). Let’s create a file called Puppetfile containing this content in the project directory:

forge "https://forgeapi.puppetlabs.com"
mod "puppetlabs/postgresql", "<4.3.0"
mod "it2ndq/barman"

We can now install the Puppet modules and their dependencies by running:

$ librarian-puppet install --verbose

Although not essential, it’s preferable to use the option --verbose every time librarian-puppet is used. Without it the command is very quiet and it’s useful to have details about what it’s doing in advance. For example, without using --verbose, you may find out that you’ve wasted precious time waiting for a dependency conflict to be resolved, only to see an error many minutes later.

Upon successful completion of the command, a modules directory containing the barman and postgresql modules and their dependencies (apt, concat, stdlib) will be created in our working directory. In addition, librarian-puppet will create the Puppetfile.lock file to identify dependencies and versions of the installed modules, pinning them to prevent future updates. This way, subsequent librarian-puppet install runs will always install the same version of the modules instead of possible upgrades (in case an upgrade is required, librarian-puppet update will do the trick).

Now we can tell Vagrant we are using a Puppet manifest to provision the servers. We alter the Vagrantfile as follows:

Vagrant.configure("2") do |config|
  {
    :pg => {
      :ip      => '192.168.56.221',
      :box     => 'ubuntu/trusty64'
    },
    :backup => {
      :ip      => '192.168.56.222',
      :box     => 'ubuntu/trusty64'
    }
  }.each do |name,cfg|
    config.vm.define name do |local|
      local.vm.box = cfg[:box]
      local.vm.hostname = name.to_s + '.local.lan'
      local.vm.network :private_network, ip: cfg[:ip]
      family = 'ubuntu'
      bootstrap_url = 'https://raw.github.com/hashicorp/puppet-bootstrap/master/' + family + '.sh'

      # Run puppet-bootstrap only once
      local.vm.provision :shell, :inline => <<-eos
        if [ ! -e /tmp/.bash.provision.done ]; then
          curl -L #{bootstrap_url} | bash
          touch /tmp/.bash.provision.done
        fi
      eos

      # Provision with Puppet
      local.vm.provision :puppet do |puppet|
        puppet.manifests_path = "manifests"
        puppet.module_path = [".", "modules"]
        puppet.manifest_file = "site.pp"
        puppet.options = [
         '--verbose',
        ]
      end
    end
  end
end

With the lines we’ve just added, we’ve given Vagrant the instructions to provision the VMs using manifests/site.pp as the main manifest and the modules included in the modules directory. This is the final version of our Vagrantfile.

We now have to create the manifests directory:

$ mkdir manifests

and write in it a first version of site.pp. We’ll start with a very basic setup:

node backup {
  class { 'barman':
    manage_package_repo => true,
  }
}
node pg {}

We can now start the machines and see that on backup there is a Barman server with a default configuration (and no PostgreSQL on pg yet). Let’s log into backup:

$ vagrant ssh backup

and take a look at /etc/barman.conf:

# Main configuration file for Barman (Backup and Recovery Manager for PostgreSQL)
# Further information on the Barman project at www.pgbarman.org
# IMPORTANT: Please do not edit this file as it is managed by Puppet!
# Global options

[barman]
barman_home = /var/lib/barman
barman_user = barman
log_file = /var/log/barman/barman.log
compression = gzip
backup_options = exclusive_backup
minimum_redundancy = 0
retention_policy =
retention_policy_mode = auto
wal_retention_policy = main
configuration_files_directory = /etc/barman.conf.d

The next step is running a PostgreSQL instance on pg. We must be aware of the parameters required by Barman on the PostgreSQL server, so we need to set:

  • wal_level at least at archive level
  • archive_mode to on
  • archive_command so that the WALs can be copied on backup
  • a rule in pg_hba.conf for access from backup

All of these parameters can be easily set through the puppetlabs/postgresql module. In addition, on the Barman server, we need:

  • a PostgreSQL connection string
  • a .pgpass file for authentication
  • a SSH command
  • to perform the SSH key exchange

it2ndq/barman generates a private/public keypair in ~barman/.ssh. However, automatically exchanging the keys between the servers requires the presence of a Puppet Master which is beyond the objectives of this tutorial (it will be part of the next instalment, which will focus on the setup of a Puppet Master and the barman::autoconfigure class) – therefore this last step will be performed manually.

We edit the site.pp file as follows:

node backup {
  class { 'barman':
    manage_package_repo => true,
  }
  barman::server {'test-server':
    conninfo     => 'user=postgres host=192.168.56.221',
    ssh_command  => 'ssh postgres@192.168.56.221',
  }
  file { '/var/lib/barman/.pgpass':
    ensure  => 'present',
    owner   => 'barman',
    group   => 'barman',
    mode    => 0600,
    content => '192.168.56.221:5432:*:postgres:insecure_password',
  }
}

node pg {
  class { 'postgresql::server':
    listen_addresses     => '*',
    postgres_password    => 'insecure_password',
    pg_hba_conf_defaults => false,
  }
  postgresql::server::pg_hba_rule {'Local access':
    type        => 'local',
    database    => 'all',
    user        => 'all',
    auth_method => 'peer',
  }
  postgresql::server::pg_hba_rule {'Barman access':
    type        => 'host',
    database    => 'all',
    user        => 'postgres',
    address     => '192.168.56.222/32',
    auth_method => 'md5',
  }
  postgresql::server::config_entry {
    'wal_level'       : value => 'archive';
    'archive_mode'    : value => 'on';
    'archive_command' : value => 'rsync -a %p barman@192.168.56.222:/var/lib/barman/test-server/incoming/%f';
  }
  class { 'postgresql::server::contrib':
    package_ensure => 'present',
  }
}

Having changed the manifest, the provision has to be rerun:

$ vagrant provision

With the machines running, we can proceed with the key exchanges. We log into pg:

$ vagrant ssh pg

and we create the keypair for the postgres user, using ssh-keygen, leaving every field empty when prompted (so always pressing enter):

vagrant@pg:~$ sudo -iu postgres
postgres@pg:~$ ssh-keygen
postgres@pg:~$ cat .ssh/id_rsa.pub

The last command outputs a long alphanumeric string that has to be appended to the ~barman/.ssh/authorized_keys file on backup.

$ vagrant ssh backup
vagrant@backup:~$ sudo -iu barman
barman@backup:~$ echo "ssh-rsa ..." >> .ssh/authorized_keys

Similarly, we copy the public key of the barman user into the authorized_keys file of the postgres user on pg:

barman@backup:~$ cat .ssh/id_rsa.pub
ssh-rsa ...
barman@backup:~$ logout
vagrant@backup:~$ logout
$ vagrant ssh pg
vagrant@pg:~$ sudo -iu postgres
postgres@pg:~$ echo "ssh-rsa ..." >> .ssh/authorized_keys

At this point, we make a first connection in both directions between the two servers:

postgres@pg:$ ssh barman@192.168.56.222
barman@backup:$ ssh postgres@192.168.56.221

We can run barman check to verify that Barman is working correctly:

barman@backup:~$ barman check all
Server test-server:
        ssh: OK
        PostgreSQL: OK
        archive_mode: OK
        archive_command: OK
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (no last_backup_maximum_age provided)
        compression settings: OK
        minimum redundancy requirements: OK (have 0 backups, expected at least 0)

Every line should read “OK”. Now, to perform a backup, simply run:

barman@backup:$ barman backup test-server

A realistic configuration

The Barman configuration used so far is very simple, but you can easily add a few parameters to site.pp and take advantage of all the features of Barman, such as the retention policies and the new incremental backup available in Barman 1.4.0.

We conclude this tutorial with a realistic use case, with the following requirements:

  • a backup every night at 1:00am
  • the possibility of performing a Point In Time Recovery to any moment of the last week
  • always having at least one backup available
  • reporting an error via barman check in case the newest backup is older than a week
  • enabling incremental backup to save disk space

We use the Puppet file resource to create a .pgpass file with the connection parameters and a cron resource to generate the job to run every night. Finally, we edit the barman::server to add the required Barman parameters.

The end result is:

node backup {
  class { 'barman':
    manage_package_repo => true,
  }
  barman::server {'test-server':
    conninfo                => 'user=postgres host=192.168.56.221',
    ssh_command             => 'ssh postgres@192.168.56.221',
    retention_policy        => 'RECOVERY WINDOW OF 1 WEEK',
    minimum_redundancy      => 1,
    last_backup_maximum_age => '1 WEEK',
    reuse_backup            => 'link',
  }
  file { '/var/lib/barman/.pgpass':
    ensure  => 'present',
    owner   => 'barman',
    group   => 'barman',
    mode    => 0600,
    content => '192.168.56.221:5432:*:postgres:insecure_password',
  }
  cron { 'barman backup test-server':
    command => '/usr/bin/barman backup test-server',
    user    => 'barman',
    hour    => 1,
    minute  => 0,
  }
}
node pg {
  class { 'postgresql::server':
    listen_addresses  => '*',
    postgres_password => 'insecure_password',
    pg_hba_conf_defaults => false,
  }
  postgresql::server::pg_hba_rule {'Local access':
    type        => 'local',
    database    => 'all',
    user        => 'all',
    auth_method => 'peer',
  }
  postgresql::server::pg_hba_rule {'Barman access':
    type        => 'host',
    database    => 'all',
    user        => 'postgres',
    address     => '192.168.56.222/32',
    auth_method => 'md5',
  }
  postgresql::server::config_entry {
    'wal_level'       : value => 'archive';
    'archive_mode'    : value => 'on';
    'archive_command' : value => 'rsync -a %p barman@192.168.56.222:/var/lib/barman/test-server/incoming/%f';
  }
}

Conclusion

With 51 lines of Puppet manifest we managed to configure a pair of PostgreSQL/Barman servers with settings similar to those we might want on a production server. We have combined the advantages of having a Barman server to handle backups with those of having an infrastructure managed by Puppet, reusable and versionable.

In the next and final post in this series of articles we will look at how to use a Puppet Master to export resource between different machines, thus allowing the VMs to exchange the parameters required for correct functioning via the barman::autoconfigure class making the whole setup process easier.

31 Mar 17:19

$100 off on the Rokinon 16mm MFT lens.

by 43rumors

Share

rokinon16mm

For a limited time you get the 16mm Rokinon f/2.0 MFT lens with a $100 discount at eBay US (Click here).

Olympus lens savings:
$100 off on the 12mm f/2.0 lens at Amazon, Adorama, BHphoto and GetOlympus.
$100 off on the 75mm f/1.8 lens at Amazon, Adorama, BHphoto and GetOlympus.
$50 off on the 45mm f/1.8 lens at Amazon, Adorama, BHphoto and GetOlympus.
$80 off on the 40-150mm lens at Amazon, Adorama, BHphoto and GetOlympus.
$50 off on the 14-42mm lens at Amazon, Adorama, BHphoto and GetOlympus.
$50 off on the 75-300mm lens at Amazon, Adorama, BHphoto and GetOlympus.
$100 off on the 9-18mm f/4.0-5.6 lens at Amazon, Adorama, BHphoto and GetOlympus.
$100 off on the 12-40mm lens at Amazon, Adorama, BHphoto and GetOlympus.
$50 off on the 60mm lens at Amazon, Adorama, BHphoto and GetOlympus.

Share

25 Mar 14:36

LibreOffice Online announced

by corbet
The LibreOffice project has announced the accelerated development of a new online offering. "Development of LibreOffice Online started back in 2011, with the availability of a proof of concept of the client front end, based on HTML5 technology. That proof of concept will be developed into a state of the art cloud application, which will become the free alternative to proprietary solutions such as Google Docs and Office 365, and the first to natively support the Open Document Format (ODF) standard." The current effort is supported by IceWarp and Collabora; see this FAQ and Michael Meeks's posting for more information. For those wanting to download it, though, note the "the availability of LibreOffice Online will be communicated at a later stage."
23 Mar 23:00

Worldwide more than 50 events about Open Standards

Worldwide more than 50 events about Open Standards

On March 25 is this years Document Freedom Day and, depending on your time zone, it has already started. Document Freedom Day is the global campaign for document liberation by local groups throughout the world. So far more than 50 groups registered their events in over 25 countries ranging from Asia, Europa, Africa, to South and North America.

Open Standards are crucial to ensure that different computer systems can work together, and that users can access documents regardless of the computing platform or device they use. They are the foundation of the Internet and the World Wide Web as well as all kinds of technical communication.

Every year, on the last Wednesday of March and the days around, people highlight these important aspects of our digital sovereignity by celebrating Document Freedom Day. In 2015, Document Freedom Day is happening around the world beginning on Tuesday 24, 12 UTC until Thursday, 12UTC. Following the path of the sun, the first events are happening in Japan, Taiwan and India, followed by more than 20 events in Europe, 1 in Africa, and more than 20 in North- and South America. Taken together, all these events make DFD the biggest campaign to promote Open Standards on a local level.

And Document Freedom Day is growing even beyond: In the past years, Document Freedom Day achieved to establish a view on technological boundaries and freedoms under social aspects. More and more, Document Freedom Day is becoming a day to raise political attention also on a national level or global. In 2015, different organisations will use Document Freedom Day to publish and spread political statements. If you are not close to any event or you miss the time to pass by, watch out #DFD2015 in the news, blogs and media, participate and help to get the world interconnected in freedom.

You can still participate: use this day to invite your friends or work mates for a drink or a coffee break and tell them about the international day of Open Standards and why Open Standards are important to you - and for everyone.

Support FSFE, join the Fellowship
Make a one time donation

24 Mar 21:39

Meet Cyanogen, The Startup That Wants To Steal Android From Google (Forbes)

by ris
Forbes takes a look at Cyanogen, and its prospects in the phone market. "Cyanogen has a chance to snag as many as 1 billion handsets, more than the total number of iPhones sold to date, according to some analysts. Fifty million people already run Cyanogen on their phones, the company says. Most went through the hours-long process of erasing an Android phone and rebooting it with Cyanogen. [Kirt] McMaster is now persuading a growing list of phone manufacturers to make devices with Cyanogen built in, rather than Google’s Android. Their phones are selling out in record time. Analysts say each phone could bring Cyanogen a minimum of $10 in revenue and perhaps much more."
23 Mar 20:05

Heikki Linnakangas: pg_rewind in PostgreSQL 9.5

Before PostgreSQL got streaming replication, back in version 9.0, people kept asking when we’re going to get replication. That was a common conversation-starter when standing at a conference booth. I don’t hear that anymore, but this dialogue still happens every now and then:

- I have streaming replication set up, with a master and standby. How do I perform failover?
- That’s easy, just kill the old master node, and run “pg_ctl promote” on the standby.
- Cool. And how do I fail back to the old master?
- Umm, well, you have to take a new base backup from the new master, and re-build the node from scratch..
- Huh, what?!?

pg_rewind is a better answer to that. One way to think of it is that it’s like rsync on steroids. Like rsync, it copies files that differ between the source and target. The trick is in how it determines which files have changed. Rsync compares timestamps, file sizes and checksums, but pg_rewind understands the PostgreSQL file formats, and reads the WAL to get that information instead.

I started hacking on pg_rewind about a year ago, while working for VMware. I got it working, but it was a bit of a pain to maintain. Michael Paquier helped to keep it up-to-date, whenever upstream changes in PostgreSQL broke it. A big pain was that it has to scan the WAL, and understand all different WAL record types – miss even one and you might end up with a corrupt database. I made big changes to the way WAL-logging works in 9.5, to make that easier. All WAL record types now contain enough information to know what block it applies to, in a common format. That slashed the amount of code required in pg_rewind, and made it a lot easier to maintain.

I have just committed pg_rewind into the PostgreSQL git repository, and it will be included in the upcoming 9.5 version. I always intended pg_rewind to be included in PostgreSQL itself; I started it as a standalone project to be able to develop it faster, outside the PostgreSQL release cycle, so I’m glad it finally made it into the main distribution now. Please give it a lot of testing!

PS. I gave a presentation on pg_rewind in Nordic PGDay 2015. It was a great conference, and I think people enjoyed the presentation. Have a look at the slides for an overview on how pg_rewind works. Also take a look at the page in the user manual.

23 Mar 10:44

The Great and Powerful Ob

by David P. Goldman

Crossposted from Asia Times

http://atimes.com/2015/03/memo-to-netanyahu-pay-no-attention-to-that-man-behind-the-curtain/

The “Wizard of Oz” is the best single-source explanation of American politics. Specialists, to be sure, will want to read the Federalist papers, de Tocqueville and the speeches of Lincoln, but the 1939 MGM movie tells most of the story. We are a nation of scarecrows without a brain, tin men without a heart, and lions without courage. Nothing is going to fix us, but the next best thing is to feel better about ourselves. A broken-down carnival huckster impersonating the Great and Powerful Wizard of Oz gives our three national archetypes not what they need, but the next best thing: A phony diploma, a testimonial, and a medal. The party favors don’t help the feckless trio (the Scarecrow proceeds to recite a comically mistaken formula for the length of the sides of an isosceles triangle) but they did wonders for their self-esteem.

America is a winner’s game. America succeeds because it breeds success and ruthlessly crushes failure. A main purpose of American politics, in turn, is to make losers feel better, without, of course, preventing them from losing. No president in American history more closely resembles the Wizard than Ob the Great and Powerful, the present occupant of the Oval Office. Self-esteem is America’s consolation prize and Obama spreads it with a shovel.

Six years after America inaugurated its first African-American president, the social condition of black Americans remains dismal and appears to be deteriorating. 49% of black males have been arrested by the age of 23; a third of black males will probably spend time behind bars. 54% of black men graduate from high school vs. more than 75% of whites. Only 14% of black eighth graders score at or above the threshold of proficiency. And nearly three-quarters of black births are to unmarried mothers. On the 50th anniversary of the Civil Rights Act of 1965, these are catastrophic results. Magical thinking now infects what was in the past a civil rights movement, for example the “Hands Up, Don’t Shoot” slogan adopted from an incident that Obama’s Justice Department proved never to have happened.

Hypocrisy of this sort plays well in America. It began with the beaten South, which lost nearly 30% of its military age in men in the Civil War, but earned a romantic image of gallantry in America’s popular culture. Claptrap like “Gone With the Wind” was the Confederacy’s consolation prize, with a revoltingly false portrait of a halcyon era of beautiful belles and elegant balls on antebellum plantations. The slaves’ descendants in their days of woe have been accorded the same, slim consolation. Rather than Scarlett and Rhett, African-Americans have rage-spewing rappers like Obama’s regular White House guest Jay-Z. Meanwhile young black men are fed into the maw of the criminal justice system. And Ob the Great and Powerful is there to hand out diplomas, testimonials and medals.

Hypocrisy is a luxury that America can afford. The number of Americans under judicial supervision (prison, probation or parole) rose from 2 million in 1980 to 7.5 million in 2008, and the violent crime rate fell correspondingly, because so many criminals were locked up. But hypocrisy is a far less effective palliative in the Middle East, now that times have gotten tougher. President Obama evinces the same concern for the supposed victims of imperialism around the world as he does for African-Americans–for example the Persians, who are less imperial victims than the rancorous remnant of a failed empire. His concern for the welfare of the Persians is almost child-like; in a sense it is child-like, for it is the concern of the child of the Bohemian anthropologist Stanley Ann Dunham, who married and divorced two Muslim men, and left young Barry with her parents while she set out to save the ironworkers of Indonesia from globalization. Here is what he broadcast to Iranians on Nowruz, the Persian New Year:

Hello!  To everyone celebrating Nowruz—across the United States and in countries around the world—Nowruz Mubarak. For thousands of years, this has been a time to gather with family and friends and welcome a new spring and a new year.  Last week, my wife Michelle helped mark Nowruz here at the White House.  It was a celebration of the vibrant cultures, food, music and friendship of our many diaspora communities who make extraordinary contributions every day here in the United States.  We even created our own Haft Seen (symbolic fruit plate), representing our hopes for the new year…As you gather around the Nowruz table—from Tehran to Shiraz to Tabriz, from the coasts of the Caspian Sea to the Persian Gulf—you’re giving thanks for your blessings and looking ahead to the future…As the poet Hafez wrote, “It is early spring.  Try to be joyful in your heart.  For many a flower will bloom while you will be in clay.”

There is no consolation for the Persians, however; their fertility rate has fallen from nearly 7 children per female in 1979 to just 1.6 in 2012, which means that they will have a higher proportion of elderly dependents than the United States a generation from now. After 3,000 years Persian culture has reached its best-used-by-date. The end of traditional society and the education of women has ruined it. Iran knows that it is going to die, and all the schmoozing in the world from an American president will do it no good.

The same sort of hypocrisy applies to Obama’s concern for Palestinian self-esteem. When Obama told the Huffington Post March 21 that Netanyahu had placed a strain on Israel’s democratic fabric, he did not refer merely to the prime minister’s factual campaign statement to the effect that foreign-financed campaign organizations were bringing large numbers of Arab voters to the polls. He meant (as Dana Milbank made clear in a March 22 op-ed in the Washington Post):

Without a Palestinian state, Israel can be either a Jewish state or a democracy but not both. If it annexes the Palestinian territories and remains democratic, it will be split roughly evenly between Jews and Arabs; if it annexes the territories and suppresses the rights of Arabs, it ceases to be democratic. There are roughly 4.4 million Palestinians in the West Bank, Gaza and East Jerusalem and another 1.4 million living inside Israel . That puts them in rough parity with Jews, who number just over 6 million. Higher Palestinian population growth and fertility rates indicate that Jews will be a minority between the Jordan River and the Mediterranean in a few years.

This is simply false: close examination of Palestinian statistics (e.g., comparison of actual birth and school registration records against the computer model output of the Palestinian authority) shows that the Palestinian population data are inflated by about 1.4 million. With the Jewish birth rate and the Arab birth rate between the Jordan River and the Mediterranean Sea converging on 3 children per female, there will be no significant change in relative population in the foreseeable future.

Nonetheless, what Obama means, quite simply, is that any outcome other than the establishment of a Palestinian state will be “undemocratic.” That is an act of hypocrisy Israel cannot afford. Then Prime Minister Ariel Sharon undertook perhaps the most hypocritical act in Israeli history, withdrawing unilaterally from Gaza in 2005. Sharon expected the result to be catastrophic, but hoped that the ensuing mess would persuade the world that Israel could not afford to give up more territory. Hypocrisy breeds hypocrisy, though, and Sharon vastly underestimated the world’s capacity to ignore the obvious.

There is an old country joke about the shtetl family that invites a poor man to Shabbat dinner. The hostess brings out a dish of whitefish, and the poor man proceeds to gobble it up. The hostess, somewhat chagrined, says gently, “Whitefish is very expensive,” to which the poor man replies, “Believe me, it’s worth it!” From the vantage point of the utopians in Obama’s camarilla—Susan Rice, Samantha Power, Valerie Jarrett and Ben Rhodes—allowing Hamas to turn Judea and Samaria into an artillery platform is worth it. They identify with failed or failing peoples, and cannot live with the knowledge that civilizations die out for the most part because they want to.

Israel’s election was in effect a referendum on the two-state solution, I argued earlier in this publication. Netanyahu had to tell the truth to his own base to persuade them to vote for him, and he told them that under foreseeable circumstances a Palestinian state simply would not happen—not while Mahmoud Abbas survives on the support of the Israeli Army, and Iran is sending weapons to Hamas, and the surrounding countries (especially Syria) have disintegrated into chaos and polarized radicalism. Israel’s national fund of hypocrisy, already depleted by Ariel Sharon’s profligacy in 2005, was exhausted.

Nothing that Mr. Netanyahu can do will placate the Great and Powerful Ob. It may be painful and in some ways damaging, but he has no choice but to ignore the man behind the curtain.

18 Mar 16:03

Israel Election Was a Referendum on the Two-State Solution (Updated)

by David P. Goldman

Update: It’s disappointing to see qualified, sheepish support for Netanyahu from the likes of the Wall Street Journal, which today wrote: “But in the closing days Mr. Netanyahu played up that foreigners (read: President Obama) wanted him defeated, and he rejected statehood for Palestinians, reversing a position he had taken in 2009. The reversal gave the impression of opportunism, even desperation, but it also rallied conservative voters who had hinted at growing “Bibi fatigue” after his long tenure as premier.” Opportunism? On the contrary, Netanyahu finally told the truth. Concludes the Journal: “Israel’s raucous democracy is imperfect, like America’s, but it is the only reliable one in the bloody cauldron of the Middle East.”

Ha’aretz explains the discrepancy between the Israeli polls and the outcome as follows: “[Netanyahu] won this election by convincing over 200,000 voters who were planning to vote for Habayit Hayehudi, Shas, Kulanu and Yahad to change their minds in the last six days of the campaign.” Why did they switch? The answer is simple and obvious: Most of those small-party voters oppose a Palestinian state, and Netanyahu ruled out a Palestinian state on his watch a day before the election. Outside of the Eurocentric secular elite in Tel Aviv, most Israeli voters look at the chaos in the Muslim world and draw the obvious conclusion that a Palestinian State would be absorbed into the maelstrom of extremism surrounding it, and turn into an artillery platform for terrorists. Last July I argued in Tablet magazine that it’s not the settlers, but the “unsettlers” (ISIS and Iran) who have forced a one-state solution on Israel. Netanyahu went through the motions of diplomacy until Monday in order to maintain correct relations with Washington. That pushed the one-state vote out to minor parties. Once Netanyahu acknowledged the obvious, 200,000 minor party voters came back to Likud.

Netanyahu has decided, with some justification, that he might as well be hanged for a sheep as for a lamb. His disagreement with the Obama administration is not about the best way to contain Iran’s nuclear ambitions. The Obama administration views Iran as a positive force with benign motives: the Director of National Intelligence’s Threat Assessment speaks of “Iran’s intentions to dampen sectarianism, build responsive partners, and deescalate tensions with Saudi Arabia,” and dismisses Iran’s threat to regional stability as mere “secondary consequences” of its support for Shia communities. Iranian official propaganda quotes it with enthusiasm. And after the appointment of Robert Malley as the Middle East Coordinator for the White House–the man Obama kicked out of its 2008 campaign because of his close ties to Hamas–Netanyahu has little to lose in terms of good will.

We now read that the White House will abandon Israel to the wolves at the United Nations. The political damage to the Democrats will be extensive, but less than one might guess at first glance: the majority of American Jews will continue to choose liberal utopianism over Israeli security. Leftwing Jewish outlets like The Forward echo the cri de coeur  of the Israeli left: the “Zionist dream” of socialist equality and religious harmony is dead, and Bibi is its gravedigger. That corpse has been high for some some time, but no matter. The West is choking on its own illusions and hypocrisy; Israel once again may become an Asian nation.

17 Mar 19:00

Tomas Vondra: Performance since PostgreSQL 7.4 / fulltext

After discussing the pgbench and TPC-DS results, it's time to look at the last benchmark, testing performance of built-in fulltext (and GIN/GiST index implementation in general).

The one chart you should remember from this post is this one, GIN speedup between 9.3 and 9.4:

fulltext-timing-speedups.png

Interpreting this chart is a bit tricky - x-axis tracks duration on PostgreSQL 9.3 (log scale), while y-axis (linear scale) tracks relative speedup 9.4 vs. 9.3, so 1.0 means 'equal performance', and 0.5 means that 9.4 is 2x faster than 9.3.

The chart pretty much shows exponential speedup for vast majority of queries - the longer the duration on 9.3, the higher the speedup on 9.4. That's pretty awesome, IMNSHO. What exactly caused that will be discussed later (spoiler: it's thanks to GIN fastscan). Also notice that almost no queries are slower on 9.4, and those few examples are not significantly slower.

Benchmark

While both pgbench and TPC-DS are well established benchmarks, there's no such benchmark for testing fulltext performance (as far as I know). Luckily, I've had played with the fulltext features a while ago, implementing archie - an in-database mailing list archive.

It's still quite experimental and I use it for testing GIN/GiST related patches, but it's suitable for this benchmark too.

So I've taken the current archives of PostgreSQL mailing lists, containing about 1 million messages, loaded them into the database and then executed 33k real-world queries collected from postgresql.org. I can't publish those queries because of privacy concerns (there's no info on users, but still ...), but the queries look like this:

SELECT id FROM messages
 WHERE body_tsvector @@ ('optimizing & bulk & update')::tsquery
 ORDER BY ts_rank(body_tsvector, ('optimizing & bulk & update')::tsquery)
          DESC LIMIT 100;

The number of search terms varies quite a bit - the simplest queries have a single letter, the most complex ones often tens of words.

PostgreSQL config

The PostgreSQL configuration was mostly default, with only minor changes:

shared_buffers = 512MB
work_mem = 64MB
maintenance_work_mem = 128MB
checkpoint_segments = 32
effective_cache_size = 4GB

Loading the data

We have to load the data first, of course. In this case that involves a fair amount of additional logic implemented either in Python (parsing the mbox files into messages, loading them into the database), or PL/pgSQL triggers (thread detection, ...). The time needed to load all the 1M messages, producing ~6GB database, looks like this:

fulltext-load.png

Note: The chart only shows releases where the performance changed, so if only data for 8.2 and 9.4 are shown, it means that the releases up until 9.3 behave like 8.2 (more or less).

The common wisdom is that querying GIN indexes are faster than GiST, but that they are more expensive when it comes to maintenance (creation, etc).

If you look at PostgreSQL 8.2, the oldest release supporting GIN indexes, that certainly was true - the load took ~1300 seconds with GIN indexes and only ~800 seconds with GiST indexes. But 8.4 significantly impoved this, making the GIN indexes only slightly more expensive than GiST.

Of course, this is incremental load - it might look very differently if the indexes were created after all the data are loaded, for example. But I argue that the incremental performance is more important here, because that's what usually matters in actual applications.

The other argument might be that the overhead of the Python parser and PL/pgSQL triggers is overshadowing the GIN / GiST difference. That may be true, but that overhead should be about the same for both index types, so read-world applications are likely to have similar overhead.

So I believe that GIN maintenance is not significantly more expensive than GiST - at least in this particular benchmark, but probably in other applications too. I have no doubt it's possible to construct examples where GIN maintenance is much more expensive than GiST maintenance.

Query performance

The one thing that's missing in the previous section is query performance. Let's assume your workload is 90% reads, and GIN is 10x faster than GiST for the queries you do - how much you care if GIN maintenance is 10x more expensive than GiST, in that case? In most cases, you'll choose GIN indexes because that'll probably give you better performance overall. (It's more complicated, of course, but I'll ignore that here.)

So, how did the GIN and GiST performance evolved over time? GiST indexes were introduced first - in PostgreSQL 8.0 as a contrib module (aka extension in new releases), and then in core PostgreSQL 8.3. Using the 33k queries, the time to run all of them on each release is this (i.e. lower values are better):

fulltext-gist.png

Interesting. It took only ~3200 seconds on PostgreSQL 8.0 - 8.2, and then it slowed down to ~5200 seconds. That may be seen as a regression, but my understanding is that this is the cost of move into core - the contrib module was probably limited in various ways, and proper integration with the rest of the core required fixing these shortcomings.

What about GIN? This feature was introduced in PostgreSQL 8.2, directly as in-core feature (so not as contrib module first).

fulltext-gin.png

Interestingly it was gradually slowing down a bit (by about ~15% between 8.2 and 9.3) - I take it as a sign that we really need regular benchmarking as part of development. Then, on 9.4 the performance significantly improved, thanks to this change:

  • Improve speed of multi-key GIN lookups (Alexander Korotkov, Heikki Linnakangas)

also known as "GIN fastscan".

I was discussing GIN vs. GiST maincenance cost vs. query performance a few paragraphs back, so what is the performance difference between GIN and GiST?

fulltext-gist-vs-gin.png

Well, in this particular benchmark, GIN indexes are about 10x faster than GiST (would be sad otherwise, because fulltext is the primary use of GIN), and as we've seen before it was not much slower than GiST maintenance-wise.

GIN fastscan

So what is the GIN fastscan about? I'll try to explain this, although it's of course a significantly simplified explanation.

GIN indexes are used for indexing non-scalar data - for example when it comes to fulltext, each document (stored in a TEXT column as a single value) is transformed into tsvector, a list of words in the document (along with some other data, but that's irrelevant here). For example let's assume document with ID=10 contains the popular sentence

10 => "The quick brown fox jumps over the lazy dog"

This will get split into an array of words (this transformation may even remove some words, perform lemmatization):

10 => ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]

If you build GIN index on this "vector" representation, the index will effectively invert the direction of the mapping by mapping words to IDs of all the rows containing that word (each row ID is a pair of block number and offset on that block):

"The" => [(0,1), (0,10), (0,15), (2,4), ...]
"quick" => [(0,1), (0,2), (2,10), (2,15), (3,18), ...]
"brown" => [(1,10), (1,11), (1,12), ...]
...

Then, if you do a fulltext query on the document, say

SELECT * FROM documents WHERE to_tsvector(body) @@ to_tsquery('quick & fox');

it can simply fetch the lists for quick and fox and combine them, to get only IDs of the documents containing both words.

And this is exactly where GIN fastscan was applied. Until PostgreSQL 9.4, the performance of this combination step was determined by the longest list of document IDs, because it had to be walked. So if you had a query combining rare and common words (included in many documents, thus having a long lists of IDs), it was often slow.

GIN fastscan changes this, starting with the short posting lists, and combining the lists in a smart way (by using the fact that the lists of IDs are sorted), so that the duration is determined by the shortest list of IDs.

How much impact can this have? Let's see!

Compression

The fastscan is not the only improvement in 9.4 - the other significant improvement is compression of the posting lists (lists of row IDs). If you look at the previous example, you might notice that the posting list can be made quite compressible - you may sort the row IDs (first by block number, then by row offset). The block numbers will then repeat a lot, and the row offsets will be an increasing sequence.

This redundancy may be exploited by various encoding schemes - RLE, delta, ... and that's what was done in PostgreSQL 9.4. The result is that GIN indexes are often much smaller. How much smaller really depends on the dataset, but for the dataset used in this benchmark the size dropped to 50% - from ~630MB to ~330MB. Other developers reported up to 80% savings in some cases.

Relative speedup

The following chart (already presented at the beginning of this blog post) presents speedup of a random sample from the 33k queries (plotting all the queries would only make it less readable). It shows relative speedup depending on the duration on PostgreSQL 9.3, i.e. each points plots

  • x-axis (log-scale) - duration on PostgreSQL 9.3
  • y-axis (linear) - (duration on PostgreSQL 9.4) / (duration on PostgreSQL 9.3)

So if the query took 100 ms on PostgreSQL 9.3, and only takes 10 ms on PostgreSQL 9.4, this is represented by a point [100, 0.1].

fulltext-timing-speedups.png

There are a few interesting observations:

  • Only very few queries slowed down on PostgreSQL 9.4. Those queries are either very fast, taking less than 1ms, with a slow-down less than 1.6 (this may easily be a noise) or longer but with slowdown well below 10% (again, may be a noise).
  • Vast majority of queries is significantly faster than on PostgreSQL 9.3, which is clearly visible as an area with high density of the blue dots. The most interesting thing is that the higher the PostgreSQL 9.3 duration, the higher the speedup.

This is perfectly consistent with the GIN fastscan - the queries that combine frequent and rare words took time proportional to the frequent word on PostgreSQL 9.3, but thanks to fastscan the performance is determined by the rare words. Hence the exponential speedup.

Fulltext dictionaries

While I'm quite excited about the speedup, the actual performance depends on other things too - for example what dictionary you use. In this benchmark I've been using the english dictionary, based on a simple snowball stemmer - a simple algorithmic stemmer, not using any kind of dictionary.

If you're using a more complicated configuration - for example a dictionary-based stemmer, because that's necessary for your language, this may take quite a significant amount of time (especially if you're not using connection pooling and so the dictionaries need to be parsed over and over again - my shared_ispell project might be interesting in this case).

GIN indexes as bitmap indexes

PostgreSQL does not have traditional bitmap indexes, i.e. indexes serialized into simple on-disk bitmaps. There were attempts to do that feature in the past, but the gains never really outweighter the performance issues (locking and such), especially since 8.2 when bitmap index scans were implemented (i.e. construction of bitmaps from btree indexes at runtime).

But if you think about that, GIN indexes are really bitmap indexes, with different bitmap serialiation format. If you're craving for bitmap indexes (not uncommon in analytical workloads), you might try btree_gin extension which makes it possible to create GIN indexes on scalar types (by default GIN can be built only on vector-like types - tsvector and such).

Summary

  • The wisdom "GIN indexes are faster to query but more expensive to maintain" may not be true anymore, especially if the query performance is more important for you.
  • Load performance improved a lot, especially in PostgreSQL 8.2 (GiST) and 8.4 (GIN).
  • Query performance for GiST is mostly the same (at least since PostgreSQL 8.3 when GiST was included into core).
  • For GIN, the query performance was mostly the same until PostgreSQL 9.4, when the "fastscan" significantly improved performance of queries combining rare and frequent keys.
17 Mar 15:47

The GNU Manifesto Turns Thirty (New Yorker)

by corbet
The New Yorker notes the 30th anniversary of the GNU Manifesto. "Stallman was one of the first to grasp that, if commercial entities were going to own the methods and technologies that controlled computers, then computer users would inevitably become beholden to those entities. This has come to pass, and in spades. Most computer users have become dependent on proprietary code provided by companies like Apple, Facebook, and Google, the use of which comes with conditions we may not condone or even know about, and can’t control; we have forfeited the freedom to adapt such code according to our needs, preferences, and personal ethics."
17 Mar 15:35

Joshua Drake: Stomping to PgConf.US: Webscale is Dead; PostgreSQL is King! A challenge, do you accept?

I submitted to PgConf.US. I submitted talks from my general pool. All of them have been recently updated. They are also all solid talks that have been well received in the past. I thought I would end up giving my, "Practical PostgreSQL Performance: AWS Edition" talk. It is a good talk, is relevant to today and the community knows of my elevated opinion of using AWS with PostgreSQL (there are many times it works just great, until it doesn't and then you may be stuck).

I also submitted a talk entitled: "Suck it! Webscale is Dead; PostgreSQL is King!". This talk was submitted as a joke. I never expected it to be accepted, it hadn't been written, the abstract was submitted on the fly, improvised and in one take. Guess which talk was accepted? "Webscale is Dead; PostgreSQL is King!". They changed the first sentence of the title which is absolutely acceptable. The conference organizers know their audience best and what should be presented.

What I have since learned is that the talk submission committee was looking for dynamic talks, dynamic content, and new, inspired ideas. A lot of talks that would have been accepted in years past weren't and my attempt at humor fits the desired outcome. At first I thought they were nuts but then I primed the talk at SDPUG/PgUS PgDay @ Southern California Linux Expo.

I was the second to last presenter on Thursday. I was one hour off the plane. I was only staying the night and flying home the next morning, early. The talk was easily the best received talk I have given. The talk went long, the audience was engaged, laughter, knowledge and opinions were abound. When the talk was over, the talk was given enthusiastic applause and with a definite need for water, I left the room.

I was followed by at least 20 people, if not more. I don't know how many there were but it was more than I have ever had follow me after a talk before. I was deeply honored by the reception. One set of guys that approached me said something to the effect of: "You seem like you don't mind expressing your opinions". At this point, some of you reading may need to get a paper towel for your coffee because those that know me, know I will readily express an opinion. I don't care about activist morality or political correctness. If you don't agree with me, cool. Just don't expect me to agree with you. My soapbox is my own, rent is 2500.00 a minute, get in line. I digress, what did those guys ask me about? Systemd, I don't think they were expecting my answer, because I don't really have a problem with Systemd.

Where am I going with this post? I am stomping my way to PgConf.US with an updated version of this talk (You always learn a few things after giving a performance). I am speaking in the first slot on Friday and I am going to do everything I can to bring it. I can't promise to be the best, I can promise to do everything in my power to be my best. I am being recorded this time. My performance will be on the inner tubes forever. I have no choice.

A challenge, do you accept?

I challenge all speakers at this voyage of PgConf.US to take it up a notch. If you were accepted, you have a responsibility to do so. Now, now, don't get me wrong. I am not suggesting that you put on a chicken suit and Fox News t-shirt to present. I am however suggesting that if you are a monotone speaker, try not to be. If you are boring, your audience will be bored and that is the last thing the conference, you or the audience wants. So speak from your diaphragm, engage the audience and make their time worth it!

16 Mar 19:54

Iran as Regional Hegemon: Tehran’s Success and Riyadh’s Failure

by David P. Goldman

Each for its own reasons, the world’s major powers have decided to accept Iran as a regional hegemon, I wrote March 4 in Asia Times, leaving Israel and the Sunni Arabs in isolated opposition. The global consensus on behalf of Iranian hegemony is now coming clearly into focus. Although the motivations of different players are highly diverse, there is a unifying factor driving the consensus: the Obama administration’s determination to achieve a strategic rapprochement with Tehran at any cost. America’s competitors are constrained to upgrade their relations with Iran in order to compete with Washington.

The Obama administration’s assessment of Iran’s intentions is so positive that Iranian official sources quote it in their own propaganda.  As Jeryl Bier observed at the Weekly Standard, the just-released Threat Assessment report of the director of National Intelligence makes no mention of Iran’s support for terrorism, in stark contrast to the explicit citation of Iranian terrorism in the three prior annual reports. The omission of Iran’s terrorist activities is noteworthy. What the report actually says is even more disturbing. It praises Iran with faint damn:

Despite Iran’s intentions to dampen sectarianism, build responsive partners, and deescalate tensions with Saudi Arabia, Iranian leaders—particularly within the security services—are pursuing policies with negative secondary consequences for regional stability and potentially for Iran. Iran’s actions to protect and empower Shia communities are fueling growing fears and sectarian responses.

Iran supposedly is doing its best to “dampen sectarianism, build responsive partners, and deescalate tensions with Saudi Arabia” — complete and utter falsehood. Iran is infiltrating Saudi Arabia’s Shi’te-majority Eastern Province (also its most oil rich) to agitate against Saudi control, and sponsored a coup against a Saudi-allied regime in Yemen. The report attributes nothing but good intentions to the Tehran regime, and worries only that its policies will have “negative secondary consequences” due to its (understandable, of course) efforts to “protect and power Shia communities.” Iran’s primary motivation, in the administration’s view, is to be a good neighbor and a fountain of good will. Neville Chamberlain never said such nice things about Hitler.

A sign of Saudi Arabia’s waning influence was Pakistan’s decision March 15 to refuse a Saudi request for Pakistani troops to deploy on its border with Yemen, now controlled by pro-Iranian Houthi rebels. A senior Pakistani official told the local press, “Pakistan would not rush to join the anti-Iran alliance that is being forged,” in the wake of Pakistani Prime Minister Nawaz Sharif’s visit to Saudi Arabia last week. “We cannot afford to involve ourselves in the disputes among the Muslim countries,” the official said, adding that Pakistan could spare no additional troops for Saudi Arabia.

That is a serious rebuff for Riyadh, which reportedly financed Pakistan’s nuclear weapons program as a last-ditch guarantee of its own security. As Akhilesh Pillalamarri wrote March 12 in The Diplomat, “Pakistan may be Saudi Arabia’s best bet for a strong long-term security guarantee”:

Pakistan has long had a close relationship with Saudi Arabia and has been involved in protecting that country and the House of Saud. Pakistan has much friendlier relations with Iran than Saudi Arabia does, but ultimately it is more dependent on Saudi Arabia. Saudi Arabia, for example, gave oil to Pakistan in 1998 to help Pakistan weather international sanctions against it for conducting a nuclear test. The Saudis also saved Nawaz Sharif after he was overthrown in a coup in 1999, and he is thus beholden to them.

Pakistan may have been Saudi Arabia’s best bet, but it is a bet that has not paid off. Pakistan is not beholden enough, it appears: Pakistan also is beholden to both the United States and China. The right question to ask is whether Washington intervened with Pakistan to block the Saudi proposal. And China, as I reported in my March 2 analysis, has decided that Iranian regional hegemony is the least bad alternative for the time being. China’s overriding concern is the security of its energy supplies, and it wants to avoid a full-dress Sunni-Shi’ite war in the region. Until early 2014 China thought it could rely on the United States to guarantee energy security in the Persian Gulf. With America’s strategic withdrawal from the region and the rise of ISIS, China has found itself without an American guarantee and without the resources to assert its own security interests. China’s shift towards Iran reflects these considerations.

Another issue for China, Paul Nash and Reza Akhlaghi wrote in the Diplomatic Courier March 16, is that “the rise of militant Sunni Islam is aligning China’s interests with Iran’s.” Nash and Akhlaghi argue:

The rise of the Islamic State in Iraq and Syria has thus emerged as a new component of the Chinese security calculus. Beijing is worried that the rise and spread of Sunni militant Islam so close to its borders, including neighboring former Soviet “Stan” countries of Central Asia, will kindle radical elements in Xinjiang. Sunni militant Islam also threatens to become a strategic and an ideological nightmare for China’s massive and unprecedented multi-billion dollar investments from Xinjiang westward across Central Asia, the linchpin of Beijing’s future vision of energy security and economic development. Sunni radicalism could hinder, if not derail, the realization of Beijing’s Silk Road Belt initiative, presenting a major obstacle to building out a vast overland transcontinental transportation and energy infrastructure.

In an effort to maintain stability in Xinjiang, China has set about strengthening ties with Turkey. But this is no easy task. According to a Pew Research Center poll published last July, Turkey has the most unfavorable view of China amongst the Middle Eastern countries surveyed, with 69 percent of Turks expressing a negative opinion of China, and 57 percent saying that China’s growing economy is not good for Turkey.

And so China gravitates increasingly towards Iran, which it believes can act as a buffer zone against the eastward advance of Sunni radical Islam.

Reality is a bit more complex: China envisions Turkey as a terminus for the “One Belt, One Road” initiative, but it also rankles at covert Turkish support for Chinese Uyghurs. Contrary to Nash and Akhlaghi, China will continue to balance relations between Iran on the one hand and the Saudis and Turks on the other, but it does not want to confront Iran at a moment when Iran provides an important counterweight to ISIS in Iraq, a growing source of Chinese oil imports.

If militant Sunni Islam is an important (if not dominant) concern for China, it is a primary concern for both India and Russia. Russia’s problems in the Caucasus lie with Sunni rather than Shi’ite Muslims. ISIS’ success has inspired copycat terrorists in Russia such as the Caucasus Emirate. An estimated 2,500 Muslims from Chechnya and elsewhere in the Caucasus have joined ISIS, and ISIS has declared its intention to “liberate” the Caucasus from Russian control. Russia warned the West a year ago that it would align with Iran to punish the West over the Ukraine conflict.

For India, an increase in Iran’s influence represents a distraction for its main opponent Pakistan, which is 80% Sunni and shares a border with Iran in fractious Baluchistan. India may not relish the prospect of Iran as a nuclear power, but it has no more sense of urgency about this than does Israel about North Korean nuclear weapons. China does not want a nuclear arms race in the Persian Gulf, but it needs time to develop a policy response independent of the United States. Washington’s embrace of Tehran has made Iranian regional hegemony the path of least resistance. For the time being, it’s Iran’s show.