Piranha II: The Spawning        

Piranha II: The Spawning (Movie Review)

Director: James Cameron | Release Date: 1981

On the Web

Piranha II: The Spawning

director: 
James Cameron
Release Date: 
1981
7

Lance Henriksen is Police Chief Martin Brody, excuse me, Police Chief Steve Kimbrough. He’s grizzled, chiseled and he’s the only law in Amity… excuse me again, Elysium Island. His estranged wife Ann and is a microbiologist working as a dive instructor. No one is quite sure why. Their teenage son Chris is an affable kid who has a troublingly familiar way with his mother; unless unbeknownst to most of us there is some obscure Caribbean custom that normalizes teasing your naked mom with fish when she is in bed. Ann and Chris live in the resort hotel where Ann works. Steve apparently lives on the water.

Elysium Island is flooded by boatloads of tourists; most conspicuously a swinging-dick diver with John Parr hair named Tyler Sherman. Sherman is hot after Ann’s fanny and signs up for her dive class. During that class, Freddie Mercury’s Latino cousin (no not really) disappears in the sunken wreck of an old naval research vessel. When Ann goes to retrieve him she finds his floating carcass, chewed to ribbons.

In the aftermath of the tragedy, Sherman tries to cozy up next to Ann. Meanwhile, Chris sets off on an intra-island cruise as a deckhand, with Jonathan Quayle Higgins (again, not really) and his improbably fetching daughter. For his part Steve uses his helicopter P.A. to yell at people and employs nothing approximating an investigative technique in trying to stem the rising death toll. Of course, the real culprit is a school of genetically modified Piranha/Grunion/Exocoetidae (flying fish) hatched from a batch of eggs that went unrecovered from the sunken naval wreckage.

This is the set-up of “Piranha 2: The Spawning” , James Cameron’s directorial debut and celluloid proof that Lance Henriksen has always been between 45 and 60 years of age. There are other cinematic tidbits that are proven beyond doubt by "Piranha 2". For instance, the Italian film industry of the late 70’s early 80’s would not jump off of a dead horse until every salvageable piece of meat was stripped from its skeleton. Much as they did with Zombies, Nazis, Nuns, etc. Italian producers pounced on the “Jaws” structure and churned out several knock-offs including “Orca” , “ Tentacles” , “The Last Shark” , “ Devil Fish” , and “Piranha 2”. Actually this film is a reimagining/rip-off/sequel of and to a rip-off, since the original “Piranha” was not produced by the Italians but has virtually an identical concept.

If you are someone who loves James Cameron’s work and you haven’t seen this one, stay away. Very seldom throughout its running time does this resemble a Cameron film. In fact it is about 75% Italian trash (this is a complimentary term) and 15% misguided effort to establish a character based story. From the familiar jazzy music to the unmotivated nudity (of which there is too little) to the endearingly cheap creature effects, “Piranha 2” simply hemorrhages olive oil.

Irrespective of genre, there are certain qualities that most of these spaghetti knock-offs possess. They are often loaded with gore, nudity and sub-par acting. Equally true is that the intentional gags usually fail and the unintentional laughs are absolute entertainment gold. “Piranha 2” is an exception to most of these standards only in degree of severity. These exceptions may well be due to Cameron’s damnable American-traditionalist instinct imploring him to rein in the chaos. The good news is that for the most part the Italian goofcore tradition wins out.

If you are like me and enjoy this era of filmmaking because of all of its charming haplessness, then this film will be a welcome diversion from today’s glut of horror comedies that aren’t funny and shockfests that aren’t shocking. “Piranha 2” combines the best/worst conventions of Italian schlock with the bawdy lameness of an 80’s Spring break movie.

If I were to write a synopsis of the important aspects of this film it would go something like:

A sunken wreckage nookie fest goes bad when a winged school of baneful Big Mouth Billy Bass eat the lovers’ genitals. Back on shore a cougar with female pattern baldness stalks unsuspecting pool boys, while a dorky dentist falls for the ugliest woman on the island. A stuttering chef is duped out of dinner by two swinging pirate booties from the S.S. Poon Schooner and the annual grunion fest is transformed into a bloodbath by hand-puppet Piranha while a heavy set man is heard to say “There’s only one way for a fat guy to be first when running for the beach… Cheat!”

If this sounds like fun and you have never dipped your toe into the dangerously addictive waters of the Italian cheese spring then “Piranha 2: The Spawning” is worth a try. If you are more of a head-first type you should go rent “Zombie Holocaust" (aka "Dr. Butcher M.D.") and watch it sober. Or to approximate that experience, invite friends over, drink , disrobe, lift weights, hit up the hot tub, go bow hunting and cap the night off with a round of whippits.


          Re: using IPTMigrationManagerto query for objects to be migrated        
8: if the object name is localized or not
1024: uuid (what you see on the property and names page with the object id)
131072: migration requestor
1048576: migration date

Migration comment is always 262144 with migration objects. But it could mean something else in queryresults from other query types.

          The Living Skeleton (Kyûketsu dokuro-sen)        

The Living Skeleton (Kyûketsu dokuro-sen) (Movie Review)

Director: Hiroshi Matsuno | Release Date: 1968

On the Web

The Living Skeleton (Kyûketsu dokuro-sen)

director: 
Hiroshi Matsuno
Release Date: 
1968
8

A group of pirates hijack a boat to steal it’s cargo and in the process maliciously gun down everyone on board. Months later the ship continues to reappear off the coast and a young girl named Yoriko feels strangely drawn to this ghost ship. She makes her way on board to find out her twin sister was among those who had been murdered, and soon afterwards the gunmen begin to die one at a time.

One of the reasons I think I enjoy classic Japanese movies so much is that despite the fact that they are older movies, they are usually so foreign, and oftentimes so bizarre, that they really don’t seem dated at all. In fact many of the older Japanese horror movies tend to be about the samurai era which makes them seem even more exotic to me. However, in the case of “The Living Skeleton,” it is set in modern times and is surprisingly Western. The opening minutes of the film struck me as a bizarre, and completely unexpected, time-capsule of post-war Japan, and highlighted the American influence on Japanese culture with images of go-go dancers, speedboats, and even Catholicism. Also the element of the “ghost ship” seems overtly Western, as the design of the ship is something you might expect to see in an American film of the time.

The movie starts out a bit slow and I thought I’d made a mistake in watching this, but it really kicks into high gear as soon as Yoriko and her boyfriend discover some skeletons that are tangled in sea weeds while they are playing on their speed boat. These skeletons appear two or three times in the movie and are so absolutely ridiculous looking that they seem more like something that belongs in an old Disney cartoon and not in a horror movie at all. However these instances of special effects that are a little bit “off” are a large part of what ultimately makes “The Living Skeleton” such an incredibly fun movie. There are tons of silly looking plastic bats attached to strings, several miniatures that don’t quite look right, bodies “dissolve” using stop motion photography which are eaten away by “acid that is made with human blood,” and dummies that are supposed to be people which are thrown down buildings and off boats to comical effect.

Every now and then, when I watch a movie that Criterion has released I have a hard time understanding what they saw in the film, however with “The Living Skeleton” there isn't any mystery whatsoever. This movie is a real gem that is absolutely bursting with charm. In fact the only movie I can really compare it to is the original “The Evil Dead,” which is also much more charming than it is “good” in the traditional sense, except for in the case of “The Living Skeleton” there is no twinkle of goofiness from the actors like you get from Bruce Campbell in “The Evil Dead.” Every performer is giving this movie their all, as if they were making the most serious and important movie ever made, which contrasted with how silly the special effects and plot are, only serve to make it even more enjoyable.

If you were to buy this movie, it comes in a four-pack with “Goke: Body Snatcher from Hell,” “Genocide,” and “The X from Outer Space,” all of which are fun movies, however in my opinion “The Living Skeleton” stands head and shoulders above those other films because of how incredibly fun and charming it is. I was a little skeptical of this movie at first, but after finishing it, this is a film that I am really excited about and look forward to revisiting in the near future. If you have any interest in classic Japanese horror films, or think you might enjoy a foreign counterpart to a movie like “The Evil Dead,” than I really couldn't recommend this movie any more highly.


          Reply to Windows / Office Licencing on Thu, 23 Jun 2016 15:34:02 GMT        

@Quazz In 8.1 and later, windows becomes un-activated when it detects it’s hardware UUID changed. MS Office is the same way now.


          The Barn        

The Barn (Movie Review)

Director: Justin Seaman | Release Date: 2016

On the Web

The Barn

director: 
Justin Seaman
Release Date: 
2016
6

Recently Ciara Wardlow wrote a piece over at Film School Rejects exploring the intersection of fandom and cinephilia. The author’s focus is mainly on convergence culture and franchise product development, considering the ongoing relationships between viewers and diegetic worlds. While the difference between the two terms parses words to an extent the differentiation does provide a fruitful lens from which to look at the ongoing love affair filmmakers and show runners (maybe media-makers overall) have with that shrink-wrapped Kraft single sort of 80s cheese aesthetics.

Director/Writer Justin Seaman is clearly a fan of what the 1980s horror filmmakers have wrought. Invoking styles and tropes from Carpenter, Raimi, and a host of one-off cult classics, Seaman throws down his own power glove of a film in The Barn. Set in your nondescript Halloween-town middle America a pair of friends Sam (Mitchell Musolino) and Josh (Will Stout) set out on one last Halloween hurrah, sticking it to the uptight religious folks in town, partying with some friends at a concert, and relishing in the last gasp of candy & egging. All of this revelry is of course filled with booze and weed and accompanied by your standard troupe of genre characters including token black friend Russell (Nickolaus Joshua), aggressive but fun loving jock Chris (Cortland Woodard), his hyper-sexualized girlfriend Nikki (Nikki Howell), and Sam’s main crush Michelle (Lexi Dripps). But when the group inadvertently awakens a trio of demons named "The Boogeyman", "The Candycorn Scarecrow", and "Hallowed Jack" they gang find they're in for a goo-soaked fight to the death.

The Barn occupies that comfortable fandom niche for those of us who have survived the crucible of 80s video and theatrical horror. Saturated in orange hues, slithering green curse bolts, late night TV personalities played by none other than Ari Lehman, rockabilly, and drunkard locals Seaman’s film is comfortably at home in this genre playground. Knowing to rarely go serious, the film warmly embraces the hokey qualities of many of its predecessors, attempting to veer just outside Troma-level territory. The film’s extravagant gore and general irreverence are infectious for those who come with a similar sort of movie watching experience. For a large portion of the film’s second half we’re treated to an endless carnival splatter house that refuses to quit even by the film’s finale. These moments of goo, jack-o-lantern style lighting, and debauchery are where the The Barn finds purpose.

However, the film does struggle in its capacity to find an original voice in the sea of its genre references. Tending toward a buddy-hood in crisis flick rather than a final girl story, Sam and Josh’s relationship is saddled with the emotive weight of the film. Recalling Edgar Wright’s Cornetto Trilogy to varying degrees, the relationship between the friends works at its most congenial and ribbing but falters when narrative pressures are forced between the pair. The Barn also can’t get past the genre’s character types reducing Nikki to a twice breast close-up and Russell to the roll of “first victim” (despite Joshua’s charismatic turn). In an attempt to enrich the film’s mythology Sam is said to have a series of Halloween tradition rules he follows every year. And while these serve a narrative purpose the sincerity with which they are presented marks their derivative nature more shallow than the film’s whacky elements.

That the filmmakers behind The Barn are well versed in the world of 80s splatter-supernatura is apparent from frame one. It’s an admittedly exciting opening sequence that throws a sleeveless jean jacket on you while resting a pair of those paper 3D blue and red glasses on your eyes. You get a palpable sense of affection and fan appreciation from the filmmakers and if you have the cultural memory of such elements The Barn will not disappoint. Just don’t expect much more than a delightful, splatter filled rehash.


          One Dark Night        

One Dark Night (Movie Review)

Director: Tom McLoughlin | Release Date: 1983

On the Web

One Dark Night

director: 
Tom McLoughlin
Release Date: 
1983
3

1981 was a low point for the U.S. economy. The recession was a rough chaser for stagflation but proved to be a perfect aperitif to numb the public for the launch of the Reganomics era. Needless to say as a 10 year old I knew nothing about supply side economics nor could I quite grasp why government money to public programs was a bad idea but allocating a couple trillion tax dollars to the policy of mutual assured destruction was essential.

Alright, maybe my understanding hasn’t grown a lot over the last 29 years. At 10 I did know that candy, comics and movie money was scarce. Each week’s meager allowance helped me form my first ideas around fiscal responsibility and gave me early lessons about needing to cast a skeptical eye toward advertising. After all, one matinee was roughly the same price as 2 packs of Hubba Bubba chocolate flavored gum, 2-3 comics and 1 neon cylinder of Nehi Blue Cream soda, provided you also had 3 empty bottles to trade in for deposit money. Picking a bad flick would dampen my spirits and empty my pockets. Worst of all it would leave me in fiend mode until I could trade a spare Jawa action figure or a Cheryl Ladd (nude behind the palm frond) Charlie’s Angel Chewing gum card for a Big Hunk or an Abba Zabba.

The most resonant learning experience around a poor movie choice came at the hands of Warren Beatty, actor, director, liar. I spent a whole week’s dishwashing and pigeon coop cleaning money on 3 hours and 14 minutes of Bullshit, excuse me, Bolshevik melodrama. Why? Well, you see my mind; only a decade old at that point had been swept away after watching a rousing trailer for “Reds” on TV. Dashing, somewhat young Warren winced inside an exploding train being ambushed by grimy, hard charging Cossack rogues waving shiny sabers amid a firestorm of erupting mortar fire. I was sold. I was also too young to ask myself why all this action was only enough to fill the final 30 seconds of the 2 minute preview. When I got to the theater I found all that action condensed into 5 minutes at the midpoint of the movie. Fuckers. And now… “One Dark Night”.

Julie (Meg Tilly) is a pretty teen who is dating the captain of the basketball team. Though this affords her a rewarding relationship it has put her on the outs with the ‘Sisters’ the school’s most exclusive female clique. The lead sister once dated Julie’s hunk and has plotted a way to put the maiden faire through hell for a measure of retribution. That plan is to offer Julie membership and a sweet satin ‘Sisters’ jacket in exchange for spending a night in the local mausoleum. Of Course the ‘Sisters’ will sneak in after Julie’s settled down and try to scare her out of completing the evening. Did I mention that they slipped her some Demerol disguised as sleeping pills? Of Course things don’t go very well for anyone as the freshly buried mad Russian mystic Raymar chooses that very night to practice a little psychic vampirism from beyond the grave.

What “Reds” and “One Dark Night” have in common is the ability to lure the potential viewer by way of a grossly misleading trailer. The primary difference is that “Reds” is actually a decent movie if you aren’t ten and have at least a passing interest in history. “One Dark Night” is simply a cheap fraud of a horror film. Even the endlessly unique Elizabeth (don’t call me E.G.) Daily can’t muster enough with her odd delivery to deliver this from the realm of cinematic Ambien. Hell, they send Adam West galloping in on the back of a completely inconsequential role to try and fire the film’s dead engines. That doesn’t work either. Batman can’t change the fact that nothing happens in the first 2 and ½ acts of the movie. Yes, there is the aforementioned plot but that should’ve been developed in 15 minutes. Instead it is stretched over the first hour with no significant character development and all the tension involved in sun-drying meat.

When the action does kick in there’s some nice practical effects work but not a whole lot more that is praiseworthy. Made two years after “Reds” and not seen by this reviewer for a full 26 years after that, “One Dark night” was still easily linked to the experience of being a 10 year old waiting an hour and a half for the Cossacks to ride.

In the final analysis, six hours by yourself in a mausoleum in broad daylight would be much more stimulating than a single viewing of “One Dark Night”. Many weeks I get to watch only one film; the one I review for the site. When the film is bad it is easy to embrace the prospect of flaying it in the review. When a movie is boring, and lifeless and even tearing it apart seems like very little consolation for having to sit through it, I positively regress. I become as petulantly resentful as a young boy who traded a week’s worth of morning apple fritters or afternoon milkshakes to watch journalists in love against the backdrop of the October Revolution. Warren Beatty… asshole, Batman, Reganomics, Cheryl Ladd… Fuckers.


          Lady in White        

Lady in White (Movie Review)

Director: Frank LaLoggia | Release Date: 1988

On the Web

Lady in White

director: 
Frank LaLoggia
Release Date: 
1988
7

I have a theory that nostalgia is one of the most destructive and unproductive emotions people are capable of and can directly be blamed for many of the evils in this world, including 90% of VH1’s programming, the inexplicable popularity of any number of past-fetishizing politicians/pundits and Oliver Stone’s career. I’m far from innocent, myself - a disproportionate amount of the music on my ipod was recorded between 1992 and 1997 and I’ve spent plenty of beer-soaked nights trying to remember the lyrics to the theme song to “Mr. Belvedere” or who the fifth member of New Edition was.

In measured doses and cut with a healthy amount of cynicism and realism, there’s nothing wrong with a little bit of nostalgia and a handful of films and tv shows have risen above the sappiness to create something timeless.

“Lady in White” hits with a double-whammy of nostalgia. When it was released in 1988 it rode the wave of Reagan-era nostalgia for the 50s and 60s and today, as a 20-year-old, kid-friendly horror movie, it’s just about due for a resurgence amongst those who half remember catching it on HBO as grade-schoolers years ago. In a lot of ways, “Lady in White” could almost be “The Wonder Years” with ghosts or “A Christmas Story” retooled for Halloween, right down to the structure of a writer looking back on his childhood. Frankie, the boy at the center of the story, even gets a highly anticipated package in the mail and is tormented by a bully with an accompanying pint-sized toadie.

The story kicks off when the two bullies trick Frankie into going in the school’s cloakroom after school hours and lock him in there overnight. While trapped in the cloakroom, Frankie witnesses the ghost of a girl, who is as shocked to see him as he is to see her. The astonishment soon gives way to the ghost girl reenacting her murder and being carried off. Shortly thereafter, the murderer returns to the cloakroom to retrieve some incriminating evidence that dropped down the heating vent and, noticing Frankie, attacks him and nearly strangles him to death.

When Frankie recovers, he shares his story the schools African-American janitor is arrested for the attack as well as a series of child murders that have taken place over the last ten years. There is no real evidence linking the janitor to the crime, but the corrupt police department are eager to pin the murders on someone and in the age of Jim Crow a black suspect makes a fine scapegoat.
Meanwhile, Frankie begins seeing both the ghost girl who he learns is looking for her mother as well as a mysterious lady in white who is said to haunt an abandoned house in the nearby woods. Together with his older brother, Frankie tries to piece together the identity of the murderer, how to reunite the girl with her mother and how the lady in white is linked to all this.

“Lady in White” is a great example of a gateway film that is entertaining and spooky enough to please seasoned horror fans but light enough on gore and scares that a kid could watch it without having to sleep with the light for weeks after. What makes it work is that the film isn’t toned down like most of the PG-13 horror flicks of today, where it’s clear that they’ve cut away just enough gore and covered just enough breasts to bump up against an R rating without ever crossing the line. Instead, the stronger stuff isn’t in the movie because it doesn’t need to be. The film knows what it is and stays true to that.

It is inevitable that a 20 year old movie with a good amount of special effects is going to look dated and “Lady in White” is no exception. The ghosts and the backgrounds never quite mesh up and it’s clear that most of the movie was shot on a sound stage. In particular, the woods outside the Lady in White’s house seem to be filled with more fog machines than a Whitesnake concert. The two inches of thick fog on the forest floor is so cheesy-looking that it instantly destroys the suspension of disbelief the movie has been building up to that point. I can forgive dated bluescreen effects but there’s no excuse for a filming a spooky forest that looks like something out of a Jaycees haunted house.

Another issue with the movie is the sloppy way it tries to make a nod at the civil rights movement, presumably out of a sense of duty that any movie set in the mid-60s has to shove in something about race relations. The problem is that the storyline goes nowhere. The janitor and his wife are introduced only to be taken out of the movie in a bizarre scene that could have come from a different movie and are never referred to again. It almost feels like the writer tried to flesh out the movie by swiping a few characters from “To Kill a Mockingbird” (including the very Boo Radley-esque Lady in White herself).

Rough edges aside, “Lady in White” is worth checking out, especially if you plan on watching it with a younger or otherwise non-horror-inclined audience. If you look past the cheesy effects and the occasional blatantly contrived scene you’ll find a good-humored ghost story that achieves a nice balance between nostalgia and scares.


          Evil Ed        

Evil Ed (Movie Review)

Director: Anders Jacobsson | Release Date: 1995

On the Web

Evil Ed

director: 
Anders Jacobsson
Release Date: 
1995
8

As my life begins its inevitable journey through the rugged terrain of middle age, I've discovered that my genre-related cravings are leaning heavily towards the silly, the outlandish, and the unapologetically over-the-top. In general, horror movies aren't very frightening to me anymore, forcing yours truly to turn his attention towards films that are saturated in gore, shock, and, more importantly, outlandish physical comedy. If someone gets struck repeatedly about the head and neck while entrails and assorted body parts explode across the screen, then I'm usually a pretty happy camper. Call me what you will, but it's better than anything on prime time television at the moment.

But, I digress.

To put a finer point on it, I thoroughly enjoy consuming motion pictures that highlight the laugh-out-loud humor present in wanton bloodshed and freakish, bodily-related horror. Enter Swedish director Anders Jacobsson's zany 1995 gorefest "Evil Ed," a movie I seriously doubt I'll ever tire of watching. Crafted by talented individuals who have an obvious affinity for Three Stooges-inspired humor and a knack for skewering genre cliches, the film manages to poke fun at the genre it loves so dearly while delivering a stylishly clever experience that's heavy on bizarre creatures and gory dismemberment. Needless to say, it rocked my rosy red socks off.

The story concerns itself with Ed (Johan Rudebeck), a conservative, mild-mannered film editor who's yanked from his usual duties to help out in his company's "splatter and gore" department. According to his boss, quite a bit of nasty footage needs to be excised from their successful "Loose Limbs" franchise before its scheduled release, and Ed's been hand-picked for the dirty job. Locked away inside a strange suburban home with yards of disturbing footage to contend with, our hero spends his days and nights knee-deep in mind-warping visuals as he attempts to finish the assignment.

However, all of these putrid, stomach-churning images are having their way with Ed's fragile little mind, causing him to experience a series of horrific hallucinations involving deformed mental patients, wild-haired psychos, and adorably grotesque creatures that reside within the bowels of his refrigerator. The more footage he edits, the more frequent the terror becomes. When his boss stops by to check on Ed's progress, things get a bit out-of-hand, and before you know it, the poor sod's completely flipped his lid. Chaos ensues, severed with a heavy dose of pitch-black humor.

If you're a fan of this sort of tongue-in-cheek silliness, it's almost impossible to hate "Evil Ed," even when Jacobsson and crew start cashing in a few cheap jokes at the genre's expense. The "Loose Limbs" franchise, meanwhile, isn't too far removed from the titles released during those gloriously gratuitous 80's, complete with unchecked debauchery and "hot" chicks with abnormally large breasts. The film's obsession with violence, however, is never truly disturbing or purposely grotesque; it's too over-the-top to register as anything more than morbidly hilarious. Watching a man in the throes of an extreme physical and emotional breakdown is rarely this amusing.

The only complaint in my pocket is admittedly small one, yes, but it certainly needs addressing. Try as it might, "Evil Ed" isn't nearly long enough to properly sustain and adequately maintain all of the wacky ideas it wants to show you. There's not a lot of depth to be found here, be it plot or characters or otherwise. Although it's enormously entertaining, the whole silly affair is as shallow as a two-dollar kiddie pool. What's worse, the film comes to an abrupt halt shortly after Ed loses his marbles, which is a tad disappointing. Instead of feeling strangely satisfied as the end credits began their slow crawl across my screen, I was left wanting more. It feels sort of incomplete, as if the filmmakers had painted themselves into a corner with nowhere left to go.

Tiny problems aside, "Evil Ed" is easily as enjoyable as such like-minded fare as "Plaga Zombie," "Freak Out," and Peter Jackson's cult classic "Dead Alive." "Evil Ed" seems to fully understand just how inherently stupid the whole thing is, and its cast and crew have no problem wallowing in low-brow cheekiness. With plenty of juicy goofiness and gory gags to keep your sides splitting, it's sure to entertain even the most jaded horror/comedy fans. The uncut DVD is currently available through Ardustry, and can be purchased from online retailers for next to nothing. I've certainly paid a lot more for a lot less. Cinematically speaking, of course.


          RE[4]: FreeBSD on the Desktop        
""" And ZFS important for the desktop? What a nonsense ... """ Well, ZFS does seem already to have easier administration tools than the Linux Partitioning/RAID/LVM/EXT3 stack. There is no reason that all those layers could not be easily controlled through a simple gui. But I'm beginning to despair of it ever happening. It's not like any one of those layers is new. And still, adding a new drive to an existing filesystem is rocket science. It's not just that you have to drop to the command line to do it. It's that you have to drop to the command line and make the new drive a physical volume, add the physical volume to the volume group, expand the logical volume, and then online resize the filesystem. Oh, and you'd better do all that by UUID or label, and not device name, because you are not guaranteed that the device name will remain constant. Simple, isn't it? I envision plain old end users being able to just plug another USB drive into their machine, and have it simply added to their existing filesystem. They can already do this with RAM. Just plug it in and they have 2GB whereas they used to have 1GB. They should be able to do the same with storage. Again, there is no reason we *can't* do this in Linux. But it looks to me like ZFS has at least made some progress toward simplifying FS administration for people who don't happen to be experts. Regarding your other claim. I tend to agree, as things stand today. But, I suspect that composited desktops will gain some actual value once the silly and useless effects are dropped (retaining any features which are actually useful that may sift out), more cards support them, stability increases substantially, and they are considered mundane enough that no one talks about them any more. (And users come down hard on anyone who tries to reintroduce silliness like wobbly windows). But I suppose this is not really the place to have that discussion.Edited 2007-04-07 03:09
          CakePHPとphpMyAdminではVarchar(36)にするとUUIDに?!        
 データベースを扱っていると一意(ユニーク)な値を取得、設定することがごく普通にあります。  そのユニークな方法としてUUID(Universally Unique Identifier)というのがあります。このUUID ...
          michaelgooden/mdg-uuid (1.0.1)        
Simple UUID generation functionality, using Zend Framework 2's Zend\Math\Rand component.
          ÐžÐ´Ð½Ð° из распространённых проблем репликации        
Если ваша база OpenLDAP упорно отказывается реплицироваться, запустите сервер, на который вы хотите залить реплику, с ключом -d 16384 (отладка механизма репликации). И если там будет явная «ругань» на то, что с мастер-сервера невозможно получить entryUUID для некоторых записей, это значит, что в исходном каталоге не хватает служебных атрибутов, без которых репликация действительно не пойдёт. Отложим обсуждение вопроса о том, почему так бывает, просто пофиксим эту проблему:
Если база относительно небольшая, переведите её в read-only и сделайте полный slapcat:
$ echo 'dn: olcDatabase={номер_базы}тип_бэкенда,cn=config changeType: modifyreplace: olcReadOnlyolcReadOnly: TRUE' | \ ldapmodify -x -D cn=config -Wbr /&
$ slapcat -F /path/to/config/dir -n номер_базы & my_db.ldif

А теперь… физически удалите файлы базы и залейте LDIF-дамп базы, полученный на шаге 1, обратно:
rm -f /path/to/db/files/*
slapadd -F /path/to/config/dir -n номер_базы -l my_db.ldif
chown -R openldap_user.openldap_group /path/to/db/files/

Примечание: под «номером базы» подразумевается то число, которое проставлено для этой базы в cn=config
То есть, например, для DN=olcDatabase={3}hdb,cn=config номер базы соответственно равен трём. Для самой cn=config номер всегда равен нулю (т.е. это всегда olcDatabase={0}config,cn=config)
          Abiword 2.9.2        

Core

  • Add doublebuffering support for most of the drawing to reduce flickering. (Andrei Sfrent)
  • Some robustness fixes for lists. (Martin Sevior)
  • fl_BlockLayout::_doInsertRDFAnchorRun() needs to create fp_RDFAnchorRun or else a text:meta right at the start of a text:p will assert violently. Of course, I have to update the code in that method and that class to be tailored to RDF instead of fp_AnnotationRun which it is based on. Thanks to Martin for the info on the Dummy run assertion I was getting! (Ben Martin)
  • Updated ff localization by Ibraahiima Saar (Urmas)
  • A little bit of restructure in there because we now have hyperlinks, annotations, and rdfanchors which all share the same fp_run class tree. RDF Anchors can now be highlighted and the annotation bubble for them shows their xmlid and how many RDF triples are associated with that part of the document. Still things to do with it, but a decent step in the right direction. Oh yeah, and a new menu item to turn on/off highlighting. (Ben Martin)
  • Robustness fixes. (Martin Sevior)
  • Updated Copyright year (Xun Sun)
  • Fix crash attempting to import one of Marc's secret HTML documents from the command line. (Martin Sevior)
  • Added some Portuguese characters. (13138) (Urmas)
  • Allow backspace, delete and arrows again (Ben Martin)
  • Some RDF D&D goodness. (Ben Martin)
  • Do not show up in the File/Open dialog types, its confusing. (Ben Martin)
  • Added missing printStyleTree method to IE_Exp_HTML for usage in other plugins (Volodymyr Rudyj)
  • A few issues with double buffering and abicommand, in that mode there is no GUI so some asserts failed and some code would crash (selectclear). These new app variables shouldn't effect GUI programs but should help abicommand ones where dbl buffer is not needed. (Ben Martin)
  • Unicode list labels fix. (Urmas)
  • Removed use of deprecated GtkDialog::vbox (Volodymyr Rudyj)
  • Fix 13129 Numbered Heading is turned into Numbered List (Martin Sevior)
  • Don't create a painter when not needed. (Jean Bréfort)
  • RDF marshaled into a \*\rdf section with rdf/xml in it inside RTF on the clipboard. Copy of triples from one document to another now works. (Ben Martin)
  • The pl_ListenerCoupleCloser is designed to pass along start and end tags for objects which have only one tag in the selected range. This way copying a selection will result in a document with both start and end tags in it. See the class docs for more. Still tinkering on this a bit. (Ben Martin)
  • Now tracking bookmark open and close elements too. (Ben Martin)
  • The remains are in odf-2011-track-changes-git-svn/git-diff-2011-oct-3-cleaned.patch. Some code is added here but enclosed in #ifdef ODF_GCT guards to disable it until it is required for the ODF plugin. (Ben Martin)
  • Absolute movement bugfix (Ben Martin)
  • AbiCommand now allows multi process copy and paste, and has a "run" command to execute the gtk mainloop for X seconds. Some little things for win builds (Ben Martin)
  • Bad things used to happen when there was an RDF Link but no triples at all. A simple guard to stop that from happening in SPARQL on empty RDF cases. (Ben Martin)
  • On repeated copy and paste, do not just keep appending a new uuid to the end of the string. Instead, first remove the old uuid and then append the new one. This keeps xml:id values from continuously growing during repeated copy,paste,copy,paste,... cycles. (Ben Martin)
  • const T& use in the header file which makes a warning in msvc. (Ben Martin)
  • Reversed unwanted change in fv_ViewDoubleBuffering.cpp (Jean Bréfort)
  • Removed revision toolbar buttons until proper icons are available. (Urmas)
  • Do not include vertical fonts in the toolbar list. (Urmas)
  • Don't use horizontal scroll bars (Hubert Figuiere)
  • Scroll the list to the selected language. (Hubert Figuiere)
  • Mismatch free() with g_strdup(). Seems to crash on Windows. (Urmas)
  • Fixed an invalid write (valgrind). (Jean Bréfort)
  • Fixed a double buffering related crasher and other details (Jean Bréfort)
  • Better fix for the double buffering issue, hopefully. (Jean Bréfort)
  • Fix bug 6511: Word count on selected lines is wrong (Simon Larochelle) (Marc Maurer)
  • On linux, when I incorporate a frame image, the line breaks for the surrounding text are sometimes in the middle of a word. The patch makes sure that two static pointers do not inadvertently point to a newly created structure during the execution of fp_Textrun::split(). (Simon Larochelle)

Internationalization

  • Updated ar translation (by OLPC translation team) (Urmas)
  • Updated ar, br, da, gl, sl by SugarLabs translation service contributors. Updated es translation by F.J.F. Serrador.
  • Updated Slovak translation (Jaroslav Rynik)
  • Update spanish translation (Fco. Javier Fdez. Serrador)
  • Update galician "gl" translation (Miguel Bouzada)
  • Updated Fulah complete translation (Ibraahiima SAAR)
  • Update breton translation (Denis ARNAUD)

Import/Export

OpenDocument

  • Some new STL like methods for the string. In TextContent_ListenerState the code should perform as it did before but also fold newlines and multiple spaces inside the first call to charData(). See http://docs.oasis-open.org/office/v1.2/cos01/ In particular section 6.1.2 of http://docs.oasis-open.org/office/v1.2/cos01/OpenDocument-v1.2-cos01-part1.pdf (Ben Martin)
  • Initial support for creating unique xml:id values during copy and paste. ODF (including embedded RDF) on the clipboard now works for copy and paste to and from Calligra trunk. (Ben Martin)
  • PD_Object has to be respected in order to retain m_objectType which is crucial in serializing correctly to RDF/XML. This now allows copy and paste to Calligra and rdf links follow to the destination too. (Ben Martin)
  • New codepath which uses libgcrypt for decoding blowfish encrypted ODF files. New PL_ListenerCoupleCloser class which will emit closing elements that happen after the desired document range. For example, "te(a)xt bm-start this is(b)more bm-end" selected from (a) to (b) the bm-end will be sent to the listener too even though it is after the official range. (Ben Martin)
  • Remove the old blowfish code itself, added a link line for gcrypt which I didn't seem to need in my build but which might be required in some builds. (Ben Martin)
  • These should allow the opendoc plugin to compile without redland. (Ben Martin)

RTF

  • Fix crash when parsing bogus list in RTF. Bug #12880 (Hubert Figuiere)
  • Bug 12045: Fix parsing of annotation, frame properties and a few others. (Hubert Figuiere)

GTK+

  • Bug 12345: explicitly make empty XML tags due to a buggy parser in Maemo. (Hubert Figuiere)
  • Lots of image dialog fixes from Simon Larochelle's first contribution. (Simon Larochelle)
  • Merged the gtk3 branch. (Jean Bréfort)
  • Fix widget alignments (Hubert Figuiere)
  • Cleanup the widgets alignment. Disable the labels along the other controls (Hubert Figuiere)
  • Honour the markup in the title label. Fix a bit the paddings in the GtkTable (Hubert Figuiere)
  • Enhanced the pseudo-2d colors in the gtk backend. Still not perfect, does not work for high contrast themes, but abiword-2.8 was not better in this respect. (Jean Bréfort)

Mac OSX

  • Adding -headerpad_max_install_names on Mac LDFLAGS From ld(1) man page: " -headerpad_max_install_names (32-bit only) Add to the header padding enough space to allow changing all dynamic shared library paths recorded in the output file to be changed to MAXPATHLEN in length. " It will avoid problems to change dynamic shared library install names and rpaths recorded in a Mach-O binary (Fabiano Fidêncio)
  • Disabling Double Buffering on OS X Unfortunately, OS X still isn't ready to Double Buffering. To avoid strange behavior, at least for now, we're desabling it. (Fabiano Fidêncio)
  • Fixing text selection issue (bug 13116) Calling _generalUpdate() into _drawOrClearBetweenPosition(). According with msevior and andreisfrent, it don't will up performance, because _generalUpdate() doesn't redraw everything, just dirty runs (Fabiano Fidêncio)
  • EPUB's dialog, see you soon! For now, EPUB's dialog build is being disabled in OS X. I need/want to implement it as soon as possible. (Fabiano Fidêncio)
  • DoubleBuffering is working on OS X Thanks, Jean! (Fabiano Fidêncio)
  • Adding -headerpad_max_install_names on some plugins From ld(1) man page: " -headerpad_max_install_names (32-bit only) Add to the header padding enough space to allow changing all dynamic shared library paths recorded in the output file to be changed to MAXPATHLEN in length. " Plugins: latex, docbook, openxml, epub, openwriter, opml and (still with some problems) opendocument It will avoid problems to change dynamic shared library install names and rpaths recorded in a Mach-O binary (Fabiano Fidêncio)
  • Welcome plugins! latex, docbook, openxml, epub, openwriter and opml is a great pleasure having then with us! (Fabiano Fidêncio)
  • Big cleanup/refactor in xap_CocoaModule.cpp to The cleanup/refactor was did as an attempt to improve and simplify code's readability. (Fabiano Fidêncio)
  • Plugins in Mac are .so too instead of .dylib All file compiled with "-module" option will generate a .so and not a .dylib, as in our case. The difference between a .so and a .dylib is that first is a dynamically loadable module and the second is a shared library. So, we only can load the first, while we can link against the second. (Fabiano Fidêncio)
  • Many updates to the RDF core. Two new dialogs for RDF: an editor and a query dialog. A few new dialog superclasses to inject into the inheritance tree to get default 'boilerplate' code instead of having each dialog implement that itself. This is still a WIP. Many little utility functions and methods. (Ben Martin)
  • Link plugins properly against libabiword-x.y.dynlib (Marc Maurer)

Plugins

MS Write

  • Committed Ingo's patch. The codepage conversion had to be reverted due to issues with some documents. (Urmas)
  • Added importer option to specify default codepage ("-i 'encoding:CP1252'"). (Urmas)
  • Patch from Ingo fixing the MS Write plugin. (Marc Maurer)
  • was written. By passing an importer argument, namely '-i mswrite-codepage:CP1250' (Ingo Brückl)
  • Clean up source code and format to AbiWord coding style. (Ingo Brückl)
  • Fixes writing 4 garbage bytes in output file if invalid character is encountered. CAVEAT: Untested on MBCS locales (do we support them, to begin with?) (Urmas)
  • Add debug messages. These messages dump the internal structure of a Write file and will make troubleshooting easier. (Ingo Brückl)

Collaboration

  • Move the RDF menu from the collab plugin (wrong place) to the core menus structure... (Ben Martin)
  • A tiny improvement in the status reporting of the collab backend (Marc Maurer)
  • Fixed plugins build with both gtk versions (Jean Bréfort)
  • Make the collab xmpp backend work with gtk3 (Jean Bréfort)
  • Dist ap_Win32Res_DlgCollaborationEditAccount.rc2 (Fridrich Strba)

GNOME Office

  • Add missing files and request a stable goffice release. (Jean Bréfort)
  • Add the gtk2 version of goffice-bits (Jean Bréfort)
  • Fixed warnings in goffice-bits (Jean Bréfort)
  • Implement SVG snapshots for components when possible. (Jean Bréfort)
  • Fixed GValue initialization. (Jean Bréfort)

Equation Editor

  • Update itex2MML from 1.4.5 to 1.4.8. Changelog can be found at the maintainer's site: http://golem.ph.utexas.edu/~distler/code/itexToMML/changes (Xun Sun)

EPUB

  • EPUB plugin now using separate file for each book chapter. Fixed generation of incorrect TOC. (Volodymyr Rudyj)
  • Added temporary files cleanup (Volodymyr Rudyj)
  • Changed EPUB plugin and html exporter to handle option of exporter "bAddIdentifiers" like other exporter options (Volodymyr Rudyj)
  • Removed obsolete code fragment from HTML exporter (Volodymyr Rudyj)
  • Handle epub dialog build when builddir != srcdir (Xun Sun)
  • Correct epub dialog title and label (Xun Sun)
  • Added new HTML export options to Win32 UI (Urmas)
  • MERGE gsoc2011-refactoring [30061]:[30295] into trunk (Volodymyr Rudyj)
  • EPUB dialog for Win32, first edition. (Urmas)

Interface

Windows

  • Win32 About dialog: adjusted fonts, updated copyright years. (Urmas)
  • Win32 Unicode issue (Urmas)

Development

  • Bump version (Marc Maurer)
  • Let Windows autotools build find EPuB includes (Fridrich Strba)
  • Remove generated file from version control (Fridrich Strba)
  • Make sure several files end up in the release tarball (Fridrich Strba)
  • Include >string< (Marc Maurer)
  • Fix mingw build using autotools (Fridrich Strba)
  • Fix build with recent libpng (Fridrich Strba)
  • Corrected name of the generated la file to avoid compilation problemms of epub plugin on linux (Volodymyr Rudyj)
  • Include config.h conditionally (Marc Maurer, Ben Martin)
  • Warning and constness fixes (Hubert Figuiere, Ben Martin)
  • Various build fixes (Jean Bréfort, Ben Martin, Marc Maurer)
  • Add svn:ignore in several places (Hubert Figuiere)
  • MSVC seems to dislike these op<< for utf8 strings. I only used it in one place, so its quite easy to unuse it. (Ben Martin)
  • Use " " instead of "," to separate LDFLAGS' options. (Fabiano Fidêncio)
  • Fixing semantic error in plugins/epub/dialogs' sub-folders. (Fabiano Fidêncio)
  • The MSVC parser does not like foo(char */*bar*/); It thinks the first sequence */ is the end of a non-existing multi-line comment (Marc Maurer)
  • Removed debug messages when switching device contexts for double buffering (Andrei Sfrent)
  • Win32 build fixes. (Urmas)
  • Enable multiple debug output concatenated into one line. This change should be compatible to current usage. (Ingo Brückl)

Download


          List of contributed Drush extensions        

          Increase disk quota of a zone in SmartOS        

It is not uncommon to run out of disk space by a zone. Below a zone with uuid 1d52f6bf-d7d1-45f9-bf7b-9f9de7224040 has only 172M of free space.

> zfs list
NAME                                               USED  AVAIL  REFER  MOUNTPOINT  
zones                                             80.1G  9.97G   514K  /zones  
zones/1d52f6bf-d7d1-45f9-bf7b-9f9de7224040        9.83G   172M  10.4G  /zones/1d52f6bf-d7d1-45f9-bf7b-9f9de7224040  

Adding


                  

Sorry, layout is all garbled up. Next try (content is not changed):

When a session is started with VBoxManage, this is shown as process info:

$ ps -ef | grep "JeOS"
user      7085  6439  7 11:51 ?        00:00:02 /usr/lib/virtualbox/VBoxHeadless -comment Ubuntu JeOS -startvm 1fff150e-cdcb-4502-9aac-09f0506c298d

When a session is started with VBoxHeadless, the uuid in not shown as process info:

user      7541  6636 34 11:58 pts/1    00:00:02 /usr/lib/virtualbox/VBoxHeadless -startvm Ubuntu JeOS

This (showing the uuid as prcess info) is much needed because otherwise it is virtually impossible to identify the session pid when there are multiple sessions running.


          How to Change UUID of Linux Partition on CentOS 7        

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing information of UUID for the filesystem will be identical for the original and cloned copy, therefore the UUID is no longer unique in /etc/fstab. The following steps will show how to change UUID of linux partition on CentOS 7. 1) Use blkid command-line utility to determine device UUID : # blkid Sample output : /dev/mapper/centos_centos71-root: UUID="2bc8e0d4-64b5-4dc8-bf4a-024fc980d98a" TYPE="ext4" /dev/mapper/centos_centos71-swap: UUID="577f9541-8d2a-4666-ac8f-ff84b584eeca" TYPE="swap" /dev/mapper/vg_data-centos7_vol: UUID="b100ad2b-ad89-4e2d-ba8e-7eda7d703c40" TYPE="ext4" 2) Another way to list out uuid

The post How to Change UUID of Linux Partition on CentOS 7 appeared first on eHowStuff : Linux Tutorial for Beginners.


          UUID template tag for Django        
A while back, I had posted a template tag on djangosnippets which generates UUIDs on the fly. I figured that I’d share the same snippet here and explain why I did it. My rationale for writing this: I needed a quick way to generate random IDs to assign to dynamically generated HTML elements and then [...]
          Pandorum        

Pandorum (Movie Review)

Director: Christian Alvart | Release Date: 2009

On the Web

Pandorum

director: 
Christian Alvart
Release Date: 
2009
6

It's been quite an interesting summer for science fiction films. "District 9" and "Star Trek" were both critical and financial success for distinct reasons, and left sci-fi fans satisfied. That satisfaction has allowed "Pandorum", a film made specifically with that segment of the audience in mind, to slip under the radar, especially in a season packed with genre related films. For some, that is a shame.

"Pandorum" is set in the far-off future, on a gigantic ship wrought with technical problems. Those technical problems cause past crew members Payton (Dennis Quaid) and Bower (Ben Foster) to awaken from a forced, centuries long sleep. Mutually, they struggle to regain their composure and unite in the common purpose of restarting the ships reactor in order to escape from their current predicament. As Bower begins to work his way to the reactor while Payton stays at the controls, it becomes apparent that there's another form of life inhabiting the ship, one that's grotesque, violent, and very, very hungry.

The first act of the film is surprisingly tense, as you find yourself trying to acclimate yourself to the surroundings in the same way that Bower is. By keeping the monsters obscured and undeniably dangerous, director Christian Alvart has us peering around corners for fear that something is just waiting to tear us apart, something which becomes less and less pressing once the monsters are revealed.

Much of the lessening of tension throughout the film can be attributed to the introduction of Nadia (Antje Traue) and Mahn (Cung Lee), a pair of nomad rivals that despite their humble and peaceful former occupations, have now morphed into dirty, sexy, ass kicking martial artists. They are so odd in this world, that it seems like they were liberally plucked from a "Doomsday" or a "Mad Max" post-apocalytpic universe. This is just one of many examples where "Pandorum" represents a veritable Noah's Arc of genre conventions, which includes monsters that seem to have risen from "The Descent" and set pieces that may or may not have been teleported from "Alien(s)". Calling a film derivative isn't necessarily the highest praise, but it's also not the worst insult. While the mish-mash of obvious nods doesn't make "Pandorum" the best film, it does make it really entertaining in parts.

Although it borrows quite a bit, "Pandorum" has it's shining moments, thanks in part to a number of unique set pieces that range from pristine and beautiful to downright disgusting. There's something to be said about a film that can awe the audience with the luminescence of an immaculate biology lab, and later disgust them as Bower, covered in monster slime, crawls through an endless pile of the slumbering abominations. Especially in the closing moments, it becomes clear that these settings account for many of the strongest points of the film. With so much talk about the size of the ship, it leads one to wonder what sort of visual treasures we didn't see.

"Pandorum" opens a lot of doors throughout it's running time, and attempts to close all of them in the third act with varying degrees of success. For one, the origin of the monsters eventually explained, but it takes a lot of deduction to fill in the holes left by the exposition. Also, the treatment of the Payton character requires a substantial leap of faith, which isn't helped by Quaid's odd performance in the film's final moments. None of these loose ends ruin the film, but the way that some of them are blown-off leaves a lot to be desired.

"Pandorum" doesn't do a single thing poorly enough to make it unwatchable or un-enjoyable, nor does it do anything well enough to surpass the quality of the established films that it borrows from. Despite that, the undeniable beauty of the film's closing moments represent the fact that despite its flaws, "Pandorum" can be a very satisfying film for die hard genre fans.


          Shipping internal logs from your Kubernetes applications to a cetnralized AWS service.        
I recently wanted to put a demonstration together of what log aggregation would look like for the ELK stack.

The AWS and Kuberentes specific parts of this are arbitrary.  If you have a write URL for elasticsearch and a working logstash, you can simply copy the output segment below, use it for your logstash startup (-f option), and you will see your data in elasticsearch.

If you are using Logstash, and looking for a visualization strategy for all your data, this should be super easy to do, especially if youre using EC2 already.

1) Setup an EC2 Elasticsearch service.  This comes out of the box.  You can set it to insecure if you want to, so that anyone can write logstash entries to your connection.  Chances are this isnt a huge deal unless your logs are sensitive.  After all, you're just prototyping.


2) Now, create a logstash configuration file:


    input {
        beats {
            port => 5044
        }
        log4j {
            mode => server
            host => "0.0.0.0"
            port => 4560
            type => "log4j"
        }
    }
    output {
        if [type] == "log4j" {
            if ![stack_trace] {
                elasticsearch {
                            hosts => "search-hackday-5zdf**************6rrcap7isy2bmqm.us-east-1.es.amazonaws.com:80"
                            manage_template => false
                            index => "%{[@timestamp][host]}-%{+YYYY.MM.dd}"
                            document_type => "%{[@metadata][type]}"
                }
            } else {
                elasticsearch {
                            hosts => "search-hackday*********6rrcap7isy2bmqm.us-east-1.es.amazonaws.com:80"
                            manage_template => false
                            index => "%{[@timestamp][host]}-%{+YYYY.MM.dd}"
                            document_type => "%{[@metadata][type]}"
                 }
            }
        } else {
            elasticsearch {
                        hosts => "search-hackday-5*****p246rrcap7isy2bmqm.us-east-1.es.amazonaws.com:80"
                        manage_template => false
                        index => "%{[@timestamp][host]}-%{+YYYY.MM.dd}"
                        document_type => "%{[@metadata][type]}"
             }
        }
    }

3) Save it somewhere (/tmp/logstash.conf).

4) Now, if running logstash in a container, you'll need to inject your configuration into it.  You can simply do this by ovderriding the elasticsearch command, because you cannot overwrite a file with a config-map, due to limitations in the way that files are overwritten in volume mounts in the linux kernel.  Since YAML spaces are hell, rather then copying and pasting which you will undoubtedly copy and screw up, I'll paste screenshots of what your volumeMount/mountPath combination should look like in your pod.

Specifically, you will have volumes declared in the top of your pod, and then, in your container definition of your pod, you will have a subsection that points directly to the named logstash configmap created above.

Ignore the logstash-grafana / graphite namings, they are a vestige of the past.






Notice that I use port 80 for the AWS instance.  Thats because, rather then 9200/9300 or whatever the ES defaults are, the AWS hosted elasticsearch instances use port 80.  If you dont get this right, you'll get unreachable errors and your logstash will die.

3)  Kubernetes:  Now, in your kubernetes cluster, create a configmap like so:

kubectl create configmap hub-logstash-grafana --from-file=/tmp/logstash.conf


4) Finally, fire up your services that write to logstash.  You should see something like this:

17:01:29.950 [main] INFO  logstash.setting.writabledirectory - Creating directory {:setting=>"path.queue", :path=>"/usr/share/logstash/data/queue"}
17:01:29.974 [LogStash::Runner] INFO  logstash.agent - No persistent UUID file found. Generating new UUID {:uuid=>"c510c3fd-0efd-4ce5-a905-3059ede614c7", :path=>"/usr/share/logstash/data/uuid"}
17:01:30.937 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://search-hackday-5zdfpxm5p246rrcap7isy2bmqm.us-east-1.es.amazonaws.com/]}}
17:01:30.939 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://search-hackday-5zdfpxm5p246rrcap7isy2bmqm.us-east-1.es.amazonaws.com/, :path=>"/"}
log4j:WARN No appenders could be found for logger ...
w Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>[#]}
17:01:31.141 [[main]-pipeline-manager] INFO  logstash.outputs.elasticsearch - Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://search-hackday-5z....
17:01:31.262 [[main]-pipeline-manager] INFO  logstash.inputs.beats - Beats inputs: Starting input listener {:address=>"0.0.0.0:5044"}
17:01:31.487 [[main]-pipeline-manager] INFO  logstash.inputs.log4j - Starting Log4j input listener {:address=>"0.0.0.0:4560"}
17:01:31.501 [[main]-pipeline-manager] INFO  logstash.inputs.log4j - Log4j input
17:01:31.507 [[main]-pipeline-manager] INFO  logstash.pipeline - Pipeline main started
17:01:31.618 [Api Webserver] INFO  logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
          ZK Selenium testing without UUIDs        
Jumper Chen demonstrates one of the upcoming tools for ZK testing. This tool enables us to test ZK applications using Selenium without the need for a UUID generator. To view the blog post please click here.

          ZK Unit Testing Project - zunit        
In this article, Ryan Wu will introduce how to use zunit to create test project. And how to use components ID as UUID while testing.

          Universal Soldier: Day Of Reckoning        

Universal Soldier: Day Of Reckoning (Movie Review)

Director: John Hyams | Release Date: 2012

On the Web

Universal Soldier: Day Of Reckoning

director: 
John Hyams
Release Date: 
2012
7

I walked into the new latest installment of the Universal Soldier franchise a complete noob to the series. Early 90's direct-to-video action films aren't my forte, but the positive buzz the latest entry has generated left me curious as to what Dolph Lundgren and Jean Claude Van Damme have been up to.

The film kicks off with a brutal home invasion sequence where John (Scott Adkins) is overwhelmed my masked assailants, beaten with a crow bar then forced to watch his wife and daughter executed. Waking up in a hospital bed moths later, he no memories aside from that night. As he seeks to avenge his family and regain his life the story unfolds in bits and pieces. It turns out his family's murder is Luc Deveroux (Jean Claude Van Damme) and ex-special ops soldier that leads a renegade team of soldiers along with Andrew Scott (Dolph Lundgren). The plot, such as it is, unravels a few strands at a time and weaves mind-control, cloning and shadowy government conspiracies into the mix. It turns out that Deveroux is “waking up” similar soldiers for reasons that are never made too clear. Assisted by his stripper sidekick Fantasia (because, of course there's a stripper sidekick in this story), John spin kicks his way through the mystery until his inevitable confrontation with Lundgren and Van Damme.

The story doesn't make a whole lot of sense, and longtime fans of the franchise (I'm going to assume they are out there) may be disappointed to discover that the two marquee names are reduced to supporting roles. Still, Day of Reckoning takes a ballsy approach to plotting an action movie by mixing in influences from a wide array of genres while delivering spectacular fight sequences. It's not a particularly well put-together film, but it's a blast to watch.

Director John Hyms doesn't settle for an action film where bones break and bullets tear through flesh. Day of Reckoning cranks up the violence to an absurd, cartoonish level that hasn't been seen since 2008's Punisher: War Zone. Doors aren't made for opening; they exist to toss your opponent through. Shotgun blasts don't just kill; they hurl their targets backwards through the air like the victim was getting yanked by a hook in an old vaudeville act. Bones don't just break; they get bent at unnatural angles that suggest the human body is capable of contorting into positions that a Stretch Armstrong doll would find uncomfortable to execute. One does not just wast their hands in the blood of their enemies; they get elbow deep in crimson red while getting bits of gristle and brain matter trapped under their fingernails.While budget limitations keep Day of Reckoning from being a start to finish donnybrook, Hyms manages to fit in at least four top notch action sequences, including an assault on a brothel, a high speed car chase followed by a brutal one on one confrontation and a gonzo third act that moves at breakneck speed.

Day of Reckoning unfolds like a David Lynch film if he walked out of Kickboxer, chugged a handful of peyote and decided he wanted to make an action film his next project. When the film slows down it trades exposition scenes for bizarre, nightmarish sequences that draw heavy inspiration from Twin Peaks' Black Lodge. Freakish ancillary characters, including a warehouse boss that looks like he has a baked potato for a face flit in and out of the picture. When Van Damme or Lundgren's characters appear before John or other “freed” soldiers Hyms employs a disorienting strobe effect that grows more uncomfortable the longer it lasts.

Day of Reckoning borrows from a number of other sources aside from horror. Sure, the attempts often feel shoe horned in, or are pulled off in clumsy fashion, but points are earned for trying. I never thought I'd see the day where major themes from Eternal Sunshine For The Spotted Mind are borrowed in a film where one man tosses a forty five pound barbel weight like it was a frisbee and his opponents sternum. In the third act Hyms goes into full on Apocalypse Now worship mode, culminating with The Muscles From Brussels sporting a shaved head, face paint and a spare tire around the midsection in full-on Kurtz mode. Eagle eyed fans will notice a Shining reference as well.

The visual style also borrows from gaming, especially at the outset. The home invasion sequence is short from the first person perspective of Adkins' character and moves at half speed at points. It's as if Adkins is trying to run under water. It feels like something straight out of the first Bioshock game, and it was interesting to see it used here.

Make no mistake, Universal Soldier: Day of Reckoning is a bad movie. Yet despite its myriad of shortcomings it's entertaining as hell. It also gets points for ambition. Sometimes you need a movie that lets you turn your brain off and soak in the awesomeness of watching a man grind his enemies bones into a fine paste. This film delivers on that expectation in spades.


          äº†è§£ Web 服务规范: 第 3 部分:统一描述、发现和集成 (UDDI) (2)        

UDDI 数据结构

为了开始将公司添加到 UDDI 注册中心,Francis 定义了要输入注册中心的信息。

businessEntity

第一步是将报社本身的信息输入注册中心。为此,Francis 创建了一个 businessEntity 对象。此对象包含有关企业的信息,既用于对企业进行标识,也用于提供与其有关的信息。例如,businessEntity 对象可以包含多个名称(从而能够为公司所使用的每种语言创建一个 name 元素),联系信息(Francis 被告知将 Pat Mooney 添加为主要联系人)、与实体相关的服务(Gene 将稍后添加)和用于对公司进行标识与分类的信息。

尽管大部分人都不会采用这种方式与 UDDI 注册中心交互,但要注意的一个事实是,UDDI 实际上就是 SOAP 应用程序;执行的所有操作都作为往返传递 SOAP 消息的结果发生。这意味着,Francis 所创建的 businessEntity 最终将表示为 XML 元素。请参见清单 2。


清单 2. businessEntity 元素
												
														<businessEntity businessKey="{uuid}"
												 operator="(optional)" 
authorizedName="(optional)">
<discoveryURLs>
<discoveryURL></discoveryURL>
<discoveryURL></discoveryURL>
</discoveryURLs>
<name>The Daily Moon</name>
<name lang="fr-ca">La Lune Quotidienne</name>
<description></description>
<contacts>
<contact>
<description></description>
<personName>Pat Mooney</personName>
<phone></phone>
<email>patm@daily-moon.com</email>
<address useType="optional, billing, etc." 
sortCode="optional" 
tModelKey="optional">
<addressLine></addressLine>
<addressLine></addressLine>
<addressLine></addressLine>
</address>
</contact>
<contact>
         ...
</contact>
</contacts>
<businessServices>
<businessService serviceKey="required" 
businessKey="optional">
         ...
</businessService>
</businessServices>
<identifierBag>
      ...
</identifierBag>
<categoryBag>
      ...
</categoryBag>
</businessEntity>

businessEntity 记录并不一定要很复杂。事实上,按照 businessKey 的要求,单个名称和一个唯一标识符就足够了。不过,出于完整性考虑,我包含了完整的结构,但去掉了一些稍后将另行讨论的部分。在生产环境中,应将空白元素删除。

让我们看一看此处的一些信息。

从代码的起始处开始,businessKey 当然是唯一标识符。operator 和 authorizedName 属性由注册中心内部进行处理;您不必考虑这部分内容,它们仅仅分别表示运行注册中心的实体和添加此记录的人员或帐户。

discoveryURLs 会在每次将 businessEntity 保存到注册中心时添加到注册中心。这些 URL 旨在用作供用户访问有关 businessEntity 的更多信息的地址。

请注意,Francis 添加了一个额外的名称,用于以法语表示其名称(报社打算在法国宣传其业务)。这些实体中的每一个都具有 lang 属性,用于指定相关语言的代码。您可以提供常见缩写的可替换名称,如 IBM 对应于 International Business Machines。

接下来的可选描述是一个简单的文本字符串。事实上,UDDI 中的大部分元素都具有一个可选描述。

接下来,Francis 添加了其他一些联系人。对于每个联系人,他可以根据需要指定任意多的信息。通常会提供 personName,但电话号码、电子邮件等其他信息是由个人自行提供的,因为 UDDI 注册中心的所有信息对所有用户均可用。联系人还可能具有地址信息,使用 useType 来指定地址类型。例如,对于联系人,它可以为家庭地址和公司地址等。对于公司,useType 可以为总部、发行中心等等。

businessServices 元素将列出已与 businessEntity 关联的任何服务。由于 Gene 尚未添加任何服务,故而此元素通常为空。最后两项 identifierBag 和 categoryBag 提供了有关公司本身的其他信息,以便进行搜索。我们稍后将对二者分别进行分析。





回页首


publisherAssertion

publisherAssertion 是 businessEntity 之间的关系声明。例如,Francis 知道此项目的目标之一是使用 Daily Star 中提供的服务,其中,Daily Star 将为 Daily Moon 提供体育赛事比分。这使得 Daily Star 成为 Daily Moon 的内容提供者。Francis 可以按照清单 3 中所示的方式表示此关系。


清单 3. publisherAssertion
                    
<publisherAssertion>
<fromKey>(businessKey for Daily Star)</fromKey>
<toKey>(businessKey for Daily Moon)</toKey>
<keyedReference tModelKey="904BD800-D53A-11DA-B055-850A1DA99D79" 
         keyName="optional" keyValue="CONTENTPROVIDER" />
</publisherAssertion>

fromKey 和 toKey 元素表示所涉及的两个实体的唯一 ID。在本例中,这两个实体指 Daily Moon 和 Daily Star。Daily Star 是 Daily Moon 的内容提供者,故而据此放置二者的键。keyedReference 将会多次出现。在本例中,我们可以说引用本身就是内容提供者。keyValue 是 keyedReference 的唯一必需属性,但常常也会包含 keyName(为了提高可读性)和 tModelKey(标识特定的引用类型)。在本例中,tModelKey 表示两个报社之间关联的命名空间(与内部关系相对)。我们稍后将对 tModels 进行进一步的讨论。





回页首


businessService

接下来,Francis 需要输入有关 Daily Moon 将要提供的任何实际服务的信息。除了所需的唯一 serviceKey 和名称外,businessService 对象中还包含两条重要信息。即 bindingTemplates 和服务所属的任何类别。请参见清单 4。


清单 4. businessService
												
														<businessService serviceKey="required"
												 businessKey="optional">
<name></name>
<description></description>
<bindingTemplates>
<bindingTemplate serviceKey="optional" bindingKey="required">
         ...
</bindingTemplate>
</bindingTemplates>
<categoryBag>
      ...
</categoryBag>
</businessService>





回页首


BindingTemplate

Tmodelinstancedetails 指示其兼容的应用程序或规范。请参见清单 5。


清单 5. bindingTemplate
												
														<bindingTemplate
												 serviceKey="optional"
 bindingKey="required">
                    <accessPoint> OR <hostingRedirector bindingKey="another
 binding to be used instead">
<tModelInstanceDetails>
<tModelInstanceDetail>
<tModelInstanceInfo tModelKey=""uuid key for specification tModel">>
<description></description>
<instanceDetails>
<description></description>
<overviewDoc>
<description></description>
<overviewURL></overviewURL>
</overviewDoc>
<instanceParams>string</intstanceParms>
</instanceDetails>
</tModelInstanceInfo>
<tModelInstanceInfo>
            ...
</tModelInstanceInfo>
  </tModelInstanceDetail>
   <tModelInstanceDetails>
</bindingTemplate>
TModels (including tModel of tModels)
Serve two purposes.  As specification indicators, and as namespace indicators.
<tModel tModelKey="required" operator="optional" 
authorizedName="optional">
<name></name>
<description></description>
<overviewDoc>
<description></description>
<overviewURL></overviewURL>
<overviewDoc>

   <identifierBag>
...
</identifierBag>
<categoryBag>
      ...
</categoryBag>
</tModel>

bindingTemplate 定义在何处能找到服务以及其执行什么工作,这听起来并不复杂。不过,这两项功能在 UDDI 上下文中担任了新的重要角色。例如,为了确定可以在何处访问服务,可以提供 accessPoint(表示简单的 URL)或任何其他相应的数据,如求助热线的号码或 hostingRedirector。

分类法

对信息进行分类时,如果能就如何进行分类达成一致则很有帮助。这些一致同意的分类标准称为分类法。

例如,北美工业分类系统 (NAICS) 通过为每种类别指定一个唯一代码来区分“体育用品出租”、“体育用品商店”和“二手体育用品商店”。这样,当遇到代码 532292 时,就知道所说的是出租体育用品的商家,而不是出售这些东西的商家。

UDDI 操作员向系统添加一系列分类法作为例行规定,可供您在无需为其注册 tModels 的情况下使用。例如,jUDDI 可以使用 tModel 键 A035A07C-F362-44DD-8F95-E2B134BF43B4 为 uddi-org:general_keywords 创建 tModel,因此您可以使用它,而不必自己定义。

当服务的绑定发生更改时,将使用 hostingRedirector。例如,如果 Daily Moon 要建立自己的分类广告服务,并允许这两家报社使用 createNewAdd() 调用提交广告,则需要确保服务永远不会更改,或者提供一个方法来告知客户机服务已发生更改。而这就是要使用 hostingRedirector 的地方。在这种情况下,Francis(或实际由 Gene 进行)将创建一个新 bindingTemplate,用于表示新信息,并将该 bindingTemplate 的 bindingKey 输入 hostingRedirector 元素的 bindingKey 属性中。

定义服务能进行的工作可能会更困难。这个原因是两方面的。首先,由于我们讨论的并不一定是 SOAP 服务,因此无法直接为其提供 WSDL 文件。其次,由于这应该是一个自动化过程,因此需要以无歧义的方式提供此信息。

这样所得的结果是一个包括 tModelInstanceDetails 元素的 bindingTemplate,而此元素中又包含一个或多个 tModelInstanceDetail 元素。每个 tModelInstanceDetail 元素又包含一个或多个 tModelInstanceInfo 元素,而后者各自指向一个特定的 tModel。我们稍后将对 tModels 进行讨论。不过,重要的是要理解,tModelInstanceInfo 元素可以包含一个 instanceDetails 元素,后者本身包含一个 overviewDoc,其中包括 overviewURL,即实际定义服务的文档的 URL。(是的,就是在此处指定 WSDL 文件。)





回页首


TModels(包括 tModels 的 tModel)

现在让我们讨论一下 tModels。

tModels 实际有两个用途。第一,就是我们在关于 publisherAssertions 的讨论中了解到的,作为“命名空间指示符”。也就是说,tModel 可以提供用于区分很容易混淆的信息类型的方法。经常给出的一个例子是税码(或其他很容易混淆的数字)。例如,包含以下内容的 keyedReference 并不会提供所有信息,因为这两个税务 ID 属于不同的国家。它们在两个国家里都称为税务 ID,但就编程而言,我们必须提供一个区分二者的方法,如清单 6 中所示。


清单 6. 来自不同国家的税务 ID
                    
<keyedReference tModelKey="" keyName="taxid" 
keyValue="11111111" />
<keyedReference tModelKey="" keyName="taxid" 
keyValue="22222222" />

这就是要使用 tModel 的地方。我们可以为“美国税码”创建一个键模型,再为“墨西哥税码”创建一个键模型,依此类推。创建了这些模型后,可以使用其 tModel 键来进一步限定这些 keyedReference。请参见清单 7。


清单 7. tModels 和 keyedReferences
                    
<tModel tModelKey="902CDE50-D53A-11DA-B055-A74C17FA61A7">
   <name>United States codes</name>
</tModel>
<tModel tModelKey="062377D0-D5F5-11DA-8170-8ACF057FECAD">
   <name>Mexico codes</name>
</tModel>
<keyedReference tModelKey="902CDE50-D53A-11DA-B055-A74C17FA61A7" 
                keyName="taxid" keyValue="11111111" />
<keyedReference tModelKey="062377D0-D5F5-11DA-8170-8ACF057FECAD" 
                keyName="taxid" keyValue="22222222" />

tModel 的另一个用途是作为规范标识符。例如,Francis 知道 Gene 将为上个月所处理的 ClassifiedService 创建相应的条目。此服务表示特定的接口,因此可以使用 tModel 对其进行标识。tModel 可能与清单 8 中所示类似。


清单 8. tModel
												
														<tModel tModelKey="66999A50-D5F4-11DA-9A50-FA44D6AD622A"
												 
        operator="optional" authorizedName="optional">

   <name>Classified Service Interface</name>
   <description></description>

   <overviewDoc>
      <description></description>
      <overviewURL>
        http://www.daily-moon.com/ClassifiedService-interface.wsdl
      </overviewURL>
   <overviewDoc>

   <identifierBag>
...
   </identifierBag>

   <categoryBag>
      ...
   </categoryBag>
</tModel>

和我们所讨论的各个其他对象一样,tModel 具有一个唯一键,这是它唯一必需的信息。不过,在本例中,我们还要指定 overviewURL,即接口的 WSDL 文件的 URL。(我们将在后面部分创建它。)

同样,可以使用 identifierBag 对 tModels 进行标识,还可以使用 categoryBag 对其进行归类。接下来让我们看一看如何进行此工作。





回页首


identifierBag

由于 UDDI 设计十分灵活,因此没有特定的方式来标识 businessEntity。UDDI 并不强制要求使用其 D-U-N-S 编号、其税务 ID 编号或任何特定的标识方法对公司进行标识。相反,它提供了一个容器,可以根据需要在其中放置任意数量的标识符,如清单9 中所示。


清单 9. indentifierBag
												
														<identifierBag>
												
												
														<keyedReference
												
 tModelKey="4064C064-6D14-4F35-8953-9652106476A9" 
         keyName="DUNS Number" keyValue="55555555" /><keyedReference tModelKey="" 
         keyName="US Tax ID" keyValue="111111111" />
</identifierBag>

在 identifierBag 中添加的每个 keyedReference 都代表用户在搜索中找到相关对象的另一个机会。





回页首


categoryBag

categoryBag 的工作方式与 identifierBag 类似,因为其中包含一个或多个 keyedReferences。请参见清单 10。


清单 10. categoryBag
												
														<categoryBag>
   <keyedReference
												 tModelKey="C0B9FE13-179F-413D-8A5B-5004DB8E5BB2" 
           keyName="optional" keyValue="511110" />
</categoryBag>

在本例中,Francis 创建了一个 categoryBag,指示 Daily Moon 是一个报社分支机构。现在让我们了解如何使用所有这些对象。





回页首


将 WSDL 映射到 UDDI

在 Gene 编写任何代码将所有这些信息发送到 UDDI 注册中心前,他必须在其当前服务和 UDDI 之间建立一个重要的联系。他必须对其进行调整,以适应 UDDI 的服务、接口和绑定模板概念。

服务与接口

您可能还记得,服务在 UDDI 中包含三个部分:接口(使用 tModels 定义)、businessService 和 bindingTemplate(用于将两者捆绑在一起)。因此,Gene 将首先确定用于定义 SOAP 服务的 WSDL 文件如何适应此结构。

他首先对 WSDL 进行分析。幸运的是,这非常简单。除了实现本身外,其余所有 WSDL 内容都属于接口。请参见清单 11。


清单 11. WSDL 接口
                    
<wsdl:definitions xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
      xmlns:tns="http://ws.apache.org/axis2"
      xmlns:axis2="http://ws.apache.org/axis2"
      xmlns:ns1="http://org.apache.axis2/xsd" 
      targetNamespace="http://ws.apache.org/axis2">

   <wsdl:types>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
            targetNamespace="http://org.apache.axis2/xsd" 
            elementFormDefault="unqualified" 
            attributeFormDefault="unqualified">

         <xs:element type="ns1:ClassifiedAd" name="ClassifiedAd"
 />
         <xs:complexType name="ClassifiedAd">
            <xs:sequence>
               <xs:element type="xs:int" name="id" />
               <xs:element type="xs:string" name="content" />
               <xs:element type="xs:string" name="endDate" />
               <xs:element type="xs:string" name="startDate" />
            </xs:sequence>
         </xs:complexType>
         ...
      </xs:schema>
   </wsdl:types>

   <wsdl:message name="createNewAdRequestMessage">
      <wsdl:part name="part1" element="ns1:createNewAdRequest" />
   </wsdl:message>
   <wsdl:message name="createNewAdResponseMessage">
      <wsdl:part name="part1" element="ns1:createNewAdResponse" />
   </wsdl:message>
   ...

   <wsdl:portType name="ClassifiedServicePortType">
      <wsdl:operation name="finalizeIssue">
         <wsdl:input message="tns:finalizeIssueRequestMessage" />
      </wsdl:operation>
      <wsdl:operation name="createNewAd">
         <wsdl:input message="tns:createNewAdRequestMessage" />
         <wsdl:output message="tns:createNewAdResponseMessage" />
      </wsdl:operation>
      ...
   </wsdl:portType>

   <wsdl:binding name="ClassifiedServiceBinding" 
                  type="tns:ClassifiedServicePortType">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" 
                  style="document" />
      <wsdl:operation name="createNewAd">
         <soap:operation soapAction="createNewAd" style="document"
 />
         <wsdl:input>
            <soap:body use="literal" 
                        namespace="http://ws.apache.org/axis2" />
         </wsdl:input>
         <wsdl:output>
            <soap:body use="literal" 
                        namespace="http://ws.apache.org/axis2" />
         </wsdl:output>
      </wsdl:operation>
      ...
   </wsdl:binding>
</wsdl:definitions>

这包括类型定义(XML 模式)、任何消息、portType 甚至 binding,因为绑定并不是特定于实现的。

实现由实际的服务元素组成。请参见清单 12。


清单 12. 服务实现 WSDL
                    
<wsdl:definitions xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
      xmlns:tns=
        "http://www.daily-moon.com/ClassifiedService-interface"
      xmlns:axis2="http://ws.apache.org/axis2"
      xmlns:ns1="http://org.apache.axis2/xsd" 
      targetNamespace=
        "http://www.daily-moon.com/ClassifiedService-interface">

<wsdl:import namespace="http://ws.apache.org/axis2" 
   location=
"http://www.nicholaschase.com/ClassifiedService-interface.wsdl" 
/>

<wsdl:service name="ClassifiedService">
   <wsdl:port name="ClassifiedServicePort" 
               binding="axis2:ClassifiedServiceBinding">
      <soap:address 
         location=
 "http://www.daily-moon.com:8080/axis2/services/ClassifiedService" 
      />
   </wsdl:port>
</wsdl:service>

</wsdl:definitions>

请注意,实ç

          Making inactve USB Hard Disk spin down automatically in Linux.        

I have a 400GB Seagate IDE HDD connected to Mars, our hostel's file-server using an USB enclosure. The USB enclosure is a cheap "Made in China" product. Consequently it has some special "features". One such notable "feature" is that the disk is kept spinning by the controller even if there has been no disk I/O for a long time. I have three other USB disks connected to the same machine, a 1TB Seagate FreeAgent Desk External Drive, a 500GB Maxtor Basics External Drive and a 2.5" 60GB Fujitsu SATA Disk inside a Transcend USB enclosure. All of these spin down themselves if there has been no I/O for sometime. Keeping the hard disk spinning unnecessarily for ever, not only wastes power but also overheats the drive, thereby reducing its life.

I tried noflushd, which is supposed to force idle hard disks to spin down, but found it to be of no help. USB enclosure generally work by performing an SCSI emulation over USB. sdparm is an utility which can be used to send simple SCSI commands. A peep into its manpage revealed that the disk could be ordered to spin down by sudo sdparm -C stop /dev/sdb1 where sdb1 is the required disk (the disk has a single partition, "sdparm -C stop /dev/sdb1" and "sdparm -C stop /dev/sdb" did the same thing here, however if there are multiple partitions, it is more meaningful to specify "/dev/sdb" rather than "/dev/sdb1", since it is the disk that stops spinning).

However I need to do this automatically whenever the disk is idle. First, it is necessary to check whether the disk is active or idle. Info about disk I/O is available from /proc/diskstats.
cat /proc/diskstats | grep sdb1
shows info about sdb1, the output is something line this:
8 17 sdb1 210583 56943 24739612 2328860 11777 24804 292648 69260 0 1209770 2397450

It has several fields after "sdb1", denoting the following:
Field 1 -- No. of reads issued
Field 2 -- No. of reads merged
Field 3 -- No. of sectors read
Field 4 -- No. of milliseconds spent reading
Field 5 -- No. of writes completed
Field 6 -- No. of writes merged
Field 7 -- No. of sectors written
Field 8 -- No. of milliseconds spent writing
Field 9 -- No. of I/Os currently in progress
Field 10 -- No. of milliseconds spent doing I/Os
Field 11 -- weighted No. of milliseconds spent doing I/Os


Field 9 is of importance here, a nonzero value indicates disk activity. Any particular field can be dug out easily using grep and AWK (mawk interpreter is the obvious choice here).
cat /proc/diskstats | grep $DISKNAME | mawk '{ print $(NF-2) }' does the trick.
mawk '{ print i }' prints the ith field.
The variable NF is equal to the number of fields. We are interested in the field 3rd from the end. Hence $(NF-2).
Now this is probabilistic, if there is no I/O in that particular instant
cat /proc/diskstats | grep $DISKNAME | mawk '{ print $(NF-2) }'
will yield 0. To ensure that the disk is really inactive, the check has to be carried out quite a few times.

There is another pitfall, there are 4 USB disks connected to the machine. Which one would be named sdb is not fixed. At every reboot this may change. On the other hand uuid of a disk never changes (unless the partition table is modified). So the name of the disk has to determined from its uuid. grep, AWK, and sed comes to our rescue once again.
DISKNAME=`ls -l /dev/disk/by-uuid/ | grep "c5df6a02-b7a6-4f39-ad26-7eb915b76709" | mawk '{ print $(NF) }' | sed s_\.\.\/\.\.\/__`
What this essentially does is explained below.
"ls -l /dev/disk/by-uuid/" gives the following output

sambit@mars:~$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 0db6e806-8d4b-4968-8ccc-c00af59bb065 -> ../../sdc1
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 4294e561-df28-4ddd-a689-0aba31d4d663 -> ../../sda2
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 4cb989c6-87b7-4179-bb4d-81b2b0193ab2 -> ../../sdd1
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 4cf2093e-f08c-4127-ae75-fff11edd81ae -> ../../sdd2
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 87ba9975-056d-4635-85e4-53f1c76d57fb -> ../../sda3
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 a74b47fb-a33c-4a5a-ad62-0bc831f6ffda -> ../../sdd3
lrwxrwxrwx 1 root root 10 2009-04-07 14:20 af0c007b-a15c-4661-84eb-7dc689dec861 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-04-10 22:09 c5df6a02-b7a6-4f39-ad26-7eb915b76709 -> ../../sdb1


ls -l /dev/disk/by-uuid/ | grep "c5df6a02-b7a6-4f39-ad26-7eb915b76709"
narrows it to:
lrwxrwxrwx 1 root root 10 2009-04-10 22:09 c5df6a02-b7a6-4f39-ad26-7eb915b76709 -> ../../sdb1


ls -l /dev/disk/by-uuid/ | grep "c5df6a02-b7a6-4f39-ad26-7eb915b76709" | mawk '{ print $(NF) }'
prints the last field:
../../sdb1

Finally sed puts some finishing touches, by replacing "../../" in "../../sdb1" with "".

ls -l /dev/disk/by-uuid/ | grep "c5df6a02-b7a6-4f39-ad26-7eb915b76709" | mawk '{ print $(NF) }' | sed s_\.\.\/\.\.\/__

sdb1

So putting everything together, the script at-last looks something like this:

#################################################################################################################################
#!/bin/bash
DISKNAME=`ls -l /dev/disk/by-uuid/ | grep "c5df6a02-b7a6-4f39-ad26-7eb915b76709" | mawk '{ print $(NF) }' | sed s_\.\.\/\.\.\/__`
let a=0
#check 100 times with 0.1s gaps,
#and go on adding
for i in `seq 0 100`
do
let a=`cat /proc/diskstats | grep $DISKNAME | mawk '{ print $(NF-2) }'`+a
sleep 0.1s
done
echo $a
if [ $a == 0 ]
then
echo "No Activity"
sdparm -C stop /dev/$DISKNAME
else
echo "Disk Active"
fi
exit 0
#################################################################################################################################

I added this to crontab and made it run hourly. The hard disk can rest in peace for sometime in between heavy work now.


          Using UUID with PostgreSQL and ActiveRecord        

PostgreSQL provides lots of column types and ActiveRecord maps some of them. One column type that I’m using more and more is uuid.

The UUID has different implementations, but the most used version is v4. It generates random strings following the xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx format, where:

  • x is hexadecimal digit.
  • y can be one of 8, 9, A, or B.

Let’s generate some identifiers using the uuidgen command. Note how they follow the specification I just mentioned.

847862BF-424C-482F-81B1-09A48CFD547F
A378F7E1-94AD-432E-9DB1-41BADDBDAE8F
077570B7-63F5-4FB0-8A11-97BBF6998501
2B99E07E-36D4-4E07-9A6C-8DBEB66DA9BF

You can generate uuidv4 in Ruby too. All you have to do is using the SecureRandom.uuid method, available as part of the standard library.

require 'securerandom'
SecureRandom.uuid
#=> ff039085-5e16-4d74-9039-4225533e1f35

You can also generate uuidv4 using PostgreSQL. First, you have to activate the uuid-ossp extension.

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

Then you can generate identifiers using the uuid_generate_v4() function or define uuidv4 columns.

SELECT uuid_generate_v4();
-- cfe48d4f-246f-4f24-85b5-fb1d1a8a520e

CREATE TABLE users (
  id uuid PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),
  name text NOT NULL
);

INSERT INTO users (name) VALUES ('John Doe');
-- SELECT * FROM users;
--                  id                  |   name
-- -------------------------------------+----------
-- e84f4f0e-2127-4e66-a0be-1463141ae7ae | John Doe

Using uuidv4 as your record identifier has some advantages. The first one isn’t obvious, but you can decentralize the id generation. Let’s say you have a client-side API consumer. Instead of waiting for your server to respond with success or error, you can assume that everything worked and asynchronously push local records to the server API.

Another advantage is that you won’t give tips about how many records your system has. It may seem a silly advantage, but hiding this info is important for some customers. It can also avoid leaking information about your stocks, as Twitter did today.

Implementing UUID in a Rails application

ActiveRecord’s PostgreSQL adapter has built-in support for uuid columns. All you have to do is using the uuid method.

enable_extension 'uuid-ossp'

create_table :users do |t|
  t.uuid :api_key, null: false, default: 'uuid_generate_v4()'
end

You can also define your primary keys as uuid columns.

create_table :users, id: :uuid do |t|
  # ...
end

Finally, defining your association column is as simple as setting the :type option.

create_table :posts, id: :uuid do |t|
  t.references :user, type: :uuid, null: false, index: true
  # or
  t.belongs_to :user, type: :uuid, null: false, index: true
end

The same concept applies to the add_reference method.

add_reference :posts, :users, type: :uuid, null: false, index: true

It’s unlikely that you have duplicated ids. But if that happen, an exception will be raised, since primary keys have an unique constraint.

Gotchas

Using uuid comes with some drawbacks. Some methods, like ActiveRecord::Base.first and ActiveRecord::Base.last won’t work as expected. ActiveRecords expects a sequential identifier, as you can see below.

User.first
#=> SELECT * FROM users ORDER id ASC LIMIT 1

If you need to use these methods, make sure you sort your results using the created_at column or a sequential column (you can use a bigserial column for this).

User.order(created_at: :asc).first
#=> SELECT * FROM users ORDER created_at ASC LIMIT 1

There’s more. The ActiveRecord::Base.find_in_batches and ActiveRecord::Base.find_each won’t work at all, since they ignore sorting scopes. If you need this functionality, you’ll have to implement it on your own.

Avoiding the boring parts

Setting the primary key and association column types every time is too error prone. To avoid doing this manually, I created a gem that overrides the default methods, adding the column type for you. All you have to do is adding the following line to your Gemfile and you’re done. No more id: :uuid or type: :uuid.

gem 'ar-uuid'

Wrapping up

Even with these ActiveRecord inconsistencies, you can easily use uuid as primary keys. Implementing a smarter behavior for ActiveRecord::Base.first, ActiveRecord::Base.last, ActiveRecord::Base.find_each and ActiveRecord::Base.find_in_batches wouldn’t be too hard; maybe checking the primary column type so that ActiveRecord could switch the sorting to a bigserial column or even created_at.

Do you use uuid as your primary keys? Do you other motivations for doing it so? Leave your comment!


          The Collector        

The Collector (Movie Review)

Director: Marcus Dunstan | Release Date: 2009

On the Web

The Collector

director: 
Marcus Dunstan
Release Date: 
2009
5

We are well past the halfway point of summer, and consequently the theatrical drought that has defined the past few months. From now through October there's nearly one if not two genre releases a week, and one can't help but notice that most of them are sequels or remakes. As such, the original properties tend to stick out quite a bit, and "The Collector" has drummed up a modicum of interest of late because of this. Unfortunately, horror fans looking for a breath of creativity before the oncoming rehash binge may find themselves a bit disappointed when all is said and done.

"The Collector" centers around the story of Arkin (Josh Stewart), a not-so-ex-con that finds himself searching for some extra cash to pay off his (ex?) wife's debts to save her from certain death. As it turns out, the family that he has been doing handy work for has a precious gem stored in their safe that should more than pay off what she owes. When the family embarks on a vacation, Arkin infiltrates the gigantic home only to find that he's not alone, and that the family never made it past the driveway. As if that weren't enough, the house is now completely booby trapped.

In the beginning, it appears that the duo of Patrick Melton and Marcus Dunstan of "Saw" IV, V, and VI "fame" are on the verge of crafting an original narrative. In the early going, the viewer is given a unique look into this privileged family, including a fascinating scene when the trophy wife of the family names one of her wrinkles, and then Botox-es it into oblivion. It's these early glimpses that misled me into thinking that I was going to see these quirks come into play later on. Instead, as "The Collector" gets moving, the seeds of nuance are washed away in a torrent of overblown traps, overbearing electronic music, and torturous violence that never fails to drum up comparison to a certain series of films that Melton and Dunstan have their names stamped on.

If Dunstan's goal as a director is to make even the most desensitized viewer climb out of their skin, than this is another one for the win column. I have to admit that some of the flash kills hit the mark in the way that they were intended, and you can't take that away from this film. Also, the image of the 'Collector' is pretty scary and iconic without any backing context, and I really wish that he was the focus. I don't think that this movie was meant to be a slasher, but the image and the presence is strong enough that I believe that they could have left the bear traps at home and still put forth a good showing.

Unfortunately, "The Collector" chooses to go the "Saw" route at nearly every turn, and manages to replicate both the good and the bad of the series with staggering accuracy. For every genuinely shocking moment, there's a high speed shaky cam shot of a gimmicky trap, like a room covered in acid with a half melted cat in it. For every salient plot point, there's a disjointed flashback that fails to provide answers and forces the viewer to draw conclusions from nothing of substance. The cavernous plot holes are especially frustrating in the last moments of the film, when the "reveal" provokes more questions than it answers.

If I regard "The Collector" as a warm up for this fall's "Saw VI," it delivers. As broken as the formula is, it has proven to be a winner year after year, and that's a fact that I begrudgingly accepted some time ago. If you aren't yet bored of traps 'n' torture, this film will more than satisfy your bloodlust. Otherwise, you will likely find yourself picking out glimmers of originality among the mess, and becoming frustrated when they vanish in favor of the quick fix gimmicks that define the current generation of torture films.


          Twixt        

Twixt (Movie Review)

Director: Francis Ford Coppola | Release Date: 2011

On the Web

Twixt

director: 
Francis Ford Coppola
Release Date: 
2011
5

“Twixt” surprised me more than I could have expected. I went into this film blindly, and by the end I chocked it all up to a valiant effort from a first time director. There were some intriguing concepts strewn here and there but overall it felt like an introductory mess. Needless to say when I saw the director and writer of the film I was floored. Francis Ford Coppola, director of iconic films such as “The Godfather” trilogy and “Apocalypse Now”, had taken a stab at the horror genre. The whole feeling of the film changed with that knowledge. This was not a beginning director trying to make their mark, but a successful and struggling director trying to come back. “Twixt” then seemed to be a commentary on what writers endure to surpass their previous work. The film showed this theme beautifully portrayed through horrific imagery. However, the flaw in the film also rests within its strength: too many attempts at portraying themes, even though they are beautiful, creates a confusing and pointless ending.

“Twixt” tells the story of prolific witchcraft author Hall Baltimore (played by Val Kilmer) on his journey to write his next hit. Hall has recently lost his daughter in a boating accident and feels the pointlessness of his witch stories through the loss. He travels to a town suffering from the recent murder of a young girl and decides to investigate the tragedy in hope of inspiration. Hall eventually meets a ghost named V (played by Elle Fanning) who we learn to be the young girl recently murdered. Hal decides to find her killer with the help of the town sheriff Bobby LaGrange (played by Bruce Dern). At first the film has an undeniable amateur feeling. The acting is spotty, even by Kilmer, with Fanning as the only solid actress through the run. There are several visual effects that look unfinished and downright goofy which led me to believe that the director was trying to convey big ideas on a tiny budget. Obviously with Coppola at the helm this is all slightly confusing. It does get better though. Once the story progressed into act two the effects seemed to get better and the writing along with it. Hall fades into several dreams which reveal more about the murder of V as well has his own internal demons. During these dreams he is visited by Edgar Allen Poe who guides him into said truth. These dreams are where Coppola truly shines as a writer and director. Each segment seemed to focus on a different theme. The most intriguing of them all being how a writer learns to finish their own story. It was as if Coppola was voicing his frustrations on how to finish “Twixt” in the script itself. Going back to my first reaction, these scenes come off a bit pandering if written by an amateur director but hold a different meaning with a seasoned one.

The second act took a sharper tone than the first and overall felt polished and more like work from an experienced director. However, the third act, the ending, fell apart after the rise. The meta like commentary on how to finish a story only forced the idea that the ending of this movie had to be good. Unfortunately Coppola spent more time working on his theme than doing just that. The killer is revealed in the end and is explained through a forced plot device that only makes sense if the rest of the movie hadn’t happened. If that sounds confusing, it’s because it just was confusing. There is a twist added in the end but it has no consequence on the point of the entire film which was to finish the book. The ending itself packs in some of the best visual moments of the film though. I’m always astonished when directors attempt to harm children in film and Coppola went farther than I had seen before.

Coppola clearly had his own demons when writing this film. The beginning and end show his struggle in creating a story around the true inspiration for “Twixt”. The main story ended up being the least interesting aspect of the film and should have been left out. Instead of trying to force a story around his theme of writers block he should have let the dreams of Hall discussing writing with Poe be the central focus. All of the concepts discussed and portrayed in those dream sequences were thought provoking and visually striking. He built up the need for a strong ending in those scenes but failed to deliver on that promise in the main plot. It just goes to show that even a seasoned and award winning director needs to step back and look at what their work is truly conveying.


          Red Riding Hood        

Red Riding Hood (Movie Review)

Director: Catherine Hardwicke | Release Date: 2011

On the Web

Red Riding Hood

director: 
Catherine Hardwicke
Release Date: 
2011
4

Depending on how you look at these things, "Twilight" was either the best or the worst thing to ever happend to director Catherine Hardwicke. On the one hand, it's "Twilight," pretty much synonymous with printing money at this point. On the other hand, Hardwicke had built a career as a production designer on everything from "Brain Dead" and "Freaked" to "Tank Girl" and "Three Kings." She then helmed two decent indie hits in "Thirteen" and "Lords of Dogtown," before tackling "The Nativity Story," which flopped harder than anyone suspected post "Passion of the Christ." In short, Hardwicke cashed in that indie cred for a decent shot at a paycheck, only to have her chance at truly epic fame -- particularly in the rarified world of female Hollywood directors -- taken away and handed to the odious Chris Wietz.

Even three years out, Hardwicke has to be smarting, or at least should be. And now she has returned with "Red Riding Hood," a film that is only receiving coverage here because the loyal, loving readers of Bloody Good Horror so demanded it. Based loosely around the folk tale of Little Red Riding Hood, the film shows that at the very least Hardwicke can pull together a watchable film. Though it never moves into full fledged horror territory, "Riding Hood" flirts with just enough danger and spills just enough blood to qualify as an honorary member of the genre. It also succeeds rather admirably at following the essential mystery outline that helps justify a monster film. Sadly, all of this is trussed up with a tad too much soapy nonsense. Wayward glances, longing stares and over-dramatized familial strife tend to undermine tension no matter how well the rest of a film are executed.

The essential plot of "Red Riding Hood" follows Val (Amanda Seyfried), a young woman recently betrothed to a wealthy young man from around town who secretly yearns for the heart of a less-wealthy man. Disconnected from time and place, Val's village has been plucked straight out of a storybook, and lovingly so, by the filmmakers. The self-contained group of villagers appear self-sufficient and would go about their days without a care were it not for the pesky wolf who arrives every full moon. There has been a truce with the wolf for the last several years -- the villagers provide livestock to nom on, and the wolf leaves the townspeople alone. That truce is broken when Val's younger sister is killed.

This sets in motion much wistful yearning on the part of Val, who now must deal with her sister's death and the fact that she may have to marry a nice (but totally boring!) rich guy. The (poor) love of her life has never been so close, yet so far. They nearly run away together, but the wolf continue to intercede. And then Gary Oldman shows up with some soldiers to learn these townspeople a thing or two about wolf-killing. This brings us to the end of act one.

Though entirely accurate, all of this description probably does "Red Riding Hood" a disservice. It has, by nearly every measure, too much plot, too much angst, and too much yearning. But taken in the context of the film, most of this stuff at least makes sense. To be fair, Hardwicke does a decent enough job of crafting a whodunit around what Gary Oldman informs everyone is a werewolf. There are a handful of potential plausible culprits, but each is played off the other long enough to at least make the proceedings interesting.

At its core, "Red Riding Hood" really does feel like a fairy tale come to life. The flow has a sort of Disney-film logic, with mysticism and faith standing in for reasoned action. By not specifying a particular time and place, Hardwicke contributes to this feeling of being not wholly connected to reality. But there's no escaping the fact that the film is just soft at its core. Aside from some CGI'ed wolf attacks and implied violence, there's not much to make anyone over the age of 13 squirm in their seat. Had Hardwicke gone for something closer to an R-rating, the film probably could have been darker, bloodier, and certainly more interesting. Sadly, those decisions were likely made in the marketing meetings before any script was even greenlit.

For Hardwicke, the significance of "Red Riding Hood" is that it's not "Twilight." Though she doesn't do nearly enough to stamp "Riding Hood" as hers, the film no doubt has moments of flare and visual panache. If it hadn't been aimed squarely at the 10-17 age group, "Riding Hood" may have been something interesting. As it is, we can all take it as a cautionary tale about what happens when you allow your loyal fans to direct you into the woods without a map to grandmother's house.


          How to track Google Analytics pageviews on non-web requests (with Python)        

tl;dr; Use raven's ThreadedRequestsHTTPTransport transport class to send Google Analytics pageview trackings asynchronously to Google Analytics to collect pageviews that aren't actually browser pages.

We have an API on our Django site that was not designed from the ground up. We had a bunch of internal endpoints that were used by the website. So we simply exposed those as API endpoints that anybody can query. All we did was wrap certain parts carefully as to not expose private stuff and we wrote a simple web page where you can see a list of all the endpoints and what parameters are needed. Later we added auth-by-token.

Now the problem we have is that we don't know which endpoints people use and, as equally important, which ones people don't use. If we had more stats we'd be able to confidently deprecate some (for easier maintanenace) and optimize some (to avoid resource overuse).

Our first attempt was to use statsd to collect metrics and display those with graphite. But it just didn't work out. There are just too many different "keys". Basically, each endpoint (aka URL, aka URI) is a key. And if you include the query string parameters, the number of keys just gets nuts. Statsd and graphite is better when you have about as many keys as you have fingers on one hand. For example, HTTP error codes, 200, 302, 400, 404 and 500.

Also, we already use Google Analytics to track pageviews on our website, which is basically a measure of how many people render web pages that have HTML and JavaScript. Google Analytic's UI is great and powerful. I'm sure other competing tools like Mixpanel, Piwik, Gauges, etc are great too, but Google Analytics is reliable, likely to stick around and something many people are familiar with.

So how do you simulate pageviews when you don't have JavaScript rendering? The answer; using plain HTTP POST. (HTTPS of course). And how do you prevent blocking on sending analytics without making your users have to wait? By doing it asynchronously. Either by threading or a background working message queue.

Threading or a message queue

If you have a message queue configured and confident in its running, you should probably use that. But it adds a certain element of complexity. It makes your stack more complex because now you need to maintain a consumer(s) and the central message queue thing itself. What if you don't have a message queue all set up? Use Python threading.

To do the threading, which is hard, it's always a good idea to try to stand on the shoulder of giants. Or, if you can't find a giant, find something that is mature and proven to work well over time. We found that in Raven.

Raven is the Python library, or "agent", used for Sentry, the open source error tracking software. As you can tell by the name, Raven tries to be quite agnostic of Sentry the server component. Inside it, it has a couple of good libraries for making threaded jobs whose task is to make web requests. In particuarly, the awesome ThreadedRequestsHTTPTransport. Using it basically looks like this:

import urlparse
from raven.transport.threaded_requests import ThreadedRequestsHTTPTransport

transporter = ThreadedRequestsHTTPTransport(
    urlparse.urlparse('https://ssl.google-analytics.com/collect'),
    timeout=5
)

params = {
    ...more about this later...
}

def success_cb():
    print "Yay!"

def failure_cb(exception):
    print "Boo :("

transporter.async_send(
    params,
    headers,
    success_cb,
    failure_cb
)

The call isn't very different from regular plain old requests.post.

About the parameters

This is probably the most exciting part and the place where you need some thought. It's non-trivial because you might need to put some careful thought into what you want to track.

Your friends is: This documentation page

There's also the Hit Builder tool where you can check that the values you are going to send make sense.

Some of the basic ones are easy:

"Protocol Version"

Just set to v=1

"Tracking ID"

That code thing you see in the regular chunk of JavaScript you put in the head, e.g tid=UA-1234-Z

"Data Source"

Optional word you call this type of traffic. We went with ds=api because we use it to measure the web API.

The user ones are a bit more tricky. Basically because you don't want to accidentally leak potentially sensitive information. We decided to keep this highly anonymized.

"Client ID"

A random UUID (version 4) number that identifies the user or the app. Not to be confused with "User ID" which is basically a string that identifies the user's session storage ID or something. Since in our case we don't have a user (unless they use an API token) we leave this to a new random UUID each time. E.g. cid=uuid.uuid4().hex This field is not optional.

"User ID"

Some string that identifies the user but doesn't reveal anything about the user. For example, we use the PostgreSQL primary key ID of the user as a string. It just means we can know if the same user make several API requests but we can never know who that user is. Google Analytics uses it to "lump" requests together. This field is optional.

Next we need to pass information about the hit and the "content". This is important. Especially the "Hit type" because this is where you make your manually server-side tracking act as if the user had clicked around on the website with a browser.

"Hit type"

Set this to t=pageview and it'll show up Google Analytics as if the user had just navigated to the URL in her browser. It's kinda weird to do this because clearly the user hasn't. Most likely she's used curl or something from the command line. So it's not really a pageview but, on our end, we have "views" in the webserver that produce information to the user. Some of it is HTML and some of it is JSON, in terms of output format, but either way they're sending us a URL and we respond with data.

"Document location URL"

The full absolute URL of that was used. E.g. https://www.example.com/page?foo=bar. So in our Django app we set this to dl=request.build_absolute_uri(). If you have a site where you might have multiple domains in use but want to collect them all under just 1 specific domain you need to set dh=example.com.

"Document Host Name" and "Document Path"

I actually don't know what the point of this is if you've already set the "Document location URL".

"Document Title"

In Google Analytics you can view your Content Drilldown by title instead of by URL path. In our case we set this to a string we know from the internal Python class that is used to make the API endpoint. dt='API (%s)'%api_model.__class__.__name__.

There are many more things you can set, such as the clients IP, the user agent, timings, exceptions. We chose to NOT include the user's IP. If people using the JavaScript version of Google Analytics can set their browser to NOT include the IP, we should respect that. Also, it's rarely interesting to see where the requests for a web API because it's often servers' curl or requests that makes the query, not the human.

Sample implementation

Going back to the code example mentioned above, let's demonstrate a fuller example:

import urlparse
from raven.transport.threaded_requests import ThreadedRequestsHTTPTransport

transporter = ThreadedRequestsHTTPTransport(
    urlparse.urlparse('https://ssl.google-analytics.com/collect'),
    timeout=5
)

# Remember, this is a Django, but you get the idea

domain = settings.GOOGLE_ANALYTICS_DOMAIN
if not domain or domain == 'auto':
    domain = RequestSite(request).domain

params = {
    'v': 1,
    'tid': settings.GOOGLE_ANALYTICS_ID,
    'dh': domain,
    't': 'pageview,
    'ds': 'api',
    'cid': uuid.uuid4().hext,
    'dp': request.path,
    'dl': request.build_request_uri(),
    'dt': 'API ({})'.format(model_class.__class__.__name__),
    'ua': request.META.get('HTTP_USER_AGENT'),
}

def success_cb():
    logger.info('Successfully informed Google Analytics (%s)', params)

def failure_cb(exception):
    logger.exception(exception)

transporter.async_send(
    params,
    headers,
    success_cb,
    failure_cb
)

How to unit test this

The class we're using, ThreadedRequestsHTTPTransport has, as you might have seen, a method called async_send. There's also one, with the exact same signature, called sync_send which does the same thing but in a blocking fashion. So you could make your code look someting silly like this:

def send_tracking(page_title, request, async=True):
    # ...same as example above but wrapped in a function...
    function = async and transporter.async_send or transporter.sync_send
    function(
        params,
        headers,
        success_cb,
        failure_cb
    )

And then in your tests you pass in async=False instead.
But don't do that. The code shouldn't be sub-serviant to the tests (unless it's for the sake of splitting up monster-long functions).
Instead, I recommend you mock the inner workings of that ThreadedRequestsHTTPTransport class so you can make the whole operation synchronous. For example...

import mock
from django.test import TestCase
from django.test.client import RequestFactory

from where.you.have import pageview_tracking


class TestTracking(TestCase):

    @mock.patch('raven.transport.threaded_requests.AsyncWorker')
    @mock.patch('requests.post')
    def test_pageview_tracking(self, rpost, aw):

        def mocked_queue(function, data, headers, success_cb, failure_cb):
            function(data, headers, success_cb, failure_cb)

        aw().queue.side_effect = mocked_queue

        request = RequestFactory().get('/some/page')
        with self.settings(GOOGLE_ANALYTICS_ID='XYZ-123'):
            pageview_tracking('Test page', request)

            # Now we can assert that 'requests.post' was called.
            # Left as an exercise to the reader :)
            print rpost.mock_calls       

This is synchronous now and works great. It's not finished. You might want to write a side effect for the requests.post so you can have better control of that post. That'll also give you a chance to potentially NOT return a 200 OK and make sure that your failure_cb callback function gets called.

How to manually test this

One thing I was very curious about when I started was to see how it worked if you really ran this for reals but without polluting your real Google Analytics account. For that I built a second little web server on the side, whose address I used instead of https://ssl.google-analytics.com/collect. So, change your code so that https://ssl.google-analytics.com/collect is not hardcoded but a variable you can change locally. Change it to http://localhost:5000/ and start this little Flask server:

import time
import random
from flask import Flask, abort, request

app = Flask(__name__)
app.debug = True

@app.route("/", methods=['GET', 'POST'])
def hello():
    print "- " * 40
    print request.method, request.path
    print "ARGS:", request.args
    print "FORM:", request.form
    print "DATA:", repr(request.data)
    if request.args.get('sleep'):
        sec = int(request.args['sleep'])
        print "** Sleeping for", sec, "seconds"
        time.sleep(sec)
        print "** Done sleeping."
    if random.randint(1, 5) == 1:
        abort(500)
    elif random.randint(1, 5) == 1:
        # really get it stuck now
        time.sleep(20)
    return "OK"

if __name__ == "__main__":
    app.run()

Now you get an insight into what gets posted and you can pretend that it's slow to respond. Also, you can get an insight into how your app behaves when this collection destination throws a 5xx error.

How to really test it

Google Analytics is tricky to test in that they collect all the stuff they collect then they take their time to process it and it then shows up the next day as stats. But, there's a hack! You can go into your Google Analytics account and click "Real-Time" -> "Overview" and you should see hits coming in as you're testing this. Obviously you don't want to do this on your real production account, but perhaps you have a stage/dev instance you can use. Or, just be patient :)


          Aaron Morton: Cassandra Time Series Data Modeling For Massive Scale        

One of the big challenges people face when starting out working with Cassandra and time series data is understanding the impact of how your write workload will affect your cluster. Writing too quickly to a single partition can create hot spots that limit your ability to scale out. Partitions that get too large can lead to issues with repair, streaming, and read performance. Reading from the middle of a large partition carries a lot of overhead, and results in increased GC pressure. Cassandra 4.0 should improve the performance of large partitions, but it won’t fully solve the other issues I’ve already mentioned. For the foreseeable future, we will need to consider their performance impact and plan for them accordingly.

In this post, I’ll discuss a common Cassandra data modeling technique called bucketing. Bucketing is a strategy that lets us control how much data is stored in each partition as well as spread writes out to the entire cluster. This post will discuss two forms of bucketing. These techniques can be combined when a data model requires further scaling. Readers should already be familiar with the anatomy of a partition and basic CQL commands.

When we first learn about data modeling with Cassandra, we might see something like the following:

CREATE TABLE raw_data (
    sensor text,
    ts timeuuid,
    readint int,
    primary key(sensor, ts)
) WITH CLUSTERING ORDER BY (ts DESC) 
  AND compaction = {'class': 'TimeWindowCompactionStrategy', 
                    'compaction_window_size': 1, 
                    'compaction_window_unit': 'DAYS'};

This is a great first data model for storing some very simple sensor data. Normally the data we collect is more complex than an integer, but in this post we’re going to focus on the keys. We’re leveraging TWCS as our compaction strategy. TWCS will help us deal with the overhead of compacting large partitions, which should keep our CPU and I/O under control. Unfortunately it still has some significant limitations. If we aren’t using a TTL, as we take in more data, our partition size will grow constantly, unbounded. As mentioned above, large partitions carry significant overhead when repairing, streaming, or reading from arbitrary time slices.

To break up this big partition, we’ll leverage our first form of bucketing. We’ll break our partitions into smaller ones based on time window. The ideal size is going to keep partitions under 100MB. For example, one partition per sensor per day would be a good choice if we’re storing 50-75MB of data per day. We could just as easily use week (starting from some epoch), or month and year as long as the partitions stay under 100MB. Whatever the choice, leaving a little headroom for growth is a good idea.

To accomplish this, we’ll add another component to our partition key. Modifying our earlier data model, we’ll add a day field:

CREATE TABLE raw_data_by_day (
sensor text,
day text,
ts timeuuid,
reading int,
primary key((sensor, day), ts)
) WITH CLUSTERING ORDER BY (ts DESC) 
       AND COMPACTION = {'class': 'TimeWindowCompactionStrategy', 
                     'compaction_window_unit': 'DAYS', 
                     'compaction_window_size': 1};

Inserting into the table requires using the date as well as the now() value (you could also generate a TimeUUID in your application code):

INSERT INTO raw_data_by_day (sensor, day, ts, reading) 
VALUES ('mysensor', '2017-01-01', now(), 10);

This is one way of limiting the amount of data per partition. For fetching large amounts of data across multiple days, you’ll need to issue one query per day. The nice part about querying like this is we can spread the work over the entire cluster rather than asking a single node to perform a lot of work. We can also issue these queries in parallel by relying on the async calls in the driver. The Python driver even has a convenient helper function for this sort of use case:

from itertools import product
from cassandra.concurrent import execute_concurrent_with_args

days = ["2017-07-01", "2017-07-12", "2017-07-03"]  # collecting three days worth of data
session  = Cluster(["127.0.0.1"]).connect("blog")
prepared = session.prepare("SELECT day, ts, reading FROM raw_data_by_day WHERE sensor = ? and day = ?")

args = product(["mysensor"], days) 
# args: ('test', '2017-07-01'), ('test', '2017-07-12'), ('test', '2017-07-03')

# driver handles concurrency for you
results = execute_concurrent_with_args(session, prepared, args)

# Results:
#[ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d36750>),
# ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d36a90>),
# ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d36550>)]

A variation on this technique is to use a different table per time window. For instance, using a table per month means you’d have twelve tables per year:

CREATE TABLE raw_data_may_2017 (
    sensor text,
    ts timeuuid,
    reading int,
    primary key(sensor, ts)
) WITH COMPACTION = {'class': 'TimeWindowCompactionStrategy', 
                     'compaction_window_unit': 'DAYS', 
                     'compaction_window_size': 1};

This strategy has a primary benefit of being useful for archiving and quickly dropping old data. For instance, at the beginning of each month, we could archive last month’s data to HDFS or S3 in parquet format, taking advantage of cheap storage for analytics purposes. When we don’t need the data in Cassandra anymore, we can simply drop the table. You can probably see there’s a bit of extra maintenance around creating and removing tables, so this method is really only useful if archiving is a requirement. There are other methods to archive data as well, so this style of bucketing may be unnecessary.

The above strategies focuses on keeping partitions from getting too big over a long period of time. This is fine if we have a predictable workload and partition sizes that have very little variance. It’s possible to be ingesting so much information that we can overwhelm a single node’s ability to write data out, or the ingest rate is significantly higher for a small percentage of objects. Twitter is a great example, where certain people have tens of millions of followers but it’s not the common case. It’s common to have a separate code path for these types of accounts where we need massive scale

The second technique uses multiple partitions at any given time to fan out inserts to the entire cluster. The nice part about this strategy is we can use a single partition for low volume, and many partitions for high volume.

The tradeoff we make with this design is on reads we need to use a scatter gather, which has significantly higher overhead. This can make pagination more difficult, amongst other things. We need to be able to track how much data we’re ingesting for each gizmo we have. This is to ensure we can pick the right number of partitions to use. If we use too many buckets, we end up doing a lot of really small reads across a lot of partitions. Too few buckets, we end up with really large partitions that don’t compact, repair, stream well, and have poor read performance.

For this example, we’ll look at a theoretical model for someone who’s following a lot of users on a social network like Twitter. Most accounts would be fine to have a single partition for incoming messages, but some people / bots might follow millions of accounts.

Disclaimer: I have no knowledge of how Twitter is actually storing their data, it’s just an easy example to discuss.

CREATE TABLE tweet_stream (
    account text,
    day text,
    bucket int,
    ts timeuuid,
    message text,
    primary key((account, day, bucket), ts)
) WITH CLUSTERING ORDER BY (ts DESC) 
         AND COMPACTION = {'class': 'TimeWindowCompactionStrategy', 
                       'compaction_window_unit': 'DAYS', 
                       'compaction_window_size': 1};

This data model extends our previous data model by adding bucket into the partition key. Each day can now have multiple buckets to fetch from. When it’s time to read, we need to fetch from all the partitions, and take the results we need. To demonstrate, we’ll insert some data into our partitions:

cqlsh:blog> insert into tweet_stream (account, day, bucket, ts, message) VALUES ('jon_haddad', '2017-07-01', 0, now(), 'hi');
cqlsh:blog> insert into tweet_stream (account, day, bucket, ts, message) VALUES ('jon_haddad', '2017-07-01', 1, now(), 'hi2');
cqlsh:blog> insert into tweet_stream (account, day, bucket, ts, message) VALUES ('jon_haddad', '2017-07-01', 2, now(), 'hi3');
cqlsh:blog> insert into tweet_stream (account, day, bucket, ts, message) VALUES ('jon_haddad', '2017-07-01', 3, now(), 'hi4');

If we want the ten most recent messages, we can do something like this:

from itertools import chain
from cassandra.util import unix_time_from_uuid1

prepared = session.prepare("SELECT ts, message FROM tweet_stream WHERE account = ? and day = ? and bucket = ? LIMIT 10")
# let's get 10 buckets 
partitions = range(10)
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

args = product(["jon_haddad"], ["2017-07-01"], partitions)

result = execute_concurrent_with_args(session, prepared, args)

# [ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1e6d0>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1d710>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1d4d0>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1d950>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1db10>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1dfd0>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1dd90>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1d290>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1e250>),
#  ExecutionResult(success=True, result_or_exc=<cassandra.cluster.ResultSet object at 0x106d1e490>)]

results = [x.result_or_exc for x in result]

# append all the results together
data = chain(*results)
            
sorted_results = sorted(data, key=lambda x: unix_time_from_uuid1(x.ts), reverse=True)            

# newest stuff first
# [Row(ts=UUID('e1c59e60-7406-11e7-9458-897782c5d96c'), message=u'hi4'),
#  Row(ts=UUID('dd6ddd00-7406-11e7-9458-897782c5d96c'), message=u'hi3'),
#  Row(ts=UUID('d4422560-7406-11e7-9458-897782c5d96c'), message=u'hi2'),
#  Row(ts=UUID('d17dae30-7406-11e7-9458-897782c5d96c'), message=u'hi')]

This example is only using a LIMIT of 10 items, so we can be lazy programmers, merge the lists, and then sort them. If we wanted to grab a lot more elements we’d want to use a k-way merge algorithm. We’ll come back to that in a future blog post when we expand on this topic.

At this point you should have a better understanding of how you can distribute your data and requests around the cluster, allowing it to scale much further than if a single partition were used. Keep in mind each problem is different, and there’s no one size fits all solution.


          status changed; resolution set        
  • status changed from new to closed
  • resolution set to invalid

You're passing a MOR to the machine object whereas the API expects the UUID of the machine. Since both types are represented as strings they're easy to mix up.


          Smart Charger: automatically backup your photos        
[This is the second post about Arietta: the first is here]

The project
The idea behind this little project is to have a system that charge my phone and automatically backup the photo of my android phone while it is connected.

First of all, you need to attach an usb female adapter to Arietta and connect an usb (powered) hub to it: Follow this page

In order to get the photos on the android phone from Arietta you need to use MTP protocol and there are 2 ways:
a - install mtp-tools packages from repository
b - activate mtp filesystem

For my project the first solution is easier:  launch apt-get install mtp-tools

The solution b was better, because it allows you to mount the phone filesystem and copy files from it with normal linux commands like cp,rsync,mv.. but it's harder because you need to rebuild the arietta image.

External Usb Storage
The Arietta will copy my photos on an external storage instead of the internal sdcard of arietta because this helps to improve the life of the sdcard.

To automatically mount an external storage in a predefined directory:
- use blkid command to obtain an id that identify you external usb storage for the system
- change /etc/fstab and insert a line to specify where the storage mount point

My external usb storage is a simple pendrive formatted with fat32 with UUID FC4D-37AA.
At the end of /etc/fstab I've added this line to mount it on /mnt everytime is plugged in:

UUID=FC4D-37AA /mnt vfat defaults,umask=007,gid=46 0 0


The Backup Script ...
I've created a script called photobackup.sh that use some commands from mtp-tools package to copy and delete jpg photos from the phone:

#!/bin/bash

#check if external storage is present or abort
checkmount=`mount | grep /mnt | wc -l`
echo $checkmount;
if [ $checkmount -ne "1" ]; then
        echo "Usb External Storage not mounted...exiting";
        exit;
fi

echo "Usb External Storage Found";
mtp-files | grep .jpg | awk '{ print $2 }' > lista.txt
while read F ; do
    #there is enough space on device
    spacecheck=`df -h | grep /mnt | awk {'print $5'} | tr -d '%'`
    if [ $spacecheck -gt "95" ]; then
        echo "Not enough space left on device..exiting";
        exit;
    fi
    mtp-connect --getfile $F /mnt/$F # copy the file
    mtp-connect --delete $F          # delete the file from the phone
done

Explanation:

- it checks if Usb External Storage is mounted or it aborts the operation
- it creates a list of jpg files (supposing these are all photos) lista.txt


... and for every photo:
- it checks if there is enough space left on the Usb External Storage
- it reads the list of photos from lista.txt and it uses mtp-connect to copy file to the /mnt/ directory and it deletes the photo from the phone


..and the UDEV Rule!
In order to call photobackup.sh everytime you plug the phone to the hub you need a udev rule.

Create a script 98-my.rules with this content:
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", RUN+="/root/photobackup.sh"

and copy it on /etc/udev/rules.d

Now everytime you attach the android phone to the hub, while the phone is charging, arietta copy your photos in the external pendrive, if present.

In the next article we will see how to add a led to monitor the status of the operation.


          Stitches        

Stitches (Movie Review)

Director: Conor McMahon | Release Date: 2012

On the Web

Stitches

director: 
Conor McMahon
Release Date: 
2012
5

It’s interesting to look at the state of horror these days. Thankfully it’s fairly strong in numbers with releases happening every month. If you'll pardon the digression, my two cents on the state of horror helps to explain my feelings on "Stitches" more accurately.

I give everything in the horror genre the best chance possible when I watch a new release. I will say that I gravitate to films that I grew up watching from the 70’s and 80’s like “Halloween”, “Alien”, “The Texas Chainsaw Massacre”, “Suspiria” and countless others. Certainly, there have been some great releases in the past few decades as well, like “The Strangers”, “Insidious” and the “Scream” series. But when I go to watch a new release there’s always a part of me that hopes it will somehow take me back to what I first loved about the genre. It’s not a bias on my part, just a hope for a little nostalgia. Watching Conor McMahon’s film “Stitches” gave me that twinge of nostalgia that often seems forgotten. It’s clear he has a strong love for the “Nightmare on Elm Street” films due to the blatant references throughout the movie. That said, while the film get an "A" for effort, the tongue in cheek attitude it reveals went a little too far over the taste line.

“Stitches” is directed by Conor McMahon and tells the story of a washed up clown named Stitches (played by Ross Noble) that is performing at a birthday party for young Tom and a group of his friends. The kids grow tired of Stitches and his failing clown gags so they decide to play a prank to liven things up. Tying his shoe laces together, the kids push Stitches to watch him fall but unfortunately Stitches head is impaled on a butcher knife, killing him instantly.

We see later that Tom follows a procession of clowns in a graveyard as they perform a ritual for the deceased Stitches. They paint his face make-up onto an egg and keep it in a case. Fast forward six years and we find that Tom and his friends are all teenagers. Tom (now played by Tommy Knight) is having visions of a re-animated Stitches days before his upcoming birthday. He decides to have a party and his best friend Vinny (played by Shane Murray Corcoran) escalates the invite into a full blown teen party. The night of the party Stitches emerges from his grave to seek revenge upon the kids that caused his death years earlier.

“Stitches” has a distinct tongue-in-cheek quality, nostalgic going for it. I spent a good amount of the film wondering if their goal was to be goofy or if it was just poorly made. When there’s a clown as the killer, you know there will be puns. All of Stitches kills are followed by a one-liner relating either to himself or how the kids were killed. The Freddy Kreuger influence is heavy in these moments. Freddy is known for his quips like “You’ve got the body, I’ve got the brains” and what we hear every week on the BGH podcast: “Welcome to prime time, bitch”.

Stitches took a cue from Freddy by killing each kid according to their stereotype. The chubby kid that can’t stop eating gets his head torn off so Stitches can scoop out his brain like ice cream to say “Now there’s some food for thought”. Every death follows this formula. Tom also takes a drug called Hypnocil throughout the film to stop his visions of Stitches, which is the other huge "Nightmare" influence from part one and "Dream Warriors." These moments were fun and a nice trip to the past, but toward the end of the movie they became tired and far too over the top.

It seems that McMahon pulled from “Freddy’s Dead,” which in the timeline of Freddy films, and horror at the time, was the weakest for true character portrayal. Anyone remember Freddy busting out the Nintendo power glove? It all came off cheesy and overdone. McMahon tried to put Stitches into that slasher icon category too quickly in this film debut. He also references “Sleepaway Camp” through the dialogue of the teens and the way that they treat one another. It’s brutal and raw. And not in the good way.

While the Nightmare references went too far and felt out of place at times, I have to praise this film for its imagery. It’s a very well shot movie that provides a strong correlation to the feeling of tongue-in-cheek mixed with horror. While there is some CGI, most of the deaths were practical and bloody -- my goodness, with the bloody. Some of the deaths still stick in my head, like the teen who gets disemboweled and his head blown up “Scanners” style. I was surprised at the level of gore shown. I’m not a gore-hound but I appreciated that all of the deaths looked well made and harkened back to the practical effects that used to be the only option on film.

While “Stitches” had strong visuals and tried to pay homage to 80’s slashers, it crossed the line by the final act of the film. Again, I give McMahon a strong thumbs up for the nostalgia and effort, but the execution was poor. If he would have spent less time creating a lore around Stitches and dropped a few of the clown puns then he would have had a strong contender to join the ranks of Freddy and the gang. As a beginning work for McMahon this is overall fairly strong. I’m looking forward to seeing what he does in the future.


          10.12.2014 12:57:57 smart        
Если сделать этот UUID равным, например, sha256( СНИЛС_пользователя + ID_инициативы_на_РОИ ) — то можно убить двух зайцев: с одной стороны, невозможно будет пересечь данные от разных голосований (защита персданных), с другой — пользователь сможет убедиться, что его голос учтен.

А если еще и сделать «цепочку подписей», чтобы на каждый голос кроме UUID публиковать еще и метку времени current_timestamp и контрольный хэш, равный sha256( UUID + current_timestamp + контрольный_хэш_предыдущего_голоса ) — то получим вообще прекрасную надежную систему.

Вот только добиться от РОИ, чтобы они это реализовали, ни у кого не получится.
          05.12.2014 11:05:30 Chamie        
Только должен быть не просто UUID, а UUID подписанный РОИ, чтобы можно было его потом предъявить им с подтверждением, что пользователь не сам его придумал.
          04.12.2014 17:05:58 skobkin        
выдаст один и тот же GUID на почту — то каждый будет уверен, что учёлся его голос, оба увидят запись в логе (я уверяю: сверять до миллисекунд никто не будет, достаточно слеплять два неугодных голоса

Это всё довольно сложно в реализации и раскрываемо экспериментально. При том, если человек записал UUID, то он и время может записать легко. А потом два человека проверяют UUID и время. Можно собираться контрольными группами и голосовать по 10 человек «на счёт три». Пусть слепляют.
          Aspectos – parte I        
Atualizado no blog novo.

Um paradigma muito útil é a Programação orientada a Aspectos.

Consiste em separar e encapsular as funcionalidades de um código conforme sua importância.

Nesta primeira parte, abordaremos de forma simples tal separação e deixaremos o conceito de mixins para a parte II.

Vamos começar com um exemplo: imagine uma view que modifica o estado de um objeto, retornando um hash do novo estado:
@app.route('/people/<uuid>/', methods=['PATCH'])
def update_person(uuid):
person = db.person.find({ '_id': uuid }).first()
if not person:
raise Http404

try:
data = json.loads(request.data)
except ValueError:
return json.dumps({ 'error': 'invalid request' }), \
400, \
{ 'Content-Type': 'application/json' }

person.update(data)
db.person.save(person)

r = [(str(k), repr(v)) for k, v in person.iteritems()]
r.sort()
s = ';'.join('{}:{}'.format(k, v) for k, v in r)

return json.dumps({ 'etag': md5(s).hexdigest() }), \
200, \
{ 'Content-Type': 'application/json' }

A solução atende, mas é de difícil manutenção. Perceba que a função chamada update_person (atualiza pessoa) faz muito mais do que simplesmente atualizar os dados:
  • Recupera o documento do banco, retornando 404 se não existir;
  • Faz os parsing dos dados recebidos, retornando 400 em caso de erro;
  • Efetivamente atualiza o documento;
  • Serializa o objeto para a resposta;
  • Gera um hash da serialização;
  • Responde a requisição com formato conveniente.

Cada um desses passos é um aspecto do processo e pode ser isolado do restante.

Vamos então separar o primeiro aspecto: recuperação do documento.
def retrieve_person_aspect(view):
@wraps(view)
def wrapper(uuid):
person = db.person.find({ '_id': uuid }).first()
if not person:
raise Http404

return view(person)
return wrapper

@app.route('/people/<uuid>/', methods=['PATCH'])
@retrieve_person_aspect
def update_person(person):
try:
data = json.loads(request.data)
except ValueError:
return json.dumps({ 'error': 'invalid request' }), \
400, \
{ 'Content-Type': 'application/json' }

person.update(data)
db.person.save(person)

r = [(str(k), repr(v)) for k, v in person.iteritems()]
r.sort()
s = ';'.join('{}:{}'.format(k, v) for k, v in r)

return json.dumps({ 'etag': md5(s).hexdigest() }), \
200, \
{ 'Content-Type': 'application/json' }

Agora a recuperação do documento está isolada, podendo inclusive ser usada em outras views. Nossa view já recebe o documento recuperado e não precisa lidar com o fato dele existir ou não.

Porém ainda temos muita coisa misturada. Por exemplo, a obtenção e parsing dos dados recebidos: isso caracteriza outro aspecto do código, que não a atualização do documento.

Podemos portanto, separá-los:
def parse_data_aspect(view):
@wraps(view)
def wrapper(person):
try:
data = json.loads(request.data)
except ValueError:
return json.dumps({ 'error': 'invalid request' }), \
400, \
{ 'Content-Type': 'application/json' }

return view(person, data)
return wrapper

def retrieve_person_aspect(view):
...

@app.route('/people/<uuid>/', methods=['PATCH'])
@retrieve_person_aspect
@parse_data_aspect
def update_person(person, data):
person.update(data)
db.person.save(person)

r = [(str(k), repr(v)) for k, v in person.iteritems()]
r.sort()
s = ';'.join('{}:{}'.format(k, v) for k, v in r)

return json.dumps({ 'etag': md5(s).hexdigest() }), \
200, \
{ 'Content-Type': 'application/json' }

A função update_person já está muito mais limpa: atualiza o documento, serializa e retorna o hash, mas ainda faz coisas demais. Vamos separar o tratamento do retorno:
def respond_etag_aspect(view):
@wraps(view)
def wrapper(person, data):
response = view(person, data)
return json.dumps({ 'etag': md5(response).hexdigest() }), \
200, \
{ 'Content-Type': 'application/json' }
return wrapper

def parse_data_aspect(view):
...

def retrieve_person_aspect(view):
...

@app.route('/people/<uuid>/', methods=['PATCH'])
@retrieve_person_aspect
@parse_data_aspect
@respond_etag_aspect
def update_person(person, data):
person.update(data)
db.person.save(person)

r = [(str(k), repr(v)) for k, v in person.iteritems()]
r.sort()
return ';'.join('{}:{}'.format(k, v) for k, v in r)

As coisas estão ficando cada vez mais separadas. A única coisa que a função update_person faz agora além de atualizar o documento é serializá-lo. Isso também pode ser isolado:
def serialize_person_aspect(view):
@wraps(view)
def wrapper(person, data):
response = view(person, data)
r = [(str(k), repr(v)) for k, v in response.iteritems()]
r.sort()
return ';'.join('{}:{}'.format(k,v) for k, v in r)

def respond_etag_aspect(view):
...

def parse_data_aspect(view):
...

def retrieve_person_aspect(view):
...

@app.route('/people/<uuid>/', methods=['PATCH'])
@retrieve_person_aspect
@parse_data_aspect
@respond_etag_aspect
@serialize_person_aspect
def update_person(person, data):
person.update(data)
db.person.save(person)
return person

Perceba que, com a separação dos aspectos em funções distintas, o código ficou muito mais semântico:
  • retrive_person_aspect apenas recupera o documento do banco;
  • parse_data_aspect apenas faz o parsing dos dados recebidos;
  • respond_etag_aspect apenas gera o formato correto da resposta;
  • serialize_person_aspect apenas serializa o documento;
  • finalmente, update_person apenas atualiza o documento.

Observações

  • db é um objeto de banco de dados MongoDB, apenas para fim de exemplo.
  • app é uma aplicação Flask, apenas para fim de exemplo.
  • A ordem dos decoradores é importante.
  • Os imports foram omitidos:
import json
from functools import wraps
from hashlib import md5

Na parte II abordaremos mixins.

[]’s
Cacilhας, La Batalema
          Can I see your ID please? The importance of CouchDb record IDs        
One of the things I largely underestimated when I first started working with CouchDb was the importance of a meaningful ID for documents. The default of letting the database set a UUID for you seems reasonable at first, but the UUID is largely useless for querying. On the other hand, a good ID scheme is […]
          Proper RFC 4122 UUIDs as GUIDs in WordPress        
UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDentifier), is a string that identifies a piece of information in computer systems. WordPress use GUIDs to identify each individual post, but use URLs (kind of) for GUIDs, and thus does not follow the standard definition (RFC 4122) of a UUID (or GUID). A WordPress […]
          Psycho II        

Psycho II (Movie Review)

Director: Richard Franklin | Release Date: 1983

On the Web

Psycho II

director: 
Richard Franklin
Release Date: 
1983
8

Anthony Perkins would’ve been 77 years old on April 4th, 2009. Sadly, Perkins was diagnosed with AIDS after a blood test in 1990 and eventually died from pneumonia in 1992. Perkins was a well established stage and television actor before he was tabbed by Hitchcock to play Norman Bates in “Psycho” in 1960. After “Psycho”, he would go on to enjoy a solid film career centered more on European productions than domestic work.

The reason for this was that domestically Perkins could never really outrun the specter of his Bates performance. Or perhaps more correctly, the perception that he was best suited to occupy the crazy chair for whatever production he was involved with. Undoubtedly it became tiresome for the man who initially balked at the idea of reprising his role as Norman Bates when approached about a sequel in the early 1980's. According to “Psycho II” writer Tom Holland, after reading the script for the follow-up, Perkins had a change of heart. Whether it was the cleverness of Holland’s storyline or a sense of resignation, Perkins and Bates were reunited in 1983; 23 years after their first go ‘round.

“Psycho II” picks up the story of Norman Bates in present day as he is being released from the asylum that has housed him for two decades. He returns home to Fairview, California and the Motel/home where in 1960 he wrestled with his maternal demon and lost. He takes a job at local diner and tries to reintegrate back into small town life.

Predictably Normy has his share of detractors and antagonists who are not at all convinced that his slicing days are behind him. At the Diner he meets Mary (Meg Tilly), a kind young waitress with a need for stable housing. Norman invites her to stay at Casa del Bates and the two become fast friends. Bates finds his first big challenge in the form of Warren Toomey (Dennis Franz). Toomey is a caretaker who turned the Bates Motel into a stop and pop with hourly rates during Norman’s absence. Upon discovering that his beloved roadside rest stop has been turned into a den of iniquity Norman fires Toomey. Toomey then calls Norman out at his diner job, and is murdered soon thereafter by a faceless matronly mauler. Before long other townsfolk go missing, characters from the first film reappear and Red herrings abound. Norman’s fragile emotional threads begin to fray and the bloody legacy of the Bates estate is revived.

“Psycho II” would be a great follow up to good film, if it was in fact following just a "good" film. Being the sequel to the most roundly lauded and referenced horror film of all-time inevitably knocks it down a few pegs. Director Richard Franklin does a good job of balancing his Hitchcock nods with the need to update the material. He also salvages the essential element of the original.

Anthony Perkins was born to play Norman Bates. His original portrayal advanced the idea of character quandary within a horror film by leaps and bounds. Norman is victim and monster, wounded kid and fiend. He is not Frankenstein’s monster or Quasimodo because while he is misunderstood, he is dangerous even to those who understand and sympathize with him. For many audiences in 1960, a handsome beast with murderous old hag living inside him was simply too much to bear. In 1983, Perkins' second turn as Norman may have no longer carried an element of surprise, but it was even more essential for the audience reactions to “Psycho II”.

The supporting cast here is very good, highlighted by Meg Tilly as Mary, but Anthony Perkins is the reason to watch. He plays Norman as skittish, winsome, menacing, charming and clueless, and does so in just the right doses. He is also chiefly responsible for the success of the film’s irony. Whenever the movie threatens to lose the viewer by being a too goofy, a smirk appears on Perkins face to remind us that while being crazy in the Norman Bates way is about rage and fear, it’s also about being in on one of cinema’s greatest inside jokes.

For his part, Franklin does his best to keep the sense of malignant delight and fun that old Alfred layered into his best work. Another feather in Franklin’s cap is the pacing of “Psycho II”. The narrative is always moving forward as the tension continuously builds. Tom Holland’s script has a lot to do with the film’s effectiveness as well. Holland makes sure that Norman has plenty of hostility and suspicion to contend with during his pursuit of sanity. And while the script does have some lapses in logic around its characterizations (particularly Mary), it is very well structured and pays off big in the final scene.

“Psycho II” opens with a trimmed version of the original shower scene but it becomes clear pretty fast that there is no artistic match attempted here. At least not where trying to master montage, sound and mis-en-scene is concerned. Instead the art is left up to the player, Anthony Perkins. And that is the best choice that could’ve been made. Norman Bates returns home and the audience gets everything it could want from a sequel to a landmark film. Well, short of a second landmark film I suppose, but even Hitchcock himself might have had a hard time pulling that one off.


          Splinter        

Splinter (Movie Review)

Director: Toby Wilkins | Release Date: 2009

On the Web

Splinter

director: 
Toby Wilkins
Release Date: 
2009
9

"Splinter" hits DVD at an odd time, when a whole host of solid limited release horror films are also hitting store shelves, so it would be easy to overlook it when you're out searching for your horror fix on a Friday night. That would be a mistake, because if you did that you would be missing out on a fantastic gem, and a great example of what can be done on limited resources.

The film starts with a young couple going camping in the woods. As they pull over and start setting up their tent for the night, we begin to see their personality traits right off the bat. Seth ("American Pie's" Paulo Costanzo) is a bookish, passive biology PHD with a strong aversion towards all things "outdoors". His girlfriend Polly (Jill Wagner) on the other hand, is a strong tomboy who clearly wears the pants in the relationship. Like a lot of modernized, city-dwelling men, Seth doesn't know how to drive a stick-shift and as we find out in the very first scene, set up a tent, either.

After user error causes a tear in their sleeping quarters, Seth wins out and convinces Jill they should drive down the road and look for a motel. The steamy "anniversary sex by star-light" will have to wait until next year. After a few minutes of driving down the road they run into Lacey and Dennis, and this is where their fortunes take a turn for the worse. Lacey is a tweaker, coming down off of her drug of choice and unhinged to the max, and Dennis is her alpha-male, convict boyfriend. The two are heading South of the Border to escape Dennis' past, where they plan to make a new life together. They intend to do so by hijacking Polly's car, and taking the couple hostage.

They don't make it very far before slamming into a particularly nasty piece of roadkill, that after some examination seems to display some very strange behavior... ie moving and lurching towards them even though it's quite clearly been blown to pieces by the collision with the car. These scenes are intense, with teeth-clenching tension between both our polar-opposite couples, and the mounting threat from the outside that we know is right behind them. Finally back on the road, the engine overheats, causing them to have to stop at a nearby gas station. This is the point where they run into their first "infected" body, and let's just say that all hell breaks loose from there.

"Splinter" succeeds where so many similar, low-budget films fail, by squeezing incredible tension out of small, potentially insignificant setups and a very limited cast. Director Toby Wilkins shows a deft hand at creating suspense, and an understanding that excitement can be built with almost any setup, as long as it's presented correctly to the audience. This makes the picture tense from beginning to end, and keeps you waiting with baited breath to find out what will happen next. So few films achieve that nowadays, it's crucial to praise one when it does.

In many ways, "Splinter" can be thought of as a mashup of "The Thing" and "The Mist", two films that any director would be proud to have his film compared to. At its heart it's about people, and the way they react in extreme situations. It sets up character stereotypes which inform their relationships', but by allowing each character the ability to rise above and act contrary to their predestined roles, it bestows on them a very realistic sense of humanity. Seth isn't necessarily tied to his impotent, modern domesticated-male role, and for all of his bluster, Dennis turns out not to be as threatening as he puts on. The balance is crucial to the success here, as is the fantastic performances turned in by all present.

Much is made by horror fans of the over-abundance in the last decade of what we'll call "redneck horror". There's only so many times you can watch a mutant cannibal family from the South stalk and kill a group of "city folk" just because. What "Splinter" proves, is that there are still interesting ways to explore the dichotomy of those two cultures, but without demonizing or over-stereotyping either side. It's a refreshing take on cultural relations that was highly appreciated. While most horror films ultimately devolve into the cliche "man is his own worst enemy" tropes, the human protagonists in this film ultimately team up with the villains and fight together to try and survive. It's a positive, interesting take on the "humans in peril" scenario.

The icing on the cake has to be the fantastic practical effects. The parasite in "Splinter" is transmitted though tiny, porcupine-like "spikes" that protrude from wounds that have been infected. Once a host has been taken over, it constantly seeks out new flesh to feed on, all the while twisting and contorting while bones snap. The longer a host stays infected, the more twisted up the creature becomes. These are the moments when the film begins to strongly resemble John Carpenter's "The Thing". It's also clear that like Carpenter's classic, almost all of the effects were done practically, with only a few noticeable CGI shots to speak of. Again, another way that "Splinter" acts as a breath of fresh air in modern horror cinema.

"Splinter" sports a very tight script, with few leaps of logic and a satisfying ending. I can't imagine that it popped off the page too much in written form, but Toby Wilkins brings it to life with some fantastic direction. Add to that some great performances and killer monster effects and you have yourself a very solid little horror film. Watch it alone or with some friends, but just watch it. Trust me.


          Bug        

Bug (Movie Review)

Director: William Friedkin | Release Date: 2007

On the Web

Bug

director: 
William Friedkin
Release Date: 
2007
8

"Bug" is a prime example how poor marketing can destroy a film's chances to find an audience. The ominous voice in the trailer drones, “They live in your blood... and they feed on your brain. This spring from the Academy Award winning director of the Exorcist comes the movie the Chicago Tribune calls 'one of the most disturbing horror movies imaginable.' Bug.”

What do you expect from that description? A body horror film about tiny insects that infect people and eat them from the inside out? A modern-day take on “The Exorcist” where possession is updated for the age of bio-terrorism and demons are swapped out for a killer virus? How about a psychological character-driven adaptation of a play about two lonely, damaged meth-heads who slowly go crazy together in a dingy hotel room? I'll give you a hint – it's not the first two. In fact, the trailer isn't just misleading, it's flat-out wrong. According the DVD box, the pull quote they used came from the Boston Herald, not the Chicago Tribune. Great job, Lions Gate.

The deceptive advertising was only made worse by the fact that some screenings of the film were preceded by the first five minutes of “Hostel: Part II”, and that the film's poster bore a distinct resemblance to the iconic posters for the “Saw” series. The end effect was that mainstream horror audiences who turned out for “Bug” in cinemas were justifiably angry at the bait and switch, and the arthouse crowd who might have been more appreciative of the film mostly wrote it off as a conventional horror film.

Whatever “Bug” is, it's certainly not conventional. Even the director, William Friedkin, has described it as more of a “black comedy love story” than a horror movie. “Bug” has a bit of stabbing and squirmworthy gore, as well as some disturbing imagery, but most of the horror elements are of a much more psychological nature.

Ashley Judd plays Agnes, a small-town bartender who has seen better days, who now uses drugs and alcohol to drown her pain at having her son be abducted at a supermarket many years previous. As the film starts, Agnes has been receiving mysterious calls from a silent caller which she attributes to her recently paroled wifebeater of an ex, Jerry (Harry Connick, Jr). One night after work, her friend RC comes over to the run-down hotel room Agnes lives in for an all-night booze and coke binge and brings along an acquaintance, a quiet, awkward drifter named Peter (Michael Shannon). To stave off her loneliness, Agnes invites Peter to stay the night and in short order the two get to know each other and end up in bed together. Peter reveals that he is AWOL from the military and that when he was serving in the Middle East he was subjected to some unusual experiments. He's convinced he's a part of a government conspiracy and in due time Agnes comes to believe him.

The rest of the film gradually ratchets up the paranoia Peter and Agnes feel until the living nightmare of the third act where the two cover every inch of the hotel room with aluminum foil, cringe at the sound of black helicopters overhead - which may or may not be just the ceiling fan - and gouge away at their bodies to remove the bugs they are convinced are living under their skin. The film leaves itself open to a number of interpretations and often leaves the viewer as unsure about the line between reality and imagination as its two main characters are. In the immortal words of Rick James, cocaine (in addition to crystal meth, pot, booze and crack) is “a hell of a drug”.

In stage-to-screen adaptations, the conventional wisdom is to open everything up and introduce new settings and more characters. Here however, Friedkin realizes that the zoom works both ways, and has taken the opposite approach and moved in closer and tighter than a play ever could. Ninety percent of the movie is set in three rooms and the actors are often shot in extreme close-ups, with no make-up to hide the bags and creases and sweat on their faces. The two leads turn in performances that are intimate, heart-breaking and disturbing all at once. With a slow journey into madness like this, acting too frantic too early could break the viewers suspension of disbelief and cause the whole movie to descend into hysterical goofiness. Thankfully, that's not a problem here.

As the marketing snafus demonstrated, “Bug” is a hard film to pin down. It does have strong body horror elements that would not be out of place in a Cronenberg film, but all of that is secondary to the real story. Agnes is a shattered woman who has little sense of herself and instead adapts to various roles depending on who she's interacting with. Peter is a sick man who is convinced that the entire world and his own body is conspiring against him. When these two lonely people's worlds collide, instead of the typical uplifting Hollywood story of love triumphing in the end, it turns out they're much worse off for having found each other and would have been much better off if they'd never met.

So is “Bug” a horror film? I'd say without a doubt it is. In this case, the madness of the characters isn't focused externally onto unwholesome acts like, say, chopping up co-eds, but instead is turned inside out, destroying its hosts from within like a parasite.


          The Raven        

The Raven (Movie Review)

Director: James McTeigue | Release Date: 2012

On the Web

The Raven

director: 
James McTeigue
Release Date: 
2012
3

If a 19th-century serial killer/detective story based on the genre writing of Edgar Allen Poe feels like a weird match for a director whose previous credits include "Ninja Assassin" and work on virtually every Wachowski Brothers film, then director James McTeigue would probably suggest you take a pass on "The Raven." Likely imagined as a mix between Depp's "From Hell" and the Downey Jr "Sherlock Holmes" films, McTeigue's John Cusak vehicle manages to impersonate neither of those films well enough to pass muster. Instead it finds a middle ground silly enough to undermine Poe's authorial voice and graphic enough to undercut any attempt at levity.

"The Raven's" primary failures are nearly all by design. Poe, for all his macabre machinations, was a romantic and a poet. Screenwriters Ben Livingston and Hannah Shakespeare (no relation to William) clearly understood this, and crafted a wounded but playful Poe who is gamely embodied by Cusak. The action of the film -- based on the idea that a Poe nemesis is using the writer's own ideas to brutally murder various citizens of 1840s Baltimore -- places him at the center of a race against time to foil a serial killer and save his beloved. In choosing to deploy Poe's own stories as the inspiration for the deaths however, the action becomes tied to an assortment of narrative twists that are unconnected except through Poe. Popular stories are laboriously ticked-off, with the thin sheen of investigation punctuated with hilariously improbable eureka moments. This takes Cusak's Poe out of the role of brooding intellectual and places him into the ill-fitting suit of a crafty detective. Potentially tense moments are time and again submarined by the juxtaposition of this strung-out alcoholic and drug user as quick-witted crime solver.

Though it was likely doomed from inception, "Raven" is possessing of no small amount of potential. Historically, Poe was a noted thinker and, though depressive, a man who could apply himself when the situation aligned for it. "The Raven" takes as its launching point the idea that the last days of Poe's life, before he was found near-death on a park bench, remain a mystery. Instead of telling the more likely story of drinking and drug use spiraling out of control, the film casts Poe's final breaths as those of a hero.

As originally conceived, and with another talent attached as Poe, this may have played as a creepy murder mystery. Whether through Cusak's involvement or as intended from the start, what actually made it to the screen adopts an often comic air that never meshes with some of the more truly grotesque elements. In one sequence, Cusak is shown schooling a collection of upper-crust debutants in poetry. He spins a comically bad poem into a successful piece of literature, then moments later, Poe's seen nearly retching at the scene of a "Pit and the Pendulum" inspired murder. The tonal shift, evidenced in many places throughout the film, is so stark that it's as though two separate films were cobbled into one. In truth, the whole film feels a few frames short of being something else entirely -- an unnecessary R-rating should probably have been the first thing to change.

McTeigue does a fine job of recreating the atmosphere of 1840s Baltimore, so for those into the finery of period-dramas "The Raven" should at least be sampled. But here again, success only serves to highlight more systemic failures. As a mystery the film collapses under its own weight in the early going. It's only after a series of Jigsaw-esque murders that the killer finally pulls Poe into a game of cat and mouse. Here, nearly half-way into the film, the action at least picks up, but with such an over-abundance of plot detail and arcane clue-connecting nonsense so as to never truly glide along. The smallest details of one crime are miraculously followed to the exact conclusion the killer had hoped, and all in time such that the next murder could be exposed. Told over the course of weeks or even months, this type of back and forth between detective and killer can be compelling. Compacted into the last days of a drunk's life, they are completely absurd.

With a mystery film, a successful conclusion can erase all manner of blemishes. "The Raven" does not quite achieve that feat. Like the rest of the film, the reveal feels a little too cute, which may have been unavoidable if the film was to resolve the action, and end with Edgar's true final resting place. It's an odd thing: meta-fiction featuring a true literary genius as crime solver, with gore effects primed for 3D, and bizarre punchlines sprinkled throughout. "The Raven" may be the best pre-Civil War era serial kill film ever made. Hopefully, it will also be the last.


          The Factory        

The Factory (Movie Review)

Director: Morgan O'Neill | Release Date: 2012

On the Web

The Factory

director: 
Morgan O'Neill
Release Date: 
2012
6

Hollywood always attempts to make the planets align when it comes to horror movies. Taking every successful film from the past and morphing all of those ideas into one film has to work! Right? Sadly, no, that’s not how it works. At least that didn’t work for Warner Bros. crime thriller with a splash of horror mojo, “The Factory”. Take one part “Silence of the Lambs”, a little “Manhunter”, and add every Ashley Judd crime thriller available and “The Factory” is born. While it may be a distorted love child of the past, it has a strong cast, great photography, and a surprisingly twisted twist. Unfortunately all of those goodies couldn’t save this overstuffed sleeper from ending up straight to DVD and out of the public eye.

“The Factory”, directed by Morgan O’Neill, tells the story of partnered detectives Mike (played by John Cusack) and Kelsey (played by Jennifer Carpenter) working in New York City as they track a serial killer that has been targeting prostitutes. Meanwhile we follow the killer Carl (played by Dallas Roberts) as he stalks his next victims. Mike’s family feels the distance from him due to the grueling hours of his work. This is all until his daughter Abby (played by Mae Whitman) is picked up by Carl and kept in his underground lair. It becomes clear that Carl has more in plan than just torturing and killing Abby because she sees that he is holding two other girls hostage trying to impregnate them both. Mike goes on a rampage in searching for Abby so it leaves Kelsey to remain the solid detective and help him find his daughter before she becomes another trophy wife for Carl.

As I said before, there are several aspects of this film that were well done. The acting is solid from every player, especially Cusack and Carpenter. They work well as a team and Carpenter as an actress allows Cusack to step into her normally type casted role of “over the top cop”. Dallas Roberts plays an effective killer but unfortunately the movie pulls a page from the “Manhunter” book and tries to make us sympathize with him. That concept can only truly work when we as an audience are protected from his dark actions. The sympathy card is played toward the end of the film which is too little too late for a serial killer profiling. The directing by O’Neill is strongest in the direction given to the actors as well as the photography. He sets up an atmosphere and tone that is consistent throughout the run of the film. There were no attempts to add humor or needless scenes of emotional dialogue. This movie could have been chock full of scenes where Cusack “goes off the edge” and makes “dirty cop” decisions in response to his daughter missing. Instead O’Neill focuses on the situation that Cusack’s daughter is in so that we as a viewer can piece together the solution for ourselves. By the end the film does introduce a twist that changes the flow of the film and it is effective. The hints to the ending are covered from the beginning so it doesn’t cheat and force a plot change.

The problem that “The Factory” runs into is that it has too many ideas at once. There are several little glimpses into where the narrative could have gone. In contrast, most films go for one narrative style in these crime thrillers and they beat us over the head with it. Where this movie went for five different angles to drive home the ending, it could have had three. It’s not a huge problem, and I have to give credit to O’Neill that he avoided making an entire revenge style thriller, but he needed to scale the ideas down. He has a knack for pacing and taking his time with elements of the plot which would have been even more apparent if he would have chosen two or three angles to portray Cusack’s journey. Overall, “The Factory” is by no means a bad movie. It’s well acted, respectfully shot, and attempts to create an original story. It just leaves you in the middle feeling that it was not bad, or insanely good, just an okay thriller.


          Hank Aaron        

“Henry Aaron in the second inning walked and scored. He’s sittin’ on 714. Here’s the pitch by Downing. Swinging. There’s a drive into left-center field! That ball is gonna be … outta here! It’s gone! It’s 715! There’s a new home run champion of all time, and it’s Henry Aaron!” — Milo Hamilton, April 8, 1974

UUID: 
5a36cc6f-e91d-4cbe-b7a4-25178b6a6123
Short UUID: 
5a36cc6f
Brief description: 
&ldquo;Henry Aaron in the second inning walked and scored. He&rsquo;s sittin&rsquo; on 714. Here&rsquo;s the pitch by Downing. Swinging. There&rsquo;s a drive into left-center field! That ball is gonna be &hellip; outta here! It&rsquo;s gone! It&rsqu...
Author: 
Completed Book Projects: 
First Name: 
Hank
Last Name: 
Aaron
Given Name: 
Henry Louis
Sort name: 
Aaron Henry Louis
Birth Year: 
1934
Birth Month: 
February
Birth Day: 
5
Birth Country: 
USA
Birth State: 
AL
Birth City: 
Mobile
BBRef ID: 
aaronha01
Retrosheet key: 
aaroh101
Article status: 
Complete article
Old bio ID: 
3839

          Cap Anson        

Cap Anson, baseball's first superstar, was the dominant on-field figure of nineteenth-century baseball. He was a small-town boy from Iowa who earned his fame as the playing manager of the fabled Chicago White Stockings, the National League team now known as the Cubs. A larger-than-life figure of great talents and great faults, Anson managed the White Stockings to five pennants and set all the batting records that men such as Ty Cobb and Babe Ruth later broke.

UUID: 
9b42f875-27d0-4518-a150-04611c9eb294
Short UUID: 
9b42f875
Brief description: 
Cap Anson, baseball's first superstar, was the dominant on-field figure of nineteenth-century baseball. He was a small-town boy from Iowa who earned his fame as the playing manager of the fabled Chicago White Stockings, the National League team now ...
Author: 
Awards and Honors: 
Completed Book Projects: 
Demographic: 
First Name: 
Cap
Last Name: 
Anson
Given Name: 
Adrian Constantine
Sort name: 
Anson Adrian Constantine
Birth Year: 
1852
Birth Month: 
April
Birth Day: 
17
Birth Country: 
USA
Birth State: 
IA
Birth City: 
Marshalltown
Death Year: 
1922
Death Month: 
April
Death Day: 
14
Death Country: 
USA
Death State: 
IL
Death City: 
Chicago
BBRef ID: 
ansonca01
Retrosheet key: 
ansoc101
Article status: 
Complete article
Old bio ID: 
1257

          Craig Biggio        

While a catcher for the Seton Hall University Pirates in 1987, Craig Biggio and two teammates – future MLB slugger Mo Vaughn and 1987 NCAA batting leader Marteese Robinson – were dubbed “The Hit Men.” After a brief time in the minor leagues through the first half of 1988, Biggio spent the next 20 years playing catcher, second base, and outfield for the Houston Astros.

UUID: 
f4d29cc8-625d-4487-abd0-5d2d77aa825b
Short UUID: 
f4d29cc8
Awards and Honors: 
Achievements: 
All-Stars: 
First Name: 
Craig
Last Name: 
Biggio
Given Name: 
Craig Alan
Sort name: 
Biggio Craig Alan
Birth Year: 
1965
Birth Month: 
December
Birth Day: 
14
Birth Country: 
USA
Birth State: 
NY
Birth City: 
Smithtown
BBRef ID: 
biggicr01
Retrosheet key: 
biggc001
Article status: 
Complete article
Date assigned: 
Mon, 01/26/2015

          Wade Boggs        

Wade Boggs“That kid’s got a hell of a stance! Everything’s perfect! He ought to become a great hitter!” Legend has it that Ted Williams uttered these words while critiquing a photo of an 18-month-old boy.1 He was absolutely right; that boy, Wade Boggs, went on to win several batting titles on his way to becoming one of the best hitters of all time in a Hall of Fame career.

UUID: 
e083ea50-5370-459b-ac0e-092b780040d0
Short UUID: 
e083ea50
Author: 
Awards and Honors: 
First Name: 
Wade
Last Name: 
Boggs
Given Name: 
Wade Anthony
Sort name: 
Boggs Wade Anthony
Birth Year: 
1958
Birth Month: 
June
Birth Day: 
15
Birth Country: 
USA
Birth State: 
NE
Birth City: 
Omaha
BBRef ID: 
boggswa01
Retrosheet key: 
boggw001
Article status: 
Complete article
Date assigned: 
Tue, 03/18/2014

          Lou Brock        

"Some in the press and in the stands considered him too casual about his job, but that was a misperception. In fact, he was driven, not merely by a desire, but by a rage to succeed." David Halberstam, "October 1964"1

 

UUID: 
cb8af7aa-2dbd-4662-b3ac-1b2546e6e38d
Short UUID: 
cb8af7aa
Awards and Honors: 
Author: 
Achievements: 
Completed Book Projects: 
First Name: 
Lou
Last Name: 
Brock
Given Name: 
Louis Clark
Sort name: 
Brock Louis Clark
Birth Year: 
1939
Birth Month: 
June
Birth Day: 
18
Birth Country: 
USA
Birth State: 
AR
Birth City: 
El Dorado
BBRef ID: 
brocklo01
Retrosheet key: 
brocl102
Article status: 
Complete article
Old bio ID: 
2220
Date assigned: 
Sun, 08/12/2007

          Rod Carew        

“He has no weakness as a hitter. Pitch him inside, outside, high, low, fast stuff, breaking balls-anything you throw he can handle. He swings with the pitch; that is why he’s so great, He has no holes.”1

UUID: 
0746c6ee-9e31-48a2-b8c6-37eeec275bd7
Short UUID: 
0746c6ee
Author: 
Birthplace: 
First Name: 
Rod
Last Name: 
Carew
Given Name: 
Rodney Cline
Sort name: 
Carew Rodney Cline
Birth Year: 
1945
Birth Month: 
October
Birth Day: 
1
Birth Country: 
Panama
Birth State: 
Canal Zone
Birth City: 
Gatun
BBRef ID: 
carewro01
Retrosheet key: 
carer001
Article status: 
Complete article
Old bio ID: 
3738
Date assigned: 
Tue, 10/07/2014

          Roberto Clemente        

Roberto Clemente's greatness transcended the diamond. On it, he was electrifying with his penchant for bad-ball hitting, his strong throwing arm from right field, and the way he played with a reckless but controlled abandon. Off it, he was a role model to the people of his homeland and elsewhere. Helping others represented the way Clemente lived. It would also represent the way he died.

UUID: 
8b153bc4-575a-4a7a-8ac5-edc1e28f4542
Short UUID: 
8b153bc4
Brief description: 
Roberto Clemente's greatness transcended the diamond. On it, he was electrifying with his penchant for bad-ball hitting, his strong throwing arm from right field, and the way he played with a reckless but controlled abandon. Off it, he was a role...
Author: 
Birthplace: 
First Name: 
Roberto
Last Name: 
Clemente
Given Name: 
Roberto
Matrilineal Name: 
Walker
Sort name: 
Clemente Roberto Walker
Birth Year: 
1934
Birth Month: 
August
Birth Day: 
18
Birth Country: 
P.R.
Birth City: 
Carolina
Death Year: 
1972
Death Month: 
December
Death Day: 
31
Death Country: 
P.R.
Death City: 
San Juan
BBRef ID: 
clemero01
Retrosheet key: 
clemr101
Article status: 
Complete article
Old bio ID: 
1255

          Ty Cobb        

UUID: 
7551754a-70f8-40ae-95a5-77bb2699d002
Short UUID: 
7551754a
Brief description: 
Perhaps the most competitive and complex personality ever to appear in a big league uniform, Ty Cobb was the dominant player in the American League during the Deadball Era, and arguably the greatest player in the history of the game. During his 24-...
Completed Book Projects: 
Demographic: 
First Name: 
Ty
Last Name: 
Cobb
Given Name: 
Tyrus Raymond
Sort name: 
Cobb Tyrus Raymond
Birth Year: 
1886
Birth Month: 
December
Birth Day: 
18
Birth Country: 
USA
Birth State: 
GA
Birth City: 
Narrows
Death Year: 
1961
Death Month: 
July
Death Day: 
17
Death Country: 
USA
Death State: 
GA
Death City: 
Atlanta
BBRef ID: 
cobbty01
Retrosheet key: 
cobbt101
Article status: 
Complete article
Old bio ID: 
1721

          Eddie Collins        

An excellent place-hitter, slick fielder, and brainy baserunner, Eddie Collins epitomized the style of play that made the Deadball Era unique. At the plate, the 5-foot-9, 175-pound left-handed batter possessed a sharp batting eye, and aimed to hit outside pitches to the opposite field and trick deliveries back through the box. Once on base, Collins was a master at stealing, even though his foot speed wasn't particularly noteworthy.

UUID: 
c480756d-bde9-41db-b281-378822e4c956
Short UUID: 
c480756d
Achievements: 
Completed Book Projects: 
First Name: 
Eddie
Last Name: 
Collins
Given Name: 
Edward Trowbridge
Suffix: 
Sr.
Sort name: 
Collins Edward Trowbridge Sr.
Birth Year: 
1887
Birth Month: 
May
Birth Day: 
2
Birth Country: 
USA
Birth State: 
NY
Birth City: 
Millerton
Death Year: 
1951
Death Month: 
March
Death Day: 
25
Death Country: 
USA
Death State: 
MA
Death City: 
Boston
BBRef ID: 
collied01
Retrosheet key: 
colle101
Article status: 
Complete article

          Tony Gwynn        

There has never been a sports icon linked to a city quite like Tony Gwynn is to San Diego. The eight-time batting champion went to college at San Diego State, spent his entire Hall of Fame career with the San Diego Padres, then returned to his alma mater to become a collegiate baseball coach for 12 seasons.

UUID: 
2236deb4-7f64-41d9-9ade-cab161fecc76
Short UUID: 
2236deb4
Author: 
Demographic: 
Awards and Honors: 
First Name: 
Tony
Last Name: 
Gwynn
Given Name: 
Anthony Keith
Suffix: 
Sr.
Sort name: 
Gwynn Anthony Keith Sr.
Birth Year: 
1960
Birth Month: 
May
Birth Day: 
9
Birth Country: 
USA
Birth State: 
CA
Birth City: 
Los Angeles
Death Year: 
2014
Death Month: 
June
Death Day: 
16
Death Country: 
USA
Death State: 
CA
Death City: 
Poway
BBRef ID: 
gwynnto01
Retrosheet key: 
gwynt001
Article status: 
Complete article
Date assigned: 
Tue, 08/02/2016

          Al Kaline        

Albert William Kaline was born December 19, 1934, to Nicholas and Naomi Kaline in Baltimore. His father, a broom maker by trade, was a semipro baseball player, and began working with young Al to develop a pitcher’s arm. Nicholas would squat down, while his son threw a variety of pitches. By the time he was nine, Al had learned a fastball, curveball, and changeup, and the work paid off. Kaline, while pitching for Westport Grammar School, won 10 straight games.

UUID: 
a141b60c-e0a7-42ba-8bc4-768589df9f3e
Short UUID: 
a141b60c
Brief description: 
Albert William Kaline was born December 19, 1934, to Nicholas and Naomi Kaline in Baltimore. His father, a broom maker by trade, was a semipro baseball player, and began working with young Al to develop a pitcher&rsquo;s arm. Nicholas would squat dow...
Author: 
Awards and Honors: 
Demographic: 
Completed Book Projects: 
First Name: 
Al
Last Name: 
Kaline
Given Name: 
Albert William
Sort name: 
Kaline Albert William
Birth Year: 
1934
Birth Month: 
December
Birth Day: 
19
Birth Country: 
USA
Birth State: 
MD
Birth City: 
Baltimore
BBRef ID: 
kalinal01
Retrosheet key: 
kalia101
Article status: 
Complete article
Old bio ID: 
1902

          Nap Lajoie        

UUID: 
ac9dc07e-7fc8-4131-a7f9-1022563ff236
Short UUID: 
ac9dc07e
Brief description: 
The first superstar in American League history, Napoleon Lajoie combined graceful, effortless fielding with powerful, fearsome hitting to become one of the greatest all-around players of the Deadball Era, and one of the best second basemen of all t...
Demographic: 
Completed Book Projects: 
Author: 
Ongoing Group Projects: 
Awards and Honors: 
First Name: 
Nap
Last Name: 
Lajoie
Given Name: 
Napoleon
Sort name: 
Lajoie Napoleon
Birth Year: 
1874
Birth Month: 
September
Birth Day: 
5
Birth Country: 
USA
Birth State: 
RI
Birth City: 
Woonsocket
Death Year: 
1959
Death Month: 
February
Death Day: 
7
Death Country: 
USA
Death State: 
FL
Death City: 
Daytona Beach
BBRef ID: 
lajoina01
Retrosheet key: 
lajon101
Article status: 
Complete article
Old bio ID: 
1743

          Willie Mays        

"If somebody came up and hit .450, stole 100 bases, and performed a miracle in the field every day, I'd still look you right in the eye and tell you that Willie was better. He could do the five things you have to do to be a superstar: hit, hit with power, run, throw and field. And he had the other magic ingredient that turns a superstar into a super Superstar. Charisma. He lit up a room when he came in. He was a joy to be around."

UUID: 
64f5dfa2-b089-4dcb-ab2d-33f12a2fc6b1
Short UUID: 
64f5dfa2
Brief description: 
If somebody came up and hit .450, stole 100 bases, and performed a miracle in the field every day, I'd still look you right in the eye and tell you that Willie was better. He could do the five things you have to do to be a superstar: hit, hit with ...
Author: 
Demographic: 
Completed Book Projects: 
First Name: 
Willie
Last Name: 
Mays
Given Name: 
Willie Howard
Sort name: 
Mays Willie Howard
Birth Year: 
1931
Birth Month: 
May
Birth Day: 
6
Birth Country: 
USA
Birth State: 
AL
Birth City: 
Westfield
BBRef ID: 
mayswi01
Retrosheet key: 
maysw101
Article status: 
Complete article
Old bio ID: 
388

          Stan Musial        

"How good was Stan Musial? He was good enough to take your breath away."
— Vin Scully

UUID: 
2142e2e5-b80e-4a74-91a6-be3887d423f2
Short UUID: 
2142e2e5
Brief description: 
"How good was Stan Musial? He was good enough to take your breath away." --Vin ScullyAbout twenty-five miles south and a bit east of Pittsburgh, rough...
Author: 
Demographic: 
Completed Book Projects: 
First Name: 
Stan
Last Name: 
Musial
Given Name: 
Stanley Frank
Sort name: 
Musial Stanley Frank
Birth Year: 
1920
Birth Month: 
November
Birth Day: 
21
Birth Country: 
USA
Birth State: 
PA
Birth City: 
Donora
Death Year: 
2013
Death Month: 
January
Death Day: 
19
Death Country: 
USA
Death State: 
MO
Death City: 
Ladue
BBRef ID: 
musiast01
Retrosheet key: 
musis101
Article status: 
Complete article
Old bio ID: 
816

          Cal Ripken        

On a warm September evening in 1995 at Baltimore’s Camden Yards, Oriole shortstop Cal Ripken Jr. helped restore America’s faith in baseball. The contentious nature of the previous year’s strike had left many of the sport’s dedicated fans wondering what the future held for their beloved national pastime.

UUID: 
8bfeadd2-6e40-4d8b-b01f-b569da8a2aad
Short UUID: 
8bfeadd2
Brief description: 
On a warm September evening in 1995 at Baltimore&rsquo;s Camden Yards, Oriole shortstop Cal Ripken Jr. helped restore America&rsquo;s faith in baseball. The contentious nature of the previous year&rsquo;s strike had left many of the sport&rsquo;s ded...
Achievements: 
Author: 
Demographic: 
First Name: 
Cal
Last Name: 
Ripken
Given Name: 
Calvin Edwin
Suffix: 
Jr.
Sort name: 
Ripken Calvin Edwin Jr.
Birth Year: 
1960
Birth Month: 
August
Birth Day: 
24
Birth Country: 
USA
Birth State: 
MD
Birth City: 
Havre de Grace
BBRef ID: 
ripkeca01
Retrosheet key: 
ripkc001
Article status: 
Complete article
Old bio ID: 
3633

          Avviare da GRUB2 una LIVE.iso in una partizione USB avente UUID noto        
Dato il procedimento è spiegato nella pagina WEB http://sargonsei.altervista.org/live/ inserisco alcuni esempi di menù da aggiungere al file /etc/grub.d/40_custom per avviare delle LIVE.iso collocate nella partizione /iso/ a sua volta collocata in una memoria USB menuentry "ubuntu-mate-16.04-desktop-amd64.iso LIVE (/dev/sd_UUID 56C2-9F49)" { set root=UUID=56C2-9F49 search --no-floppy --fs-uuid --set=root 56C2-9F49 set isofile="/iso/ubuntu-mate-16.04-desktop-amd64.iso" loopback loop $isofile linux (loop)/casper/vmlinuz.efi […]
          Handling Very Large Tables in Postgres Using Partitioning        

One of the interesting patterns that we’ve seen, as a result of managing one of the largest fleets of Postgres databases, is one or two tables growing at a rate that’s much larger and faster than the rest of the tables in the database. In terms of absolute numbers, a table that grows sufficiently large is on the order of hundreds of gigabytes to terabytes in size. Typically, the data in this table tracks events in an application or is analogous to an application log. Having a table of this size isn’t a problem in and of itself, but can lead to other issues; query performance can start to degrade and indexes can take much longer to update. Maintenance tasks, such as vacuum, can also become inordinately long. Depending on how you need to work with the information being stored, Postgres table partitioning can be a great way to restore query performance and deal with large volumes of data over time without having to resort to changing to a different data store.

We use pg_partman ourselves in the Postgres database that backs the control plane that maintains the fleet of Heroku Postgres, Heroku Redis, and Heroku Kafka stores. In our control plane, we have a table that tracks all of the state transitions for any individual data store. Since we don’t need that information to stick around after a couple of weeks, we use table partitioning. This allows us to drop tables after the two week window and we can keep queries blazing fast. To understand how to get better performance with a large dataset in Postgres, we need to understand how Postgres does inheritance, how to set up table partitions manually, and then how to use the Postgres extension, pg_partman, to ease the partitioning setup and maintenance process.

Let’s Talk About Inheritance First

Postgres has basic support for table partitioning via table inheritance. Inheritance for tables in Postgres is much like inheritance in object-oriented programming. A table is said to inherit from another one when it maintains the same data definition and interface. Table inheritance for Postgres has been around for quite some time, which means the functionality has had time to mature. Let’s walk through a contrived example to illustrate how inheritance works:

CREATE TABLE products (
    id BIGSERIAL,
    price INTEGER
    created_at TIMESTAMPTZ,
    updated_at TIMESTAMPTZ
);

CREATE TABLE books (
    isbn TEXT,
    author TEXT,
    title TEXT
) INHERITS (products);

CREATE TABLE albums (
    artist TEXT,
    length INTEGER,
    number_of_songs INTEGER
) INHERITS (products);

In this example, both books and albums inherit from products. This means that if a record was inserted into the books table, it would have all the same characteristics of the products table plus that of the books table. If a query was issued against the products table, that query would reference information on the product table plus all of its descendants. For this example, the query would reference products, books and albums. That’s the default behavior in Postgres. But, you can also issue queries against any of the child tables individually.

Setting up Partitioning Manually

Now that we have a grasp on inheritance in Postgres, we’ll set up partitioning manually. The basic premise of partitioning is that a master table exists that all other children inherit from. We’ll use the phrase ‘child table’ and partition interchangeably throughout the rest of the setup process. Data should not live on the master table at all. Instead, when data gets inserted into the master table, it gets redirected to the appropriate child partition table. This redirection is usually defined by a trigger that lives in Postgres. On top of that, CHECK constraints are put on each of the child tables so that if data were to be inserted directly on the child table, the correct information will be inserted. That way data that doesn’t belong in the partition won’t end up in there.

When doing table partitioning, you need to figure out what key will dictate how information is partitioned across the child tables. Let’s go through the process of partitioning a very large events table in our Postgres database. For an events table, time is the key that determines how to split out information. Let’s also assume that our events table gets 10 million INSERTs done in any given day and this is our original events table schema:

CREATE TABLE events (
    uuid text,
    name text,
    user_id bigint,
    account_id bigint,
    created_at timestamptz
); 

Let’s make a few more assumptions to round out the example. The aggregate queries that run against the events table only have a time frame of a single day. This means our aggregations are split up by hour for any given day. Our usage of the data in the events table only spans a couple of days. After that time, we don’t query the data any more. On top of that, we have 10 million events generated a day. Given these extra assumptions, it makes sense to create daily partitions. The key that we’ll use to partition the data will be the time at which the event was created (e.g. created_at).

CREATE TABLE events (
    uuid text,
    name text,
    user_id bigint,
    account_id bigint,
    created_at timestamptz
);

CREATE TABLE events_20160801 ( 
    CHECK (created_at >= ‘2016-08-01 00:00:00’ AND created_at < ‘2016-08-02 00:00:00’)  
) INHERITS (events);

CREATE TABLE events_20160802 ( 
    CHECK (created_at >= ‘2016-08-02 00:00:00’ AND created_at < ‘2016-08-03 00:00:00’)   
) INHERITS (events);

Our master table has been defined as events and we have two tables out in the future that are ready to accept data, events_20160801 and events_20160802. We’ve also put CHECK constraints on them to make sure that only data for that day ends up on that partition. Now we need to create a trigger to make sure that any data entered on the master table gets directed to the correct partition:

CREATE OR REPLACE FUNCTION event_insert_trigger()
RETURNS TRIGGER AS $$
BEGIN
    IF ( NEW.created_at >= ‘2016-08-01 00:00:00'AND
         NEW.created_at < ‘2016-08-02 00:00:00' ) THEN
        INSERT INTO events_20160801 VALUES (NEW.*);
    ELSIF ( NEW.created_at >= ‘2016-08-02 00:00:00'AND
         NEW.created_at < ‘2016-08-03 00:00:00' ) THEN
        INSERT INTO events_20160802 VALUES (NEW.*);
    ELSE
        RAISE EXCEPTION 'Date out of range.  Fix the event_insert_trigger() function!';
    END IF;
    RETURN NULL;
END;
$$
LANGUAGE plpgsql;

CREATE TRIGGER insert_event_trigger
    BEFORE INSERT ON event
    FOR EACH ROW EXECUTE PROCEDURE event_insert_trigger();

Great! The partitions have been created, the trigger function defined, and the trigger has been added to the events table. At this point, my application can insert data on the events table and the data can be directed to the appropriate partition.

Unfortunately, utilizing table partitioning is a very manual setup fraught with chances for failure. It requires us to go into the database every so often to update the partitions and the trigger, and we haven’t even talked about removing old data from the database yet. This is where pg_partman comes in.

Implementing pg_partman

pg_partman is a partition management extension for Postgres that makes the process of creating and managing table partitions easier for both time and serial-based table partition sets. Compared to partitioning a table manually, pg_partman makes it much easier to partition a table and reduce the code necessary to run partitioning outside of the database. Let’s run through an example of doing this from scratch:

First, let’s load the extension and create our events table. If you already have a big table defined, the pg_partman documentation has guidance for how to convert that table into one that’s using table partitioning.

$ heroku pg:psql -a sushi
sushi::DATABASE=> CREATE EXTENSION pg_partman;
sushi::DATABASE=> CREATE TABLE events (
  id bigint,
  name text,
  properities jsonb,
  created_at timestamptz
);

Let’s reuse our assumptions that we made about our event data we made earlier. We’ve got 10 million events that are created a day and our queries really need aggregation on a daily basis. Because of this we’re going to create daily partitions.

sushi::DATABASE=> SELECT create_parent('public.events', 'created_at', 'time', 'daily');

This command is telling pg_partman that we’re going to use time-series based partitioning, created_at is going to be the column we use for partitioning, and we want to partition on a daily basis for our master events table. Amazingly, everything that was done to manually set up partitioning is completed in this one command. But we’re not finished, we need to make sure that on regular intervals maintenance is run on the partitions so that new tables get created and old ones get removed.

sushi::DATABASE=> SELECT run_maintenance();

The run_maintenance() command will instruct pg_partman to look through all of the tables that were partitioned and identify if new partitions should be created and old partitions destroyed. Whether or not a partition should be destroyed is determined by the retention configuration options. While this command can be run via a terminal session, we need to set this up to run on a regular basis. This is a great opportunity to use Heroku Scheduler to accomplish the task.

pg_partman Scheduler

This command will run on an hourly basis to double check the partitions in the database. Checking the partitioning on an hourly basis might be a bit overkill in this scenario but since Heroku Scheduler is a best effort service, running it hourly is not going to cause any performance impacts on the database.

That’s it! We’ve set up table partitioning in Heroku Postgres and it will be running on its own with very little maintenance on our part. This setup only scratches the surface of what’s possible with pg_partman. Check out the extension’s documentation for the details of what’s possible.

Should I Use Table Partitioning?

Table partitioning allows you to break out one very large table into many smaller tables dramatically increasing performance. As pointed out in the 'Setting up Partitioning Manually' section, many challenges exist when trying to create and use table partitioning on your own but pg_partman can ease that operational burden. Despite that, table partitioning shouldn’t be the first solution you reach for when you run into problems. A number of questions should be asked to determine if table partitioning is the right fit:

  1. Do you have a sufficiently large data set stored in one table, and do you expect it to grow significantly over time?
  2. Is the data immutable, that is, will it never updated after being initially inserted?
  3. Have you done as much optimization as possible on the big table with indexes?
  4. Do you have data that has little value after a period of time?
  5. Is there a small range of data that has to be queried to get the results needed?
  6. Can data that has little value be archived to a slower, cheaper storage medium, or can the older data be stored in aggregate or “rolled up”?

If you answered yes to all of these questions, table partitioning could make sense for you. The big caveat is that table partitioning requires you to evaluate how you’re querying your data. This is a big departure from designing a schema and optimizing it as you go, table partitioning requires you to plan ahead and consider your usage patterns. So long as you take these factors into account, table partitioning can create very real performance gains for your queries and your application.

Extending Your Postgres Installation

In situations where you have high volumes of data that has a very short shelf life, days, weeks or even months, table partitioning can make lots of sense. As always, make sure you ask how you’re going to query your data now and into the future. Table partitioning won’t handle everything for you but it will at least allow you to extend the life of your Heroku Postgres installation. If you’re using pg_partman, we’d love to hear about it. Email us at postgres@heroku.com or via Twitter @heroku.


          Manuel de la Pena: A look alike pyinotify for Windows        

Before I introduce the code, let me say that this is not a 100% exact implementation of the interfaces that can be found in pyinotify but the implementation of a subset that matches my needs. The main idea of creating this post is to give an example of the implementation of such a library for Windows trying to reuse the code that can be found in pyinotify.

Once I have excused my self, let get into the code. First of all, there are a number of classes from pyinotify that we can use in our code. That subset of classes is the below code which I grabbed from pyinotify git:

#!/usr/bin/env python
 
# pyinotify.py - python interface to inotify
# Copyright (c) 2010 Sebastien Martini <seb@dbzteam.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
"""Platform agnostic code grabed from pyinotify."""
import logging
import os
 
COMPATIBILITY_MODE = False
 
 
class RawOutputFormat:
    """
    Format string representations.
    """
    def __init__(self, format=None):
        self.format = format or {}
 
    def simple(self, s, attribute):
        if not isinstance(s, str):
            s = str(s)
        return (self.format.get(attribute, '') + s +
                self.format.get('normal', ''))
 
    def punctuation(self, s):
        """Punctuation color."""
        return self.simple(s, 'normal')
 
    def field_value(self, s):
        """Field value color."""
        return self.simple(s, 'purple')
 
    def field_name(self, s):
        """Field name color."""
        return self.simple(s, 'blue')
 
    def class_name(self, s):
        """Class name color."""
        return self.format.get('red', '') + self.simple(s, 'bold')
 
output_format = RawOutputFormat()
 
 
class EventsCodes:
    """
    Set of codes corresponding to each kind of events.
    Some of these flags are used to communicate with inotify, whereas
    the others are sent to userspace by inotify notifying some events.
 
    @cvar IN_ACCESS: File was accessed.
    @type IN_ACCESS: int
    @cvar IN_MODIFY: File was modified.
    @type IN_MODIFY: int
    @cvar IN_ATTRIB: Metadata changed.
    @type IN_ATTRIB: int
    @cvar IN_CLOSE_WRITE: Writtable file was closed.
    @type IN_CLOSE_WRITE: int
    @cvar IN_CLOSE_NOWRITE: Unwrittable file closed.
    @type IN_CLOSE_NOWRITE: int
    @cvar IN_OPEN: File was opened.
    @type IN_OPEN: int
    @cvar IN_MOVED_FROM: File was moved from X.
    @type IN_MOVED_FROM: int
    @cvar IN_MOVED_TO: File was moved to Y.
    @type IN_MOVED_TO: int
    @cvar IN_CREATE: Subfile was created.
    @type IN_CREATE: int
    @cvar IN_DELETE: Subfile was deleted.
    @type IN_DELETE: int
    @cvar IN_DELETE_SELF: Self (watched item itself) was deleted.
    @type IN_DELETE_SELF: int
    @cvar IN_MOVE_SELF: Self (watched item itself) was moved.
    @type IN_MOVE_SELF: int
    @cvar IN_UNMOUNT: Backing fs was unmounted.
    @type IN_UNMOUNT: int
    @cvar IN_Q_OVERFLOW: Event queued overflowed.
    @type IN_Q_OVERFLOW: int
    @cvar IN_IGNORED: File was ignored.
    @type IN_IGNORED: int
    @cvar IN_ONLYDIR: only watch the path if it is a directory (new
                      in kernel 2.6.15).
    @type IN_ONLYDIR: int
    @cvar IN_DONT_FOLLOW: don't follow a symlink (new in kernel 2.6.15).
                          IN_ONLYDIR we can make sure that we don't watch
                          the target of symlinks.
    @type IN_DONT_FOLLOW: int
    @cvar IN_MASK_ADD: add to the mask of an already existing watch (new
                       in kernel 2.6.14).
    @type IN_MASK_ADD: int
    @cvar IN_ISDIR: Event occurred against dir.
    @type IN_ISDIR: int
    @cvar IN_ONESHOT: Only send event once.
    @type IN_ONESHOT: int
    @cvar ALL_EVENTS: Alias for considering all of the events.
    @type ALL_EVENTS: int
    """
 
    # The idea here is 'configuration-as-code' - this way, we get
    # our nice class constants, but we also get nice human-friendly text
    # mappings to do lookups against as well, for free:
    FLAG_COLLECTIONS = {'OP_FLAGS': {
        'IN_ACCESS'        : 0x00000001,  # File was accessed
        'IN_MODIFY'        : 0x00000002,  # File was modified
        'IN_ATTRIB'        : 0x00000004,  # Metadata changed
        'IN_CLOSE_WRITE'   : 0x00000008,  # Writable file was closed
        'IN_CLOSE_NOWRITE' : 0x00000010,  # Unwritable file closed
        'IN_OPEN'          : 0x00000020,  # File was opened
        'IN_MOVED_FROM'    : 0x00000040,  # File was moved from X
        'IN_MOVED_TO'      : 0x00000080,  # File was moved to Y
        'IN_CREATE'        : 0x00000100,  # Subfile was created
        'IN_DELETE'        : 0x00000200,  # Subfile was deleted
        'IN_DELETE_SELF'   : 0x00000400,  # Self (watched item itself)
                                          # was deleted
        'IN_MOVE_SELF'     : 0x00000800,  # Self(watched item itself) was moved
        },
                        'EVENT_FLAGS': {
        'IN_UNMOUNT'       : 0x00002000,  # Backing fs was unmounted
        'IN_Q_OVERFLOW'    : 0x00004000,  # Event queued overflowed
        'IN_IGNORED'       : 0x00008000,  # File was ignored
        },
                        'SPECIAL_FLAGS': {
        'IN_ONLYDIR'       : 0x01000000,  # only watch the path if it is a
                                          # directory
        'IN_DONT_FOLLOW'   : 0x02000000,  # don't follow a symlink
        'IN_MASK_ADD'      : 0x20000000,  # add to the mask of an already
                                          # existing watch
        'IN_ISDIR'         : 0x40000000,  # event occurred against dir
        'IN_ONESHOT'       : 0x80000000,  # only send event once
        },
                        }
 
    def maskname(mask):
        """
        Returns the event name associated to mask. IN_ISDIR is appended to
        the result when appropriate. Note: only one event is returned, because
        only one event can be raised at a given time.
 
        @param mask: mask.
        @type mask: int
        @return: event name.
        @rtype: str
        """
        ms = mask
        name = '%s'
        if mask & IN_ISDIR:
            ms = mask - IN_ISDIR
            name = '%s|IN_ISDIR'
        return name % EventsCodes.ALL_VALUES[ms]
 
    maskname = staticmethod(maskname)
 
 
# So let's now turn the configuration into code
EventsCodes.ALL_FLAGS = {}
EventsCodes.ALL_VALUES = {}
for flagc, valc in EventsCodes.FLAG_COLLECTIONS.items():
    # Make the collections' members directly accessible through the
    # class dictionary
    setattr(EventsCodes, flagc, valc)
 
    # Collect all the flags under a common umbrella
    EventsCodes.ALL_FLAGS.update(valc)
 
    # Make the individual masks accessible as 'constants' at globals() scope
    # and masknames accessible by values.
    for name, val in valc.items():
        globals()[name] = val
        EventsCodes.ALL_VALUES[val] = name
 
 
# all 'normal' events
ALL_EVENTS = reduce(lambda x, y: x | y, EventsCodes.OP_FLAGS.values())
EventsCodes.ALL_FLAGS['ALL_EVENTS'] = ALL_EVENTS
EventsCodes.ALL_VALUES[ALL_EVENTS] = 'ALL_EVENTS'
 
 
class _Event:
    """
    Event structure, represent events raised by the system. This
    is the base class and should be subclassed.
 
    """
    def __init__(self, dict_):
        """
        Attach attributes (contained in dict_) to self.
 
        @param dict_: Set of attributes.
        @type dict_: dictionary
        """
        for tpl in dict_.items():
            setattr(self, *tpl)
 
    def __repr__(self):
        """
        @return: Generic event string representation.
        @rtype: str
        """
        s = ''
        for attr, value in sorted(self.__dict__.items(), key=lambda x: x[0]):
            if attr.startswith('_'):
                continue
            if attr == 'mask':
                value = hex(getattr(self, attr))
            elif isinstance(value, basestring) and not value:
                value = "''"
            s += ' %s%s%s' % (output_format.field_name(attr),
                              output_format.punctuation('='),
                              output_format.field_value(value))
 
        s = '%s%s%s %s' % (output_format.punctuation('<'),
                           output_format.class_name(self.__class__.__name__),
                           s,
                           output_format.punctuation('>'))
        return s
 
    def __str__(self):
        return repr(self)
 
 
class _RawEvent(_Event):
    """
    Raw event, it contains only the informations provided by the system.
    It doesn't infer anything.
    """
    def __init__(self, wd, mask, cookie, name):
        """
        @param wd: Watch Descriptor.
        @type wd: int
        @param mask: Bitmask of events.
        @type mask: int
        @param cookie: Cookie.
        @type cookie: int
        @param name: Basename of the file or directory against which the
                     event was raised in case where the watched directory
                     is the parent directory. None if the event was raised
                     on the watched item itself.
        @type name: string or None
        """
        # Use this variable to cache the result of str(self), this object
        # is immutable.
        self._str = None
        # name: remove trailing '\0'
        d = {'wd': wd,
             'mask': mask,
             'cookie': cookie,
             'name': name.rstrip('\0')}
        _Event.__init__(self, d)
        logging.debug(str(self))
 
    def __str__(self):
        if self._str is None:
            self._str = _Event.__str__(self)
        return self._str
 
 
class Event(_Event):
    """
    This class contains all the useful informations about the observed
    event. However, the presence of each field is not guaranteed and
    depends on the type of event. In effect, some fields are irrelevant
    for some kind of event (for example 'cookie' is meaningless for
    IN_CREATE whereas it is mandatory for IN_MOVE_TO).
 
    The possible fields are:
      - wd (int): Watch Descriptor.
      - mask (int): Mask.
      - maskname (str): Readable event name.
      - path (str): path of the file or directory being watched.
      - name (str): Basename of the file or directory against which the
              event was raised in case where the watched directory
              is the parent directory. None if the event was raised
              on the watched item itself. This field is always provided
              even if the string is ''.
      - pathname (str): Concatenation of 'path' and 'name'.
      - src_pathname (str): Only present for IN_MOVED_TO events and only in
              the case where IN_MOVED_FROM events are watched too. Holds the
              source pathname from where pathname was moved from.
      - cookie (int): Cookie.
      - dir (bool): True if the event was raised against a directory.
 
    """
    def __init__(self, raw):
        """
        Concretely, this is the raw event plus inferred infos.
        """
        _Event.__init__(self, raw)
        self.maskname = EventsCodes.maskname(self.mask)
        if COMPATIBILITY_MODE:
            self.event_name = self.maskname
        try:
            if self.name:
                self.pathname = os.path.abspath(os.path.join(self.path,
                                                             self.name))
            else:
                self.pathname = os.path.abspath(self.path)
        except AttributeError, err:
            # Usually it is not an error some events are perfectly valids
            # despite the lack of these attributes.
            logging.debug(err)
 
 
class _ProcessEvent:
    """
    Abstract processing event class.
    """
    def __call__(self, event):
        """
        To behave like a functor the object must be callable.
        This method is a dispatch method. Its lookup order is:
          1. process_MASKNAME method
          2. process_FAMILY_NAME method
          3. otherwise calls process_default
 
        @param event: Event to be processed.
        @type event: Event object
        @return: By convention when used from the ProcessEvent class:
                 - Returning False or None (default value) means keep on
                 executing next chained functors (see chain.py example).
                 - Returning True instead means do not execute next
                   processing functions.
        @rtype: bool
        @raise ProcessEventError: Event object undispatchable,
                                  unknown event.
        """
        stripped_mask = event.mask - (event.mask & IN_ISDIR)
        maskname = EventsCodes.ALL_VALUES.get(stripped_mask)
        if maskname is None:
            raise ProcessEventError("Unknown mask 0x%08x" % stripped_mask)
 
        # 1- look for process_MASKNAME
        meth = getattr(self, 'process_' + maskname, None)
        if meth is not None:
            return meth(event)
        # 2- look for process_FAMILY_NAME
        meth = getattr(self, 'process_IN_' + maskname.split('_')[1], None)
        if meth is not None:
            return meth(event)
        # 3- default call method process_default
        return self.process_default(event)
 
    def __repr__(self):
        return '<%s>' % self.__class__.__name__
 
 
class ProcessEvent(_ProcessEvent):
    """
    Process events objects, can be specialized via subclassing, thus its
    behavior can be overriden:
 
    Note: you should not override __init__ in your subclass instead define
    a my_init() method, this method will be called automatically from the
    constructor of this class with its optionals parameters.
 
      1. Provide specialized individual methods, e.g. process_IN_DELETE for
         processing a precise type of event (e.g. IN_DELETE in this case).
      2. Or/and provide methods for processing events by 'family', e.g.
         process_IN_CLOSE method will process both IN_CLOSE_WRITE and
         IN_CLOSE_NOWRITE events (if process_IN_CLOSE_WRITE and
         process_IN_CLOSE_NOWRITE aren't defined though).
      3. Or/and override process_default for catching and processing all
         the remaining types of events.
    """
    pevent = None
 
    def __init__(self, pevent=None, **kargs):
        """
        Enable chaining of ProcessEvent instances.
 
        @param pevent: Optional callable object, will be called on event
                       processing (before self).
        @type pevent: callable
        @param kargs: This constructor is implemented as a template method
                      delegating its optionals keyworded arguments to the
                      method my_init().
        @type kargs: dict
        """
        self.pevent = pevent
        self.my_init(**kargs)
 
    def my_init(self, **kargs):
        """
        This method is called from ProcessEvent.__init__(). This method is
        empty here and must be redefined to be useful. In effect, if you
        need to specifically initialize your subclass' instance then you
        just have to override this method in your subclass. Then all the
        keyworded arguments passed to ProcessEvent.__init__() will be
        transmitted as parameters to this method. Beware you MUST pass
        keyword arguments though.
 
        @param kargs: optional delegated arguments from __init__().
        @type kargs: dict
        """
        pass
 
    def __call__(self, event):
        stop_chaining = False
        if self.pevent is not None:
            # By default methods return None so we set as guideline
            # that methods asking for stop chaining must explicitely
            # return non None or non False values, otherwise the default
            # behavior will be to accept chain call to the corresponding
            # local method.
            stop_chaining = self.pevent(event)
        if not stop_chaining:
            return _ProcessEvent.__call__(self, event)
 
    def nested_pevent(self):
        return self.pevent
 
    def process_IN_Q_OVERFLOW(self, event):
        """
        By default this method only reports warning messages, you can
        overredide it by subclassing ProcessEvent and implement your own
        process_IN_Q_OVERFLOW method. The actions you can take on receiving
        this event is either to update the variable max_queued_events in order
        to handle more simultaneous events or to modify your code in order to
        accomplish a better filtering diminishing the number of raised events.
        Because this method is defined, IN_Q_OVERFLOW will never get
        transmitted as arguments to process_default calls.
 
        @param event: IN_Q_OVERFLOW event.
        @type event: dict
        """
        log.warning('Event queue overflowed.')
 
    def process_default(self, event):
        """
        Default processing event method. By default does nothing. Subclass
        ProcessEvent and redefine this method in order to modify its behavior.
 
        @param event: Event to be processed. Can be of any type of events but
                      IN_Q_OVERFLOW events (see method process_IN_Q_OVERFLOW).
        @type event: Event instance
        """
        pass
 
 
class PrintAllEvents(ProcessEvent):
    """
    Dummy class used to print events strings representations. For instance this
    class is used from command line to print all received events to stdout.
    """
    def my_init(self, out=None):
        """
        @param out: Where events will be written.
        @type out: Object providing a valid file object interface.
        """
        if out is None:
            out = sys.stdout
        self._out = out
 
    def process_default(self, event):
        """
        Writes event string representation to file object provided to
        my_init().
 
        @param event: Event to be processed. Can be of any type of events but
                      IN_Q_OVERFLOW events (see method process_IN_Q_OVERFLOW).
        @type event: Event instance
        """
        self._out.write(str(event))
        self._out.write('\n')
        self._out.flush()
 
 
class WatchManagerError(Exception):
    """
    WatchManager Exception. Raised on error encountered on watches
    operations.
 
    """
    def __init__(self, msg, wmd):
        """
        @param msg: Exception string's description.
        @type msg: string
        @param wmd: This dictionary contains the wd assigned to paths of the
                    same call for which watches were successfully added.
        @type wmd: dict
        """
        self.wmd = wmd
        Exception.__init__(self, msg)

Unfortunatly we need to implement the code that talks with the Win32 API to be able to retrieve the events in the file system. In my design this is done by the Watch class that looks like this:

# Author: Manuel de la Pena <manuel@canonical.com>
#
# Copyright 2011 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.
"""File notifications on windows."""
 
import logging
import os
import re
 
import winerror
 
from Queue import Queue, Empty
from threading import Thread
from uuid import uuid4
from twisted.internet import task, reactor
from win32con import (
    FILE_SHARE_READ,
    FILE_SHARE_WRITE,
    FILE_FLAG_BACKUP_SEMANTICS,
    FILE_NOTIFY_CHANGE_FILE_NAME,
    FILE_NOTIFY_CHANGE_DIR_NAME,
    FILE_NOTIFY_CHANGE_ATTRIBUTES,
    FILE_NOTIFY_CHANGE_SIZE,
    FILE_NOTIFY_CHANGE_LAST_WRITE,
    FILE_NOTIFY_CHANGE_SECURITY,
    OPEN_EXISTING
)
from win32file import CreateFile, ReadDirectoryChangesW
from ubuntuone.platform.windows.pyinotify import (
    Event,
    WatchManagerError,
    ProcessEvent,
    PrintAllEvents,
    IN_OPEN,
    IN_CLOSE_NOWRITE,
    IN_CLOSE_WRITE,
    IN_CREATE,
    IN_ISDIR,
    IN_DELETE,
    IN_MOVED_FROM,
    IN_MOVED_TO,
    IN_MODIFY,
    IN_IGNORED
)
from ubuntuone.syncdaemon.filesystem_notifications import (
    GeneralINotifyProcessor
)
from ubuntuone.platform.windows.os_helper import (
    LONG_PATH_PREFIX,
    abspath,
    listdir
)
 
# constant found in the msdn documentation:
# http://msdn.microsoft.com/en-us/library/ff538834(v=vs.85).aspx
FILE_LIST_DIRECTORY = 0x0001
FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020
FILE_NOTIFY_CHANGE_CREATION = 0x00000040
 
# a map between the few events that we have on windows and those
# found in pyinotify
WINDOWS_ACTIONS = {
  1: IN_CREATE,
  2: IN_DELETE,
  3: IN_MODIFY,
  4: IN_MOVED_FROM,
  5: IN_MOVED_TO
}
 
# translates quickly the event and it's is_dir state to our standard events
NAME_TRANSLATIONS = {
    IN_OPEN: 'FS_FILE_OPEN',
    IN_CLOSE_NOWRITE: 'FS_FILE_CLOSE_NOWRITE',
    IN_CLOSE_WRITE: 'FS_FILE_CLOSE_WRITE',
    IN_CREATE: 'FS_FILE_CREATE',
    IN_CREATE | IN_ISDIR: 'FS_DIR_CREATE',
    IN_DELETE: 'FS_FILE_DELETE',
    IN_DELETE | IN_ISDIR: 'FS_DIR_DELETE',
    IN_MOVED_FROM: 'FS_FILE_DELETE',
    IN_MOVED_FROM | IN_ISDIR: 'FS_DIR_DELETE',
    IN_MOVED_TO: 'FS_FILE_CREATE',
    IN_MOVED_TO | IN_ISDIR: 'FS_DIR_CREATE',
}
 
# the default mask to be used in the watches added by the FilesystemMonitor
# class
FILESYSTEM_MONITOR_MASK = FILE_NOTIFY_CHANGE_FILE_NAME | \
    FILE_NOTIFY_CHANGE_DIR_NAME | \
    FILE_NOTIFY_CHANGE_ATTRIBUTES | \
    FILE_NOTIFY_CHANGE_SIZE | \
    FILE_NOTIFY_CHANGE_LAST_WRITE | \
    FILE_NOTIFY_CHANGE_SECURITY | \
    FILE_NOTIFY_CHANGE_LAST_ACCESS
 
 
# The implementation of the code that is provided as the pyinotify
# substitute
class Watch(object):
    """Implement the same functions as pyinotify.Watch."""
 
    def __init__(self, watch_descriptor, path, mask, auto_add,
        events_queue=None, exclude_filter=None, proc_fun=None):
        super(Watch, self).__init__()
        self.log = logging.getLogger('ubuntuone.platform.windows.' +
            'filesystem_notifications.Watch')
        self._watching = False
        self._descriptor = watch_descriptor
        self._auto_add = auto_add
        self.exclude_filter = None
        self._proc_fun = proc_fun
        self._cookie = None
        self._source_pathname = None
        # remember the subdirs we have so that when we have a delete we can
        # check if it was a remove
        self._subdirs = []
        # ensure that we work with an abspath and that we can deal with
        # long paths over 260 chars.
        self._path = os.path.abspath(path)
        if not self._path.startswith(LONG_PATH_PREFIX):
            self._path = LONG_PATH_PREFIX + self._path
        self._mask = mask
        # lets make the q as big as possible
        self._raw_events_queue = Queue()
        if not events_queue:
            events_queue = Queue()
        self.events_queue = events_queue
 
    def _path_is_dir(self, path):
        """"Check if the path is a dir and update the local subdir list."""
        self.log.debug('Testing if path "%s" is a dir', path)
        is_dir = False
        if os.path.exists(path):
            is_dir = os.path.isdir(path)
        else:
            self.log.debug('Path "%s" was deleted subdirs are %s.',
                path, self._subdirs)
            # we removed the path, we look in the internal list
            if path in self._subdirs:
                is_dir = True
                self._subdirs.remove(path)
        if is_dir:
            self.log.debug('Adding %s to subdirs %s', path, self._subdirs)
            self._subdirs.append(path)
        return is_dir
 
    def _process_events(self):
        """Process the events form the queue."""
        # we transform the events to be the same as the one in pyinotify
        # and then use the proc_fun
        while self._watching or not self._raw_events_queue.empty():
            file_name, action = self._raw_events_queue.get()
            # map the windows events to the pyinotify ones, tis is dirty but
            # makes the multiplatform better, linux was first :P
            is_dir = self._path_is_dir(file_name)
            if os.path.exists(file_name):
                is_dir = os.path.isdir(file_name)
            else:
                # we removed the path, we look in the internal list
                if file_name in self._subdirs:
                    is_dir = True
                    self._subdirs.remove(file_name)
            if is_dir:
                self._subdirs.append(file_name)
            mask = WINDOWS_ACTIONS[action]
            head, tail = os.path.split(file_name)
            if is_dir:
                mask |= IN_ISDIR
            event_raw_data = {
                'wd': self._descriptor,
                'dir': is_dir,
                'mask': mask,
                'name': tail,
                'path': head.replace(self.path, '.')
            }
            # by the way in which the win api fires the events we know for
            # sure that no move events will be added in the wrong order, this
            # is kind of hacky, I dont like it too much
            if WINDOWS_ACTIONS[action] == IN_MOVED_FROM:
                self._cookie = str(uuid4())
                self._source_pathname = tail
                event_raw_data['cookie'] = self._cookie
            if WINDOWS_ACTIONS[action] == IN_MOVED_TO:
                event_raw_data['src_pathname'] = self._source_pathname
                event_raw_data['cookie'] = self._cookie
            event = Event(event_raw_data)
            # FIXME: event deduces the pathname wrong and we need manually
            # set it
            event.pathname = file_name
            # add the event only if we do not have an exclude filter or
            # the exclude filter returns False, that is, the event will not
            # be excluded
            if not self.exclude_filter or not self.exclude_filter(event):
                self.log.debug('Addding event %s to queue.', event)
                self.events_queue.put(event)
 
    def _watch(self):
        """Watch a path that is a directory."""
        # we are going to be using the ReadDirectoryChangesW whihc requires
        # a direcotry handle and the mask to be used.
        handle = CreateFile(
            self._path,
            FILE_LIST_DIRECTORY,
            FILE_SHARE_READ | FILE_SHARE_WRITE,
            None,
            OPEN_EXISTING,
            FILE_FLAG_BACKUP_SEMANTICS,
            None
        )
        self.log.debug('Watchng path %s.', self._path)
        while self._watching:
            # important information to know about the parameters:
            # param 1: the handle to the dir
            # param 2: the size to be used in the kernel to store events
            # that might be lost whilw the call is being performed. This
            # is complicates to fine tune since if you make lots of watcher
            # you migh used to much memory and make your OS to BSOD
            results = ReadDirectoryChangesW(
                handle,
                1024,
                self._auto_add,
                self._mask,
                None,
                None
            )
            # add the diff events to the q so that the can be processed no
            # matter the speed.
            for action, file in results:
                full_filename = os.path.join(self._path, file)
                self._raw_events_queue.put((full_filename, action))
                self.log.debug('Added %s to raw events queue.',
                    (full_filename, action))
 
    def start_watching(self):
        """Tell the watch to start processing events."""
        # get the diff dirs in the path
        for current_child in listdir(self._path):
            full_child_path = os.path.join(self._path, current_child)
            if os.path.isdir(full_child_path):
                self._subdirs.append(full_child_path)
        # start to diff threads, one to watch the path, the other to
        # process the events.
        self.log.debug('Sart watching path.')
        self._watching = True
        watch_thread = Thread(target=self._watch,
            name='Watch(%s)' % self._path)
        process_thread = Thread(target=self._process_events,
            name='Process(%s)' % self._path)
        process_thread.start()
        watch_thread.start()
 
    def stop_watching(self):
        """Tell the watch to stop processing events."""
        self._watching = False
        self._subdirs = []
 
    def update(self, mask, proc_fun=None, auto_add=False):
        """Update the info used by the watcher."""
        self.log.debug('update(%s, %s, %s)', mask, proc_fun, auto_add)
        self._mask = mask
        self._proc_fun = proc_fun
        self._auto_add = auto_add
 
    @property
    def path(self):
        """Return the patch watched."""
        return self._path
 
    @property
    def auto_add(self):
        return self._auto_add
 
    @property
    def proc_fun(self):
        return self._proc_fun
 
 
class WatchManager(object):
    """Implement the same functions as pyinotify.WatchManager."""
 
    def __init__(self, exclude_filter=lambda path: False):
        """Init the manager to keep trak of the different watches."""
        super(WatchManager, self).__init__()
        self.log = logging.getLogger('ubuntuone.platform.windows.'
            + 'filesystem_notifications.WatchManager')
        self._wdm = {}
        self._wd_count = 0
        self._exclude_filter = exclude_filter
        self._events_queue = Queue()
        self._ignored_paths = []
 
    def stop(self):
        """Close the manager and stop all watches."""
        self.log.debug('Stopping watches.')
        for current_wd in self._wdm:
            self._wdm[current_wd].stop_watching()
            self.log.debug('Watch for %s stopped.', self._wdm[current_wd].path)
 
    def get_watch(self, wd):
        """Return the watch with the given descriptor."""
        return self._wdm[wd]
 
    def del_watch(self, wd):
        """Delete the watch with the given descriptor."""
        try:
            watch = self._wdm[wd]
            watch.stop_watching()
            del self._wdm[wd]
            self.log.debug('Watch %s removed.', wd)
        except KeyError, e:
            logging.error(str(e))
 
    def _add_single_watch(self, path, mask, proc_fun=None, auto_add=False,
        quiet=True, exclude_filter=None):
        self.log.debug('add_single_watch(%s, %s, %s, %s, %s, %s)', path, mask,
            proc_fun, auto_add, quiet, exclude_filter)
        self._wdm[self._wd_count] = Watch(self._wd_count, path, mask,
            auto_add, events_queue=self._events_queue,
            exclude_filter=exclude_filter, proc_fun=proc_fun)
        self._wdm[self._wd_count].start_watching()
        self._wd_count += 1
        self.log.debug('Watch count increased to %s', self._wd_count)
 
    def add_watch(self, path, mask, proc_fun=None, auto_add=False,
        quiet=True, exclude_filter=None):
        if hasattr(path, '__iter__'):
            self.log.debug('Added collection of watches.')
            # we are dealing with a collection of paths
            for current_path in path:
                if not self.get_wd(current_path):
                    self._add_single_watch(current_path, mask, proc_fun,
                        auto_add, quiet, exclude_filter)
        elif not self.get_wd(path):
            self.log.debug('Adding single watch.')
            self._add_single_watch(path, mask, proc_fun, auto_add,
                quiet, exclude_filter)
 
    def update_watch(self, wd, mask=None, proc_fun=None, rec=False,
                     auto_add=False, quiet=True):
        try:
            watch = self._wdm[wd]
            watch.stop_watching()
            self.log.debug('Stopped watch on %s for update.', watch.path)
            # update the data and restart watching
            auto_add = auto_add or rec
            watch.update(mask, proc_fun=proc_fun, auto_add=auto_add)
            # only start the watcher again if the mask was given, otherwhise
            # we are not watchng and therefore do not care
            if mask:
                watch.start_watching()
        except KeyError, e:
            self.log.error(str(e))
            if not quiet:
                raise WatchManagerError('Watch %s was not found' % wd, {})
 
    def get_wd(self, path):
        """Return the watcher that is used to watch the given path."""
        for current_wd in self._wdm:
            if self._wdm[current_wd].path in path and \
                self._wdm[current_wd].auto_add:
                return current_wd
 
    def get_path(self, wd):
        """Return the path watched by the wath with the given wd."""
        watch_ = self._wmd.get(wd)
        if watch:
            return watch.path
 
    def rm_watch(self, wd, rec=False, quiet=True):
        """Remove the the watch with the given wd."""
        try:
            watch = self._wdm[wd]
            watch.stop_watching()
            del self._wdm[wd]
        except KeyrError, err:
            self.log.error(str(err))
            if not quiet:
                raise WatchManagerError('Watch %s was not found' % wd, {})
 
    def rm_path(self, path):
        """Remove a watch to the given path."""
        # it would be very tricky to remove a subpath from a watcher that is
        # looking at changes in ther kids. To make it simpler and less error
        # prone (and even better performant since we use less threads) we will
        # add a filter to the events in the watcher so that the events from
        # that child are not received :)
        def ignore_path(event):
            """Ignore an event if it has a given path."""
            is_ignored = False
            for ignored_path in self._ignored_paths:
                if ignore_path in event.pathname:
                    return True
            return False
 
        wd = self.get_wd(path)
        if wd:
            if self._wdm[wd].path == path:
                self.log.debug('Removing watch for path "%s"', path)
                self.rm_watch(wd)
            else:
                self.log.debug('Adding exclude filter for "%s"', path)
                # we have a watch that cotains the path as a child path
                if not path in self._ignored_paths:
                    self._ignored_paths.append(path)
                # FIXME: This assumes that we do not have other function
                # which in our usecase is correct, but what is we move this
                # to other projects evet?!? Maybe using the manager
                # exclude_filter is better
                if not self._wdm[wd].exclude_filter:
                    self._wdm[wd].exclude_filter = ignore_path
 
    @property
    def watches(self):
        """Return a reference to the dictionary that contains the watches."""
        return self._wdm
 
    @property
    def events_queue(self):
        """Return the queue with the events that the manager contains."""
        return self._events_queue
 
 
class Notifier(object):
    """
    Read notifications, process events. Inspired by the pyinotify.Notifier
    """
 
    def __init__(self, watch_manager, default_proc_fun=None, read_freq=0,
                 threshold=10, timeout=-1):
        """Init to process event according to the given timeout & threshold."""
        super(Notifier, self).__init__()
        self.log = logging.getLogger('ubuntuone.platform.windows.'
            + 'filesystem_notifications.Notifier')
        # Watch Manager instance
        self._watch_manager = watch_manager
        # Default processing method
        self._default_proc_fun = default_proc_fun
        if default_proc_fun is None:
            self._default_proc_fun = PrintAllEvents()
        # Loop parameters
        self._read_freq = read_freq
        self._threshold = threshold
        self._timeout = timeout
 
    def proc_fun(self):
        return self._default_proc_fun
 
    def process_events(self):
        """
        Process the event given the threshold and the timeout.
        """
        self.log.debug('Processing events with threashold: %s and timeout: %s',
            self._threshold, self._timeout)
        # we will process an amount of events equal to the threshold of
        # the notifier and will block for the amount given by the timeout
        processed_events = 0
        while processed_events < self._threshold:
            try:
                raw_event = None
                if not self._timeout or self._timeout < 0:
                    raw_event = self._watch_manager.events_queue.get(
                        block=False)
                else:
                    raw_event = self._watch_manager.events_queue.get(
                        timeout=self._timeout)
                watch = self._watch_manager.get_watch(raw_event.wd)
                if watch is None:
                    # Not really sure how we ended up here, nor how we should
                    # handle these types of events and if it is appropriate to
                    # completly skip them (like we are doing here).
                    self.log.warning('Unable to retrieve Watch object '
                        + 'associated to %s', raw_event)
                    processed_events += 1
                    continue
                if watch and watch.proc_fun:
                    self.log.debug('Executing proc_fun from watch.')
                    watch.proc
          Manuel de la Pena: Network status changes on Windows with python        

At the moment I am sprinting in Argentina trying to make the Ubuntu One port to Windows better by adding support to the sync daemon used on Linux. While the rest of the guys are focused in accomodating the current code to my “multiplatform” requirements, I’m working on getting a number of missing parts to work on windows. One of this parts is the lack of network manager on Windows.

One of the things we need to know to coninusly sync you files on windows is to get an event when your network is present, or dies. As usual this is far easier on Linux than on Windows. To get this event you have to implement the ISesNetwork interface from COM that will allow your object to register to network status changes. Due to the absolute lack of examples on the net (or how bad google is getting ;) ) I’ve decided to share the code I managed to get working:

"""Implementation of ISesNework in Python."""
 
import logging
import logging.handlers
 
import pythoncom
 
from win32com.server.policy import DesignatedWrapPolicy
from win32com.client import Dispatch
 
# set te logging to store the data in the ubuntuone folder
handler = logging.handlers.RotatingFileHandler('network_manager.log', 
                    maxBytes=400, backupCount=5)
service_logger = logging.getLogger('NetworkManager')
service_logger.setLevel(logging.DEBUG)
service_logger.addHandler(handler)
 
## from EventSys.h
PROGID_EventSystem = "EventSystem.EventSystem"
PROGID_EventSubscription = "EventSystem.EventSubscription"
 
# sens values for the events, this events contain the uuid of the
# event, the name of the event to be used as well as the method name 
# of the method in the ISesNetwork interface that will be executed for
# the event.
 
SUBSCRIPTION_NETALIVE = ('{cd1dcbd6-a14d-4823-a0d2-8473afde360f}',
                         'UbuntuOne Network Alive',
                         'ConnectionMade')
 
SUBSCRIPTION_NETALIVE_NOQOC = ('{a82f0e80-1305-400c-ba56-375ae04264a1}',
                               'UbuntuOne Net Alive No Info',
                               'ConnectionMadeNoQOCInfo')
 
SUBSCRIPTION_NETLOST = ('{45233130-b6c3-44fb-a6af-487c47cee611}',
                        'UbuntuOne Network Lost',
                        'ConnectionLost')
 
SUBSCRIPTION_REACH = ('{4c6b2afa-3235-4185-8558-57a7a922ac7b}',
                       'UbuntuOne Network Reach',
                       'ConnectionMade')
 
SUBSCRIPTION_REACH_NOQOC = ('{db62fa23-4c3e-47a3-aef2-b843016177cf}',
                            'UbuntuOne Network Reach No Info',
                            'ConnectionMadeNoQOCInfo')
 
SUBSCRIPTION_REACH_NOQOC2 = ('{d4d8097a-60c6-440d-a6da-918b619ae4b7}',
                             'UbuntuOne Network Reach No Info 2',
                             'ConnectionMadeNoQOCInfo')
 
SUBSCRIPTIONS = [SUBSCRIPTION_NETALIVE,
                 SUBSCRIPTION_NETALIVE_NOQOC,
                 SUBSCRIPTION_NETLOST,
                 SUBSCRIPTION_REACH,
                 SUBSCRIPTION_REACH_NOQOC,
                 SUBSCRIPTION_REACH_NOQOC2 ]
 
SENSGUID_EVENTCLASS_NETWORK = '{d5978620-5b9f-11d1-8dd2-00aa004abd5e}'
SENSGUID_PUBLISHER = "{5fee1bd6-5b9b-11d1-8dd2-00aa004abd5e}"
 
# uuid of the implemented com interface
IID_ISesNetwork = '{d597bab1-5b9f-11d1-8dd2-00aa004abd5e}'
 
class NetworkManager(DesignatedWrapPolicy):
    """Implement ISesNetwork to know about the network status."""
 
    _com_interfaces_ = [IID_ISesNetwork]
    _public_methods_ = ['ConnectionMade',
                        'ConnectionMadeNoQOCInfo', 
                        'ConnectionLost']
    _reg_clsid_ = '{41B032DA-86B5-4907-A7F7-958E59333010}' 
    _reg_progid_ = "UbuntuOne.NetworkManager"
 
    def __init__(self, connected_cb, disconnected_cb):
        self._wrap_(self)
        self.connected_cb = connected_cb 
        self.disconnected_cb = disconnected_cb
 
    def ConnectionMade(self, *args):
        """Tell that the connection is up again."""
        service_logger.info('Connection was made.')
        self.connected_cb()
 
    def ConnectionMadeNoQOCInfo(self, *args):
        """Tell that the connection is up again."""
        service_logger.info('Connection was made no info.')
        self.connected_cb()
 
    def ConnectionLost(self, *args):
        """Tell the connection was lost."""
        service_logger.info('Connection was lost.')
        self.disconnected_cb() 
 
    def register(self):
        """Register to listen to network events."""
        # call the CoInitialize to allow the registration to run in an other
        # thread
        pythoncom.CoInitialize()
        # interface to be used by com
        manager_interface = pythoncom.WrapObject(self)
        event_system = Dispatch(PROGID_EventSystem)
        # register to listent to each of the events to make sure that
        # the code will work on all platforms.
        for current_event in SUBSCRIPTIONS:
            # create an event subscription and add it to the event
            # service
            event_subscription = Dispatch(PROGID_EventSubscription)
            event_subscription.EventClassId = SENSGUID_EVENTCLASS_NETWORK
            event_subscription.PublisherID = SENSGUID_PUBLISHER
            event_subscription.SubscriptionID = current_event[0]
            event_subscription.SubscriptionName = current_event[1]
            event_subscription.MethodName = current_event[2]
            event_subscription.SubscriberInterface = manager_interface
            event_subscription.PerUser = True
            # store the event
            try:
                event_system.Store(PROGID_EventSubscription, 
                                   event_subscription)
            except pythoncom.com_error as e:
                service_logger.error(
                    'Error registering to event %s', current_event[1])
 
        pythoncom.PumpMessages()
 
if __name__ == '__main__':
    from threading import Thread
    def connected():
        print 'Connected'
 
    def disconnected():
        print 'Disconnected'
 
    manager = NetworkManager(connected, disconnected)
    p = Thread(target=manager.register)
    p.start()

The above code represents a NetworkManager class that will execute a callback according to the event that was raised by the sens subsystem. It is important to note that in the above code the ‘Connected’ event will be fired 3 times since we registered to three different connect events while it will fire a single ‘Disconnected’ event. The way to fix this would be to register just to a single event according to the windows system you are running on, but since we do not care in the Ubuntu One sync daemon, well I left it there so everyone can see it :)


          Montar particiones NTFS, FAT y ext4 al inicio en ubuntu 12.04        
En Ubuntu 11.04 no funciona la aplicación ntfs-config para configurar que las particiones NTFS que tenemos en el disco duro se monten en el inicio o arranque del sistema.

Vamos a ver como hacer que cualquier partición, ya sea de Linux (ext4) o de Win2 (NTFS o FAT) se nos monte al arrancar Ubuntu, para así no estar montando y desmontando dichas particiones:



Nomenclatura


Antes de comenzar debemos de saber cual es la partición que vamos a montar, para ello podemos ejecutar el comando:

sudo fdisk -l

Nomenclatura de las particiones según el tipo de disco duro: 

  • Para Discos duros SATA / SCSI, se denominan:
/dev/sdaX - donde a (se identifica con letras "a, b, c, ...") es el disco y X es la partición (se identifica con números "1, 2, 3, ...")

  • Para Discos duros ATA / IDE, se denominan:
/dev/hdaX - donde a es el disco (se identifica con letras "a, b, c, ...") y X es la partición (se identifica con números "1, 2, 3, ...")


Sabiendo esto, vamos a comenzar con el proceso:


1º Averiguar el UUID y el sistema de archivos de la partición a montar en el inicio:


Con el comando:

sudo blkid /dev/sdaX

Nota: En "/dev/sd
aX" poner la partición que necesites (por ejemplo "/dev/sda5")

La terminal para el ejemplo te devolverá algo parecido a:

/dev/sda5: LABEL="DATOS" UUID="18D89F56D89F314C" TYPE="ntfs" 

Donde ya conocemos: 

- El UUID que sería en este ej: 18D89F56D89F314C
- El Type o sistema de archivos que sería en este ej: ntfs

(Por lo general nos puede salir 3 tipos de sistemas de archivos: ext4 (de Linux) y NTFS o FAT (de Win2))


2º Crear la carpeta donde se montará la partición en el directorio /media:


Entramos como root al directorio /media con el comando:

gksudo nautilus /media

Clic derecho en la nueva ventana -> crear una nueva carpeta y la llamamos por ejemplo "datos" (sin las "). 


Nota: Si le pones un nombre compuesto, procura no dejar espacios en blanco entre las palabras, utilizando en su lugar: _ o -, por ej: win2_XP (si no tendrás que utilizar comillas en los comandos, ej: "win2 XP" y puede generar confusión).


3º Decirle al sistema que la monte en el inicio:


Edita el archivo "/etc/fstab" para añadir la partición que quieres montar con el comando:

sudo gedit /etc/fstab

Dependiendo si la partición tiene sistema de archivos: NTFS o FAT, añadir al final del archivo la siguiente línea:

Para NTFS:

UUID=XXXXXXXXXXXX      /media/carpeta_montaje       ntfs-3g default 0 0

Para FAT:

UUID=XXXXXXXXXXXX      /media/carpeta_montaje       vfat rw,uid=1000,gid=1000 0 0

Para ext4:

UUID=XXXXXXXXXXXX     /media/carpeta_montaje   ext4   errors=remount-ro 0 1

Donde debes cambiar:
- "XXXXXXXXXXX" por el UUID que averiguamos antes (en el ej: 18D89F56D89F314C), y 
- "carpeta_montaje" por el nombre exacto de la carpeta que creamos antes (en el ej: datos).
- Los espacios en blanco entre las distintas partes de la línea se hacen pulsando 1 vez el tabulador (doble flecha horizontal encima de "Bloq Mayus"). 

Guardar el archivo y reiniciar.


Posible error:


Si por cualquier motivo cambiamos las particiones (redimensionar, mover, crear, eliminar), nos dará error, ya que se modifican las UUID, y debemos de borrar la línea que añadimos antes de hacer estas modificaciones en el disco duro y una vez arrancado Ubuntu volvemos a hacer todo desde el 1er paso.


Bug: Al personalizar Fstab, se duplican las particiones en Nautilus


https://bugs.launchpad.net/gvfs/+bug/442130

La solución es cambiar en la línea que añadimos al fstab la forma de identificar el UUID de la partición en cuestión "UUID=XXXXXXXXXXXX" por "/dev/disk/by-uuid/XXXXXXXXXXXX". La línea quedaría así:
/dev/disk/by-uuid/XXXXXXXXXXXX     /media/carpeta_montaje   ext4   errors=remount-ro 0 1

También es válida esta otra:

/dev/disk/by-uuid/XXXXXXXXXXXX /media/carpeta_montaje ext4 users,user 0 2


          Festplatten klonen – zwei Musterabläufe        

Wie du vielleicht schon mitbekommen hast, kam es heute "Morgen" zu einer längeren Downtime. Der Grund war, dass die Systemplatte des Hauptservers auf eine neue Platte geklont wurde. Die Partition wurden anschließend noch vergrößert. Bereits letzte Woche wurde die gleiche Prozedur mit der Backupplatte durchgeführt. Im folgenden Post werde ich erläutern, wie ich vorgegangen bin. Dieser Post kann las Vorlage für ähnliche Vorhaben genutzt werden.

Im Wesentlichen kamen dd und (G)Parted zum Einsatz. Mit dd kann man unter anderem Festplatten 1:1 klonen. Da die alten Platten jeweils auf größere überspielt wurden, habe ich nach dem Klonen die Partitionen noch mit parted bzw. GParted vergrößert und verschoben.

 

Gründe

Nicht genügend Platz

Ein Grund, wenn Festplatten geklont werden, kann sein, dass auf der alten einfach nicht mehr genug Speicherplatz vorhanden ist. Dies war bei der Backupplatte der Fall. Dazu kam es aufgrund der vielen System, die auf diese Platte Backups schreiben.
Zudem wollte ich damit beginnen fertige Images der meisten Systeme zu erstellen, sodass ich im Ernstfall bereits eine Basis hätte, auf die ich nur noch aktuelle Backups kopieren müsste.

Der einzige Ausweg bestand für mich darin, die Festplatte durch eine größere zu ersetzen.

 

Hoher "Load Cycle Count"

Die Systemplatte hatte einen Load Cycle Count von über 300.000:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
9 Power_On_Hours 0x0032 082 082 000 Old_age Always - 13753
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 801
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 132
193 Load_Cycle_Count 0x0032 069 069 000 Old_age Always - 393058

...das bedeutet, dass dieses Laufwerk schon mehr Parkvorgange der Leseköpfe hinter sich hatte, als vom Hersteller vorgesehen. Hinweis: WD gibt 300.000 Parkvorgänge als Obergrenze an, die S.M.A.R.T Werte sehen aber 600.000 vor.

Ich hatte dies leider zu spät bemerkt und folglich zu spät WD IntelliPark deaktiviert. Im Zuge der Spiegelung der Backupplatte habe ich dieses Sicherheitsrisiko gleich auch aus dem Weg geschafft.

 

Vorbereitungen

Bitte folgendes beachten:

  • Bei der Arbeit an Festplatten mit dd und (G)Parted kann immer etwas schief laufen, deshalb zur Vorsorge immer Backups durchführen!
  • Jeden Schritt extra kontrollieren!
  • Die neue Platte, auf die die alten geklont wird, muss entweder die gleicher oder eine größere Speicherkapazität besitzen!

Um möglichst hohe Transferraten zu erreichen habe ich mir einen Desktop-Rechner mit S-ATA II (sollte eigentlich selbstverständlich sein), idealen Standplatz (Klonprozess dauert laaaange) und relativ guter Leistung ausgesucht.
Da das dort installiert Ubuntu leicht "verkonfiguriert" (...oder auch "vermurkst") war, habe ich von einem Live-Stick gebooted und sämtliche anderen Festplatten abgehängt (um eine Verwechslung zu vermeiden).

 

Durchführung

Nachdem ich die Festplatten in den Rechner eingebaut hatte und den Livestick gebooted hatte, bin ich wie folgt vorgegangen:

1. Richtige Festplatten aussuchen

Dieser Schritt dürfte eigentlich nicht schwierig sein. Du musst herausfinden, welche Bezeichnung (/dev/sdX) die alte und die neue Platte besitzen. Mit

user@system:~$ cat /proc/partitions

habe ich mir die Partitionen ausgeben lassen. Um zusätzliche Sicherheit zu gewinnen, kann man sich noch die erkannten Festplatten und UUIDs der Partitionen anzeigen lassen:

user@system:~$ ls /dev/sd*      #Festplatten anzeigen
user@system:~$ sudo blkid #UUIDs ausgeben

Wer komplett auf Nummer sicher gehen will, kann die Festplatten noch mit GParted durchsuchen lassen. Dieser Partitionierungs-Tool findet sich in Gnome 2 unter System → Systemverwaltung → GParted.

 

2. Klonen mit dd

Nun habe ich mich in einem Terminal als root eingeloggt:

root@system:~# sudo -s

und den dd Befehl gestartet. dd wird wie folgt verwendet:

root@system:~# dd if=[alte Platte] of=[neue Platte]               #Syntax
root@system:~# dd if=/dev/sda of=/dev/sdb #Beispiel

Anschließend habe ich mich in einem zweiten Terminal ebenfalls als root eingeloggt:

user@system:~$ sudo -s

und mit top die Prozess-ID (PID) des dd-Prozesses bestimmt:

root@system:~# top

Nun habe ich die PID in der Variable $ddpid gespeichert:

root@system:~# ddpid=[Prozess-ID]         #Syntax
root@system:~# ddpid=1256 #Beispiel

...und folgenden Befehl ausgeführt

root@system:~# while [ "`ps -a | grep $ddpid`" ]; do sudo kill -SIGUSR1 $ddpid; sleep 10; done 

Als Folge erhält man alle 10 Sekunden den Fortschritt des dd-Prozesses in dem zuerst geöffneten Terminal (das mit dd) angezeigt. Hierfür gibt es natürlich auch noch andere (einfachere) Möglichkeiten, diese erschien mir aber am sichersten.

 

3. Vergrößern mit (G)parted

Dieser Schriit ist nur dann möglich, wenn die neue Platte größer als die alte ist! Nachdem Klonen der Festplatte habe ich dem System einen Reboot gegönnt (bei USB-Boot: Stick kurz herausziehen), bevor ich bei den einzelnen Platten unterschiedlich fortgefahren bin:

 

3.1 Datenplatte (eine Partition)

Hier habe ich die neue Platte zuerst mit parted geöffnet, um die GPT-Tabelle zu verschieben:

user@system:~$ sudo parted /dev/sdX print                          #/dev/sdX an neue Platte anpassen!!
Fehler: Die Sicherung der GPT-Tabelle ist nicht am Ende der Festplatte, wo sie
normalerweise sein sollte. Das kann bedeuten, dass ein anderes Betriebssystem
glaubt, die Festplatte sei kleiner. Soll das durch Verschieben der Sicherung zum
Ende (und löschen der alten Sicherung) korrigiert werden?
Fix/Ignorieren/Ignore/Abbrechen/Cancel? F
Warnung: Nicht der gesamte verfügbare Platz von /dev/sdb scheint verwendet. Sie
können die GPT reparieren, damit der gesamte Platz verwendet wird (zusätzlich
1953504000 Blöcke) oder Sie können mit den aktuellen Einstellungen fortfahren.
Fix/Ignorieren/Ignore? F
(...)

Die Fragen müssen zweimal mit F bestätigt werden. Nun konnte ich die Platte mit GParted (System → Systemverwaltung → GParted) öffnen und die Partition vergrößern. Fertig!

 

3.2 Systemplatte (zwei bzw. drei Partitionen)

Auch hier habe ich zuerst die Platte mit parted geöffnet:

user@system:~$ sudo parted /dev/sdX print                          #/dev/sdX an neue Platte anpassen!!                                           
(...)

Da diese Platte eine MBR Partitionstabelle hatte (die andere hatte eine GPT), musste hier die GPT-Tabelle nicht verschoben werden, dies kann bei dir natürlich anders sein! Anschließend habe ich die Platte wieder mit GParted (System → Systemverwaltung → GParted) geöffnet und die Partitionen analysiert.

  • /dev/sdb1 → logische Partition (Systempartition)
  • /dev/sdb2 → erweiterte Partition
  • /dev/sdb5 → logische Partition (Swap)

Nun musst du dafür sorgen, dass du die Systemparttion vergrößern kannst, dafür muss (in meinem Fall) die erweiterte Partition an das Ende der Platte verschoben werden. Hierfür gibt es natürlich mehrere Möglichkeiten. Ich erläutere dir mein (etwas umständliches) Vorgehen mit GParted:

  1. In GParted habe ich /dev/sdb5 gelöscht
  2. ....dann habe ich /dev/sdb2 ans Ende der Platte verschoben ("Anschließend freier Speicherplatz" auf 0 setzen)
  3. ....und darin wieder /dev/sdb5 angelegt.
  4. Zu guter Letzt /dev/sdb1 vergrößert und GParted die Anweisung zum Starten gegeben.
  5. Nun habe ich, weil ich in der fstab nicht unbedingt die UUID der Swap-Partition ändern wollte die alte Swap-Partition über die neue geschrieben:
    user@system:~$ sudo dd if=/dev/sda5 of=/dev/sdb5           #die alte Platte wurde hier als /dev/sda erkannt

Danach war die Platte geklont und vergrößert. Ich möchte nochmals darauf hinweisen, dass mein Vorgehen die Platte zu vergrößern, mit Sicherheit nicht das Beste war! Wenn du eine bessere Methode kennst, würde ich mir sehr über einen Kommentar freuen.

 

Fazit

Am Besten sorgt man dafür, dass man nie Festplatten klonen muss. Dies kann vor allem durch richtige Auswahl und Überwachung der Hardware vermieden werden. Hier zeigen sich auch wieder von Atom-Boards mit nur 2 S-ATA Steckplätzen. Also hier zu Boards mit mindestens 3 Slots greifen, so kann später der Speicher einfacher erweitert werden.

Wenn dann mal eine Festplatte geklont werden ist das Dank den Tools dd und GParted wirklich einfach, aber bei großen Speicherkapazitäten sehr Zeitaufwändig.

Dieser Musterablauf soll nur als Orientierung dienen und ist mit Sicherheit verbesserungswürdig. Wenn du der Meinung bist, hier stimme etwas nicht oder das Ganze ginge viel einfacher, dann hinterlasse doch bitte einen Kommentar.


          Rosemary's Baby        

Rosemary's Baby (Movie Review)

Director: Roman Polanski | Release Date: 1968

On the Web

Rosemary's Baby

director: 
Roman Polanski
Release Date: 
1968
9

I recently had the opportunity to attend a press re-screening of two of Roman Polanski’s most influential films. “Repulsion” and “Rosemary’s Baby” were the picks for the night to honor the work that Polanski has done in his career. I decided against writing a full blog post about the event and thought doing a review of “Rosemary’s Baby” would be more fitting. This cult classic has become a seminal horror icon and still holds up as a masterpiece of film. The pacing of events combined with the competency of each character is as subtle as the hellish baby bump growing on Rosemary’s tummy. Not only does it succeed in story telling but the score and cinematography stand stronger than most modern horror releases today. It was clear once the camera loomed over the Manhattan backdrop and the credits rolled that “Rosemary’s Baby” is still a tour de force.

The story is actually fairly simple. A couple, Rosemary Woodhouse (Mia Farrow) and her husband Guy (John Cassavetes), move into a newly vacant apartment at the famous Dakota in Manhattan. Wanting to start a family, they begin to try to conceive a child in the midst of Rosemary creating their ideal home and Guy shooting for any acting audition he can land. On days where Guy has to work, Rosemary gets to know some of the neighbors and tenants including a young woman living with an elderly couple; the Castevet’s. Sadly, one night the young woman is found dead on the sidewalk in front of the Dakota and police sign it off as a suicide. Rosemary extends her condolences to Minnie and Roman Castevet and a friendship is born between the young and old couples. Minnie becomes more interested and involved in Rosemary’s goal of having a child and even gives her good luck charms and teas to help the process. Guy grows closer with Roman to the point that he spends every night in the Castevet’s apartment talking business and the like. One night Rosemary is drugged by Guy and falls asleep against her desires. That night she dreams that someone, or something, is raping her while a group of cult leaders stand by in attention. The next morning she deduces it all as a dream but eventually learns that she is pregnant. Little does Rosemary know, but the involvement of everyone around her with the sudden pregnancy is more relevant than she first believed.

“Rosemary’s Baby” hits several strong notes throughout the film. The overall pacing and doling of information is given at a speed that is reminiscent of Hitchcock. Every frame that is shown is necessary without beating the audience over the head. This continually builds tension from the beginning to end which ultimately creates the horror of the film instead of several “jump scare” scenes. It’s masterfully depicted not only technically but through Rosemary’s character development; physically and symbolically. The joy and doubts that Rosemary experiences almost seem to grow each day, much like her physical stomach. The more information she learns about her pregnancy the worse her condition seems to become. The moment where it seems that she can’t take another day of suffering and accepts to take matters into her own hands, the pain suddenly subsides. Her emotional clarity seems to appease her physical ailments.

The score for the film is plain and simply fantastic. It remains subtle for a majority of the film but becomes more apparent during the more fantastical dream like scenes. Overall this supports the storytelling because as an audience we don’t know what is real and what is not. We want to believe that Rosemary really was raped during the night but the additional haunting score forces us to question how factual it all is. All of this, combined with the skill of the cinematography creates a mystery around the plot. Polanski chooses interesting “dream” scenes to depict. Most films go for the over the top images (see Rob Zombie’s “Halloween 2”) in dreams, but in “Rosemary’s Baby” every dream seems realistic. There are scenes of people just standing on a boat which then cut to Rosemary entering a room with a mattress. It blends realistic dreams with the narrative to ultimately cause doubt and mystery around what we’re actually seeing.

The film has its few flaws like any other picture. There are times where Mia Farrow’s acting seems confusing to how Rosemary would react which pulls the audience out of the film briefly. The ending is one of controversy and sadly causes some viewers to detest the entire film because of it. Overall though, “Rosemary’s Baby” is a required viewing not only for horror fans but film enthusiasts across the board. In a modern world of “the more gore the better” and “tongue in cheek cliche nods”, “Rosemary’s Baby” reminds audiences that a horror film can be horrific solely through its pacing and narrative.


          From Within        

From Within (Movie Review)

Director: Phedon PapaMichael | Release Date: 2008

On the Web

From Within

director: 
Phedon PapaMichael
Release Date: 
2008
7

A small southern town is plagued by a rash of suicides and no one can figure out the cause, despite the efforts of the local evangelical ministry in town that's investigating. The first suicide to kick off the pattern is the elder of two boys. Their mother has long been known to practice witchcraft, much to the chagrin of the local Christians. They distrusted her so much, that eventually they burn her at the stake. With Aidan being the last of the witch's family line all eyes turn to him when talk of someone to accuse for the plague starts up.

"From Within" is the surprise of the After Dark Film Fest so far as it doesn't sound like much of a movie from its plot summary. At first blush it seems like your typical teen angst against the church type of film but once you sit through the first act, it proves that there is a little bit more at work here. The witchcraft takes a back seat to the intrigue and small-minded towns folk as they begin to rally against what they perceive to be a common foe, and in that lies the intrigue that makes the movie interesting.

While the suicides are talked up as the bulk of the summary, they are in fact low key in the overall sense of things. While a movie relying on such acts as a key point would lead one to believe they would be quite gory sequences, they are in fact played down to make room for the storytelling. You do see blood, but it is minor. That is not to say that the deaths are unexciting however. Some are standard fare and some are nicely built scenes to make you cringe. A solid mix of both makes them worthwhile and interesting.

The core of "From Within" is a plot framework we've seen a million times over; a group bands together to put an end to what they see as evil. Said evil returns twenty years later and attacks their children. That is the essence of what is at play here. There is just enough added spice however to make the movie stand out from these tropes. Through out a good chunk of the film I spent my time guessing on what was actually going to come from this church plot. The crew does a good job of interweaving it just enough to make it intriguing. There are no blatant red herrings slapping you in the face to make sure you're paying attention, just subtle twists and turns to keep you guessing. Thankfully for director Papamichael, he had a decent enough cast to pull it off.

The biggest name of note involved with "From Within" has to be Thomas Dekker, star of the Fox Terminator show, "The Sarah Connor Chronicles". His name has graced horror headlines a few times as of late as he has professed his love of the genre many times. Here, he is not making a great stretch from his portrayal of John Connor; he is moody, angsty and dark. He isn't necessarily off-putting in his role of Aiden the witch-boy, nor even annoying. He is just simply there. Blending in with the scenery a large part of the time, he does not provide much excitement.

The other known quantity in the cast however does provide plenty of excitement; Adam Goldberg as the redneck soldier of God is great. A far cry from most of his roles, he is both sleazy and confounding in his statements and delivery and becomes the highlight of the flick. As the movie reaches its third act and we hear Goldberg's pronouncement of how he found God, he becomes downright unsettling.

"From Within" is a moody, slow burner that has some good intrigue and a decent plot. It's not going to make you jump however, and it's not going to make gag. What it will do is keep you engrossed and actively participating in the mystery as the plot unfolds. The movie could use a kick in the pants at times with a few slower scenes that take away from the overall flow, but it never leaves you wanting to hit stop on your remote.


          Laddaland        

Laddaland (Movie Review)

Director: Sopon Sukdapisit | Release Date: 2011

On the Web

Laddaland

director: 
Sopon Sukdapisit
Release Date: 
2011
1

The cover of “Laddaland” has the cliched picture of a long dark-haired ghost-girl, and even though this is a trope that has worn pretty thin for most people, I’ll admit it’s something I still really enjoy. For instance, last year saw the release of the umpteenth sequel to the Japanese version of the Grudge, “Juon White Ghost/ Black Ghost” and as many of those films as I’ve seen, the movie was still creepy, and I still really enjoyed it.

“Laddaland” unfortunately didn’t even meet my meager expectations for a knock-off of something that has already been done to death. I likely should have lowered my expectations when the US distributor was too lazy to change the title, “Laddaland,” which might be among the worst titles for a horror movie I’ve ever seen. I didn’t expect this movie to set the world on fire, but I also certainly didn’t expect it to be the worst movie I’d seen in over a year -- at least since I thought it was a good idea to subject myself to the misery of “Wrong Turn 4".

“Laddaland” is the name of a housing community where a man named Thee has bought a new home to prove to his mother-in-law that he can take care of her daughter and his family. Soon afterward a woman is murdered in their community and her house is said to be haunted. The ghost then shows up in the protagonist’s house and Thee confronts what looks like a child with a cheap plastic Halloween mask. This mask looked so bad I couldn’t even tell if this was actually supposed to be the ghost or a neighbor kid pulling a prank. Either way, ghost-kid hits Thee on the head with a bottle and runs away.

Things soon start going south for Thee and his family as the company he works for goes out of business and he is forced to take a job at a gas station. Thee’s wife then may or may not have started cheating on him with her old boss. Thee has several arguments with his daughter about her staying out past her bed-time, and on one occasion she goes to the haunted house with her friends and sees the ghost. She tells her father this is the reason she was out late, and he is furious with her and eventually drags her to the haunted house where she slips and falls on some glass. After this she is out of the movie for the next twenty minutes for no real reason, as the mother tells Thee that the daughter is “staying with a friend during the week, but will be back on the weekends. We don’t have a choice, because if she doesn’t she’ll have to go back to Bangkok with her grandmother.”

Thee also has several arguments with his neighbor about their cat pooping in his yard, and the neighbor’s son, who’s name is “Golf.” At one point Golf locks Thee’s son in a closet and when Thee finds out he rushes out to tell his neighbor that Golf is being a little prick. The next day the family finds out that the neighbor had shot and killed his whole family including himself several days prior, and that Thee and his family had actually been talking to ghosts for the last three days. Most of the rest of the movie involves Thee’s two kids getting lost, and then people running around looking for them while ghosts pop in and out randomly.

There are a lot of things that really irritated me about this movie and it’s hard to know where to start. I guess my first complaint is that the director treats the audience as if they are complete idiots. When he wants to show the family being happy he shows them all laughing and smiling with the biggest goofy smiles while playing the most ridiculous “happy” music possible. When he want you to know things are going bad for Thee, he has someone smash a mug with the Thee’s picture on it. These are only a few examples, but the director pretty much just hits you over the head, as hard as he can, with something incredibly obvious every time he wants you to know anything.

Secondly, there are parts of the movie that are still confusing despite how incredibly obvious the director is with everything else. Is there a ghost in Thee’s house? Is Thee’s wife cheating on him? I don’t really know, and I refuse to chalk any purposeful ambiguity in this movie up to possibly the least subtle director in the history of mankind.

Also this movie spends so much time on family drama that the horror elements seem to be a complete afterthought. “Laddaland” plays out like some kind of shitty made-for-TV family drama with ghosts sandwiched in at random places.

I’m going to go ahead and spoil the ending of this movie, but it is so awful I’m certain spoilers won’t even matter. The movie goes to some pretty dark places as Thee wanders around in his neighbor's house with a gun and accidentally shoots his own son who was hiding in a closet. At this point, I think having Thee shoot his son is the cheapest thing that the writer/director could have done to shock the audience. After Thee shoots the son we find out he isn’t dead, but Thee doesn’t realize it and then shoots himself, which is actually an even cheaper attempt to manipulate the audience.

What follows after that is by far the worst yet. The wife, daughter, and son drive home and the family has a nice heart-warming conversation where the mother tells the daughter she wanted to abort her before she was born but Thee wouldn’t let her because he loved the daughter so much. They all have a great big cry and think about what a great guy Thee was.

But the agony doesn’t stop there... After that there is a several minute montage of them all being one big happy family while Thee was still alive.

I honestly can’t think of a worse ending. Over the course of this movie Thee has a downward spiral like Jack Nicholson’s character in “The Shining.” By the end of that film the audience hates Nicholson’s character, just like the audience is disgusted by Thee by the end of this movie. Imagine if Kubrick, instead of showing Nicholson frozen in the snow, had ended “The Shining” by having Danny’s mom tell him how she’d originally wanted to have him aborted, but his dad wouldn’t let her because he was such a swell guy, and then they all cry and hug everything out and then have a five minute montage of them all holding hands and laughing and petting kittens.

I absolutely hated this movie. I’ll admit it might be a pretty funny movie to watch with a group of friends and make fun of, but I suffered through it alone so I couldn’t really say. My best advice is to never watch "Laddaland" under any circumstances.


          Uncle Boonmee Who Can Recall His Past Lives        

Uncle Boonmee Who Can Recall His Past Lives (Movie Review)

Director: Apichatpong Weerasethakul | Release Date: 2010

On the Web

Uncle Boonmee Who Can Recall His Past Lives

director: 
Apichatpong Weerasethakul
Release Date: 
2010
8

Today it seems that notions of distinct national cinemas are becoming increasingly difficult to argue for. I do not mean to say that particular narratives and cultural contexts are disappearing nor are they ceasing to inform particular film cultures. Rather, I am thinking more along the lines of how certain cinematic techniques for conveying information to us are becoming less divergent across filmmaking communities. Over generalizing blanket statements? Absolutely. But there is no denying that not only has the concept of nationhood undergone much rethinking but then there is also the simple matter of the pervasive access to films many have (though certainly not most). The prevalence of online streaming options, the ability to pirate films before they are even released, and other video technologies grants nearly any screen with internet access the potential for becoming a viewing device. The spread of not only narratives but also the formal ways in which films are shown to an audience are allowed an ever widening exposure to locales previously incapable of seeing films from across the globe thus informing a greater swatch of filmmakers. Uncle Boonmee Who Can Recall His Past Lives is a film that proves to be a fascinating platform from which questions of national identity, personal vision, and cinema as art connect. The latest from Thai director Apichatpong Weerasethakul, Uncle Boonmee’s framing narrative centers on the experience of its titular character slowly succumbing to kidney failure. Boonmee’s sister-in-law Jen and a younger relative named Tong accompany Boonmee back to his farm in the northern Thailand countryside.

 

One evening over dinner the three are joined by the ghost of Boonmee’s dead wife, Huay, and Boonmee’s estranged son Boonsong who has been transformed into a monkey spirit complete with total body fur and red glowing eyes. What follows are a serious of vignettes in which Boonmee ponders the reasons for his illness and thinks on the connections he has to various landmarks—sensory and physical—that he encounters around the farm and the surrounding countryside. We watch as flashbacks to seemingly unrelated stories are intercut with Boonmee’s home healthcare at the hands of Jen and his dead wife, ostensibly showing us the instinctual passed memories of his former lives as human, animal, and spirit. Uncle Boonmee is a sweetly tender and haunting film that resists any clear criticism. Rather than focusing on the interpersonal relationships of its characters, the film is more interested in creating a mesmerizing experience of cinema-time akin to some of Tarkovsky’s films (“Stalker” and “The Sacrifice” come to mind most clearly).

 

Admittedly I know as much about Thai history, culture, and Buddhism as I do Martian topography so I’m coming at this film from a completely outside perspective. But in a way not having a frame of reference for the film’s particulars seems somewhat non-essential in grasping the affects that Weerasethakul is going for (though such a frame would provide a more enriched experience). Throughout the film the characters speak to one another in a manner that neatly conveys whatever may be going on internally; flatly expressing their current psychological states. And while this at first seems overly severe and perhaps lazy, it becomes apparent that these acts are a declaration of clarity that only comes about through the very real presence of impending death or transformation in our lives. The film’s continuous use of long, locked down shots further accentuates this point. The camera becomes an instrument for conveying presence and personal awareness more so than a stylizing tool of sensation. Uncle Boonmee is also a film that feels catered for a certain kind of Euro-American “art” cinema crowd. With its long, languid shots, ponderous pacing, obsession over the nature of existence and the ethereal in the quotidian, one could argue that it is representative of a particular category of film that is consistently lauded by critics of Western-Euro film societies since the emergence of film festivals, schools and the first real “art cinema” movements of the 1950s. Indeed, the film won the Cannes Palm d’Or in 2010. It is also unsurprising that Weerasethakul studied film at the School of the Art Institute of Chicago. And while I appreciate Weerasethakul’s approach throughout most of the film, there are times in which he seems to be reaching into the bottom of the kitchen sink for material or stylistic choices. Some of which seem to come up short, not quite working in conjunction with the rest of the film.

 

For example, during the film’s “climax” (I use that term very loosely) the director presents us with a bizarre montage of still photography that at once seems to be a compliment to the voiceover but which also almost seems to be post production photos. While I have no problem with a film calling attention to its artificial nature, the gesture seems somewhat uncertain of itself, not entirely sure what it is trying to counterpoint in the accompanying voiceover or in the films thematics as a whole. What I do find particularly mesmerizing about this film is how we can also view it as kind of anti-western-horror film. Rather than mourning and violently resisting loss of individuality, mercurial transformations, and the unknown, Uncle Boonmee embraces these concepts and finds great comfort in transient identities.

 

When the film works, the images and tonal beats that Weerasethakul creates are some of the most affecting I’ve seen in a long while. It certainly is a film that sticks with and asks you some rather uneasy questions. But I also cannot help but feel that it panders too much to an art house crowd, aping some stylistic elements and tendencies that in other contexts might seem a touch trite and pretentious. That being said, Weerasethakul’s experiments with shot duration, physical space, and narrative time create a rich and bittersweet experience that is a uniquely divergent voice for those of us who are often told to be frightened of these transformations.


          Red Riding Hood        

Red Riding Hood (Movie Review)

Director: Catherine Hardwicke | Release Date: 2011

On the Web

Red Riding Hood

director: 
Catherine Hardwicke
Release Date: 
2011
4

Depending on how you look at these things, "Twilight" was either the best or the worst thing to ever happend to director Catherine Hardwicke. On the one hand, it's "Twilight," pretty much synonymous with printing money at this point. On the other hand, Hardwicke had built a career as a production designer on everything from "Brain Dead" and "Freaked" to "Tank Girl" and "Three Kings." She then helmed two decent indie hits in "Thirteen" and "Lords of Dogtown," before tackling "The Nativity Story," which flopped harder than anyone suspected post "Passion of the Christ." In short, Hardwicke cashed in that indie cred for a decent shot at a paycheck, only to have her chance at truly epic fame -- particularly in the rarified world of female Hollywood directors -- taken away and handed to the odious Chris Wietz.

Even three years out, Hardwicke has to be smarting, or at least should be. And now she has returned with "Red Riding Hood," a film that is only receiving coverage here because the loyal, loving readers of Bloody Good Horror so demanded it. Based loosely around the folk tale of Little Red Riding Hood, the film shows that at the very least Hardwicke can pull together a watchable film. Though it never moves into full fledged horror territory, "Riding Hood" flirts with just enough danger and spills just enough blood to qualify as an honorary member of the genre. It also succeeds rather admirably at following the essential mystery outline that helps justify a monster film. Sadly, all of this is trussed up with a tad too much soapy nonsense. Wayward glances, longing stares and over-dramatized familial strife tend to undermine tension no matter how well the rest of a film are executed.

The essential plot of "Red Riding Hood" follows Val (Amanda Seyfried), a young woman recently betrothed to a wealthy young man from around town who secretly yearns for the heart of a less-wealthy man. Disconnected from time and place, Val's village has been plucked straight out of a storybook, and lovingly so, by the filmmakers. The self-contained group of villagers appear self-sufficient and would go about their days without a care were it not for the pesky wolf who arrives every full moon. There has been a truce with the wolf for the last several years -- the villagers provide livestock to nom on, and the wolf leaves the townspeople alone. That truce is broken when Val's younger sister is killed.

This sets in motion much wistful yearning on the part of Val, who now must deal with her sister's death and the fact that she may have to marry a nice (but totally boring!) rich guy. The (poor) love of her life has never been so close, yet so far. They nearly run away together, but the wolf continue to intercede. And then Gary Oldman shows up with some soldiers to learn these townspeople a thing or two about wolf-killing. This brings us to the end of act one.

Though entirely accurate, all of this description probably does "Red Riding Hood" a disservice. It has, by nearly every measure, too much plot, too much angst, and too much yearning. But taken in the context of the film, most of this stuff at least makes sense. To be fair, Hardwicke does a decent enough job of crafting a whodunit around what Gary Oldman informs everyone is a werewolf. There are a handful of potential plausible culprits, but each is played off the other long enough to at least make the proceedings interesting.

At its core, "Red Riding Hood" really does feel like a fairy tale come to life. The flow has a sort of Disney-film logic, with mysticism and faith standing in for reasoned action. By not specifying a particular time and place, Hardwicke contributes to this feeling of being not wholly connected to reality. But there's no escaping the fact that the film is just soft at its core. Aside from some CGI'ed wolf attacks and implied violence, there's not much to make anyone over the age of 13 squirm in their seat. Had Hardwicke gone for something closer to an R-rating, the film probably could have been darker, bloodier, and certainly more interesting. Sadly, those decisions were likely made in the marketing meetings before any script was even greenlit.

For Hardwicke, the significance of "Red Riding Hood" is that it's not "Twilight." Though she doesn't do nearly enough to stamp "Riding Hood" as hers, the film no doubt has moments of flare and visual panache. If it hadn't been aimed squarely at the 10-17 age group, "Riding Hood" may have been something interesting. As it is, we can all take it as a cautionary tale about what happens when you allow your loyal fans to direct you into the woods without a map to grandmother's house.


          Comment on How to add a new hard disk or partition using UUID and ext4 filesystem by Jeremy        
Very clear, thanks!
          Comment on How to add a new hard disk or partition using UUID and ext4 filesystem by Jim        
I changed the name from disk2 to usbbackupdrive, but I have a problem where it says it can't find /usbbackupdrive/ in /etc/fstab
          Comment on How to add a new hard disk or partition using UUID and ext4 filesystem by Jirka        
Thanks! Works Great!
          Agregar un nuevo cliente        

Agregar un nuevo cliente

Respuesta a Agregar un nuevo cliente

Claro, crea todos los campos necesarios como GLOBALES en la tabla de Ventas, pon esos campos globales en el panel flotante, con un boton que sea 'Validar'. Ese boton ejecuta un guion que crea un registro en la tabla clientes y rellena los campos de clientes con los valores de los campos globales de ventas.

Otra opcion es crear una relacion por un UUID que te permita crear clientes a través de ella, de esa forma puedes ahorrate los campos globales y crear directamente el registro, ...

Publicado el 26 de Julio del 2017 por Jesus

          My Name is A by Anonymous        

My Name is A by Anonymous (Movie Review)

Director: Shane Ryan | Release Date: 2011

On the Web

My Name is A by Anonymous

director: 
Shane Ryan
Release Date: 
2011
4

“My Name is A by Anonymous” takes itself very seriously. And this “seriousness” is both the film’s curse and the best compliment I can give it. Directed and written by Shane Ryan, “My Name is A” presents an ere of sincerity and ambition that adeptly creates a keenly realized fragmented, lo-fi aesthetic in an effort to present a portrait of an angst ridden, troubled adolescent girl. And while Ryan creates some visually interesting moments these cannot help obscure the more glaring oversights and missteps we encounter.

Set over the course of three days in 2009, the film centers on Alyssa (Katie Marsh), a young adolescent girl who spends her days trolling around abandoned lots, teasing her younger brother, and making fun of her Sidekick best friend (Demi Baumann). Alyssa and the Sidekick call each other “fucking cunts”, talk about boys at school, film each other with a flip-video pointing imaginary guns at their heads, and cut each other with a small pairing knife in a bathtub. Simultaneously we are introduced to two other women. First there is an older adolescent Performer (Teona Dolnikova) who paints and sings while struggling with severe bouts of depression. Secondly we encounter a twenty-something woman (Alex Damiano, credited as Angst) who suffers from bulimia and what seems to be sexual abuse at the hands of her father. As the film aimlessly drifts through the days with these women, it slowly becomes apparent that the violence they inflict upon themselves and the violence inflicted upon them is beginning to manifest in outward aggression toward an innocent victim.

Look, everyone! It’s a cornucopia of sorrow!

“My Name is A” is perhaps best described as a series of fantasy episodes interspersed with fragments of everyday viciousness. Ryan alternates between self-shot flip-video footage and a loosely framed third person perspective watching each of the women sluggishly wading through their sadness (that’s right, there is sadness wading!). But as the film unfolds, we learn—in a rather extended revelation sequence—that the Sidekick, Performer, and Angst are all Alyssa. However, Ryan does not make it clear if these are characters created by Alyssa, if they are different personalities she wrestles with, or if they are stylized renditions of her the film is utilizing in order to give us a more complete view of who Alyssa is as a character. The conceit has the flavor of being a twist for the sake of having a twist. We gain little by knowing that these characters are really one yet the film presents this information to us as though it is earth shattering, seemingly to rely on its presentation to be enough to keep us from thinking too much about what it means. This technique simply reveals more questions that might be interesting to explore and then shuts the door on them.

The film seems content to undermine any potential it may have had for discussing more interesting questions concerning Allyssa’s motivations and themes of gender violence. Ryan doesn’t seem to have any further insight into whom this girl is or why she might be influenced to make the decisions she does. When some access to interior desires is provided it quickly becomes apparent that the flip-video devices were put in the actress’s hands and they were told to be manic, sad, or angry. Ryan lets too much of the film’s responsibility lay on Marsh’s shoulders and while the actress does have a fierce presence she lacks the kind of improvisational chops the film calls for her to have. The same can be said for Dolnikova, Damiano, and Baumann. All three of these women have some bravery in them but unfortunately it is left misdirected; spilling out in awkward, cliché rants. There are a good number of scenes that require Marsh and the other actresses to play with the idea of depression or masochism. But these scenes usually result in incomprehensible ramblings in which every swear word in the preverbal shock-language book are thrown at “God” or society in general. It’s a technique that smacks of student film projects that mistake sincere severity for quality.

Along with a handful of some rather beautiful moments, the film also exhibits an interesting, slightly absurdist use of musical accompaniment. The music cues throughout the film run the gamut of being appropriately atmospheric and moody to just completely silly and off-putting. And while this may be due to the fact the music department listed in the credits is larger than the production crew, there is a manic kind of tension between the images and sound that I usually find pretty bland and overdone. Need something to be “creepy”? Put a pop song over it! (Think of the Portlandia “Put A Bird On It” sketch except with music). But in the case of “My Name is A” the music functions quite well with the images we see or nicely counterpoints particular character actions.

As previously mentioned, for much of the running time we watch as Alyssa, the Performer, the Sidekick, and Angst enact moments of self-mutilation and pain with little to no investigation into this behavior or the potential social forces that may be causing it (this doesn’t even begin to touch the fact all these women are white, seem not to work, and are middle-class but who’s counting, right?). These are moments presented to us for no other means than to shock; a technique I have no problem with and can certainly appreciate. And at times I can almost get behind the film as a straight up grief/depression exploitation picture. A kind of Lifetime movie-of-the-week for the B picture crowd. And given a brief look at Ryan’s filmography it is entirely possible that is what the director is going for. Indeed, there is something to be said about depicting such manic, self-destructive behavior in its immediate translation of the self-shot footage. However, it is Ryan’s forced and misguided attempts at profundity that grind the film to a halt and make a rather dull and cumbersome end product.


          The Lords of Salem        

The Lords of Salem (Movie Review)

Director: Rob Zombie | Release Date: 2013

On the Web

The Lords of Salem

director: 
Rob Zombie
Release Date: 
2013
3

Give Rob Zombie some credit, he tries so hard in “The Lords of Salem.” He tries to step outside of the comfortable stereotypes that were a big part of his previous films, and he wants you to see all the influences he’s pulling from--Polanski and Kubrick, among others. We know he’s done his homework as a filmmaker, but along the way he forgot to put it all together into a cohesive storyline. As a result, “The Lords of Salem” is a colorful and interesting film, but ultimately an unsuccessful one.

Let’s see if I can piece together the “plot” of this film. Sheri Moon Zombie (who pulls off a decent if not great performance here) plays Heidi, a former heroin addict and disc jockey for a rock radio station in Salem, MA. One night, she plays a piece by an unknown group, The Lords. The song seems to hypnotize all the women in town who are descendents of the original colonial village population (at least I think that’s what happened, we just see a few women staring lustily at their radios).

Up until this point, Zombie had an effective story and it seemed like “The Lords of Salem” would be an interesting little horror movie. But then the film then seems to forget all about the other women in the city, and concentrates solely on Heidi. She is haunted by visions (of demons and goats) and flashbacks of an early coven of Salem witches. She comes into contact with three older witches who ham it up the best they can. And then there’s Bruce Davison who plays an author of a book on Salem witchcraft and tries to unravel the mystery of the mysterious song. It all culminates in an ending that just leaves you shaking your head in confusion.

To be fair, some of the horrific images Zombies litters the film with are very effective (particularly the flashbacks with the witches performing their ceremonies and them getting burned at the stake), and if you love gore there's plenty to go around here. But other images are downright laughable (including a little demon who I thought would start twirling his umbilical cord and singing “Prom Night Dumpster Baby”). And even with the interesting imagery, you get the feeling Zombie was ticking off a checklist of his favorite horror scenes: Title cards showing the passing of time day by day (one section is “Monday” one is “Tuesday)? Check. Static shots on long hallways and weird things coming out of doors? Check. Naked old women writhing around? Check (be warned, there are a LOT of naked old women in this “The Lords of Salem”).

You get the idea. If only Zombie had spent more time on plot and story, and less on imagery, he may have had something with “The Lords of Salem.” But he can’t seem to stay away from the influences and wants to cram every scene with an homage to some classic horror film. We get it sir, you’re a fan of film. Good job trying to make something original. But ultimately it’s just not very good.


          Comment on VirtualBox – Cannot Register the Hard Drive Because a Hard Drive with UUID Already Exists by Ramon Sanchez        
Works Great
          Dump UUID and LABEL Info For Mounted Partitions        
While a good backup plan is a must, one thing I just caught myself doing is running those backup without storing the filesystem label or UUID. Normally, this really doesn’t matter as the minor convenience of not having to change /etc/fstab wouldn’t be worth the hassle. However, in the case of system partitions, this can […]
          Saw VI        

Saw VI (Movie Review)

Director: Kevin Greutert | Release Date: 2009

On the Web

Saw VI

director: 
Kevin Greutert
Release Date: 
2009
3

"If it's Halloween, it must be 'Saw.'" That's what the commercials have been trumpeting. And being as this is the sixth straight fall to play host to a "Saw" release, it's hard to argue with the facts. That message's recipients, however, will likely be sharply divided on its intentions: celebratory rallying cry or menacing threat of inevitability.

As with many horror icons before him, Jigsaw, the "Saw" films' scolding central figure, simply will not stay dead. But unlike his compatriots in terror, Jigsaw's immortality is purely theoretical -- he lives on in his ideas, in the hearts of those whose lives he's touched. In the beginning, the moral center of the "Saw" films gave them a bite that felt vital. Now though, with six films in the bag, it's more obvious than ever that any innovative juice the series once had has been wrung out. Frighteningly, what seems to have replaced it here is a broad populism with its vitriol aimed squarely at society's most heinous boogymen. Could Jigsaw be the anti-hero to unite an oppressed and mistreated populace?

John Kramer -- aka Jigsaw -- fancies himself a giver of life. By showing his victims its true value, he allows them to lead a more complete existence. That veneer of a moral center had begun to fade in earlier "Saw" films, but here it's as if it never existed at all. In the absence of the idealistic founder, Agent Hoffman, the heir revealed in "Saw V" and Jill, John's wife, set the wheels to a new "game" in motion by tracking down and trapping six individuals chosen by John before his death for "attitude adjustments." One of these targets is then made the focus, as he must wend his way through a labyrinthine, decaying building en route to his "salvation."

The "Saw" films have come to represent a mini genre cycle all their own. The first established a pattern that, while stretched in subsequent films, remains wholly intact here. As with any other genre film, that pattern is a strong part of the draw for fans and constitutes a great deal of their enjoyment of the "Saw" experience. In "Saw VI," the filmmakers have gone a step further in their effort to appeal to a wide audience by making Jigsaw's targets comically stereotypical villains ripped directly from today's headlines. The opening sequence features two mortgage brokers, responsible, Jigsaw informs viewers, of making predatory loans. Now it is they who must compete against one another to see who can cut off the biggest hunk of flesh. You can probably imagine what happens to the loser.

These two evil mortgage writers give way to a target so vile, so contemptuous, so devoid of human goodness it's a wonder Jigsaw gives him any chance of survival at all. This beast is, of course, an insurance company executive. This businessman makes his living by deciding who lives and who dies, so it only makes sense that Jigsaw forces him to make more life and death choices, only this time under extreme emotional duress. Like the caricatured mortgage officers before him, this executive is so one-sidedly drawn, an uninformed viewer would have to be forgiven for mistaking him for an outright criminal. After all his posturing and lecturing about the evils of health insurance, it's a surprise Jigsaw doesn't track down other present day monsters: the gutless politician or spineless investment banker or even the heartless quant, fresh off developing some fancy new -- and evil -- financial instrument.

Audiences will be expected to hoot and hollar as "Saw VI" revels in making the smarmy insurer suffer, but where in previous films Jigsaw's moral absolutism focused primarily on saving (or maiming) the troubled, here he's all about punishment. The insurer, having cut John off from potentially life saving (and incredibly expensive) treatment, is the key focus, but unlike in the past, there are many seemingly innocent people who must pay the price to be part of this game. Several times Jigsaw makes use of innocent or at worst tangentially guilty people from the insurer's life and business to send his message to the executive. The irony is that in making this powerful man pay, it's the little people Jigsaw seemingly cares about who end up on the losing side of the game -- a janitor, a young college grad, a lawyer. Well, the last one probably deserved it...

These wholly innocent bystanders are merely one symptom of a series that has officially lost its way. The arcane, overwrought plotting that had been a staple of "Saw," here feels far more forced. What twists do remain are incredibly telegraphed. And as with "V," the story has begun to cannibalize itself to the point of satire. Flashbacks fill in the necessary details, but in such broad strokes that what emotion may have once existed around Jigsaw and these characters' motivations now is but a whiff.

It's Halloween, and that means it's "Saw," but that apparently does not mean that one should expect much entertainment. The "Saw" films have been as lucrative as any horror franchise in history, and here the clear intention was to go for maximum profit. Fans of the series -- of which there were many in this reviewer's theater -- should leave feeling satisfied; doubly so if they've recently been denied coverage for healthcare. But it's also impossible to leave without wondering where and when the "Saw" films might begin to move into the next phase in their genre progression. Perhaps the third dimension will finally move things along, or maybe change will come from outside the series (the recent "Law Abiding Citizen" may be a fresh addition). To be sure, "Saw VI" was not the turning point it may have been, and in fact, with its thinly veiled -- and wholly unnecessary -- foray into the political, it might be the most cynical of the lot.


          Comment on A default avatar could make you look like a copybotter by Fred Beckhusen        
One of the reasons I believe Gemini is totally speaking the truth is that she had to first enable HG in Diva Distro, which is not easy, and use MYSQL twice to change the name, and then, hypothetically, copy bot something. It is much easier to paste any UUID (UUIDS are not secrets) in the console on any HG-enabled grid (Dreamworld, Diva, SOAS modified for HG, Opensim standalone HG, or any Full HG grid), and the original person and UUID on any OTHER grid is the person blamed for it.
          Comment on A default avatar could make you look like a copybotter by Arielle        
David points at the Diva Distro install as having default avatars which as far as I can tell, it DOES NOT. Diva distro only has a default WiFi admin account and nothing in her documentations says anything about a default login account. If it did, the same issue would exist for a lot of standalones and grids including Outworldz. The problem is that Ener Hax setup a default Grid account in her SOAS distro to make it easier for people to log in initially on her Standalone, non-hypergrid enabled distribution and it was the community that figured out how to convert it to enable hypergrid mode which leads to the problem. It was at that point people should have created a new account to hypergrid around with instead of using the default Simona Stick account it came with. I just spent a half hour trying to duplicate how to change the name of that default account without coming to a solution as I don't see the configuration for that account in any ini files. From that I would have to assume it is a very small minority who actually accomplished it and if they were smart enough to figure how to, should have realized it would lead to problems. Opensim for the past 5 years or so will not allow an avatar account with the same UUID to jump to a grid that has an account with the same UUID. This issue as far as i can tell is limited to those who used an SOAS distro and then configured it to enable hypergrid and used the default account to jump around to those grids that didn't already have an account with that UUID. The fix should involve no more then sorting out the account with that identification. Another Tempest in a teapot. :eyeroll:
          John Dies at the End        

John Dies at the End (Movie Review)

Director: Don Coscarelli | Release Date: 2012

On the Web

John Dies at the End

director: 
Don Coscarelli
Release Date: 
2012
6

Since 2004’s Shaun of the Dead the horror-comedy appears to have been going through a bit of a resurgence. Between 2006 and 2010 there were a little more than 40 horror comedies of varying financial pedigrees released. Last year we saw approximately 7 major horror-comedy releases. Cabin in the Woods is even seeing a decent amount of award buzz and critical acclaim; extremely rare for a film so steeped in genre material. This year is none less the richer with Warm Bodies releasing in February and the much-anticipated Don Conscarelli flick John Dies at the End beginning its theatrical run at the end of the month. Characteristic in most of these films is there emphasis on generic convention play and meta-narratives with a touch of ironic wit and social satire. This is not to say such self-effacing, reflexive humor has been absent in the past but the frequency with which these films are being released is indicative of a growing horror audience more literate in conventions. And while John Dies at the End trades in these qualities to varying degrees it also makes attempts at creating a satisfying mythology all its own.

Dave (Chase Williamson) is a twenty-something slacker who doesn’t hold a job and seems to spend most of his time watching infomercials, sleeping on his couch, or hanging with best friend John (Rob Mayes)…who we are told will die at the end of the movie. John, being the loveable scamp he is, likes partying, girls, and drugs. But John’s wonton hedonism catches up with him in a fierce way when after dosing a new drug called “Soy Sauce” he begins to see ghosts, demons, and other dimensions. Not to mention he can move outside space and time. After Dave accidentally exposes himself to the drug, he begins to share John’s visions, unveiling a heinous plot hatched by some type of monster-computer in another universe…and maybe some aliens (I’m honestly not quite sure). Oh yea, Paul Giamatti’s here as reporter Arnie, Doug Jones plays an inter-dimensional slug-keeper, and Clancy Brown has a turn as an Eastern European pop exorcist.

John Dies at the End has been a bit of a geeky cult albatross for nigh on three years. Originally the property was an increasingly popular 2001 comic-horror internet publication turned book by David Wong about the paranormal exploits of the aforementioned friends. Don Conscarelli, having become a fan of the material, had attached himself to a film adaptation in 2007. Seeing as how this would be Conscarelli’s first feature foray since 2002’s Bubba Ho-Tep anticipation for the loyalists out there was peaked. Also doesn’t hurt when your cast is rounded out with a peppering of “that guys”. Filming quietly began in 2010 while nuggets of publicity would occasionally filter through the ether. The film eventually had it’s premiere at the 2012 Sundance Film Festival and now is making its way to theaters for a January release this year.

So does Conscarelli’s return to features a decade later live up to expectations? Perhaps unsurprisingly it’s a yes-and-no answer. John Dies at the End certainly has a style about it that is a shade more polished than Bubba Ho-Tep. The film moves at a brisk pace, balancing its more wild set pieces nicely with enough jokes that work. Conscarelli and Wong have an adept sense of how to coax humor from their character reactions. Fans of Conscarelli’s oeuvre will probably notice a few of the director’s trademark gags. (Seriously though, nothing comes close to the campy hysteria of an actor convincingly fighting something that they are clearly holding on themselves). And at a point in geekdom when the threat of a Ghostbusters 3 has been looming for several years it is refreshing to see a narrative that borrows from the concept while adding enough of its own personality, making the Ghostbusters seem like Navy Seals by comparison.

But despite all this manic, whack job, irreverent energy the film lacks a consistent narrative thread that we are capable of holding on to. When an actual threat or clear obstacle is introduced to John and Dave it comes in the form of information dump Soy trips. The way we are placed inside and outside Soy trips becomes tiresome as they often allude to events that bear no real weight on the overarching narrative. While the flashy renderings of trips through space-time make for some kinetic imagery they also tend to negate the necessity of explaining a majority of Dave’s motivations. This is particularly evident in the frame narrative in which Dave is attempting to break the story of the “Sauce” to reporter Arnie. Why is Dave talking to Arnie? We are given one throwaway line in which Dave states he just wants his story out. Fine. But the inconsistency with which the frame story is utilized and the end it meets seems awkwardly fruitless. And while I don’t believe every horror film needs to make itself an allegory some sort of greater metaphor is noticeable absent from the film.

There’s a brief prologue that acts as a distillation of the highs and lows of John Dies at the End . We watch as Dave decapitates a neo-nazi zombie and space slug with a small axe, having to repair both the blade and hilt following each respective skirmish. Neo-Nazi Zombie returns from the grave once more stating, “That’s the axe that slayed me!”. We then hear Dave’s voice over asking “Is he right?”. The sequence seems meant to insert some sort of rumination on quintessence, a theme that certainly manifests in the film but to little effect. When considering this sequence and much of the film I was reminded of a number of other contemporary films. In particular the influence of Edgar Wright & Company (also Reuben Fleischer’s Zombieland) seems to inform much of Coscarelli’s aesthetic choices here. Granted the man made Bubba Ho-Tep. (And the Phantasm series, etc). However, the film has a show-reel identity. It knows the moments, the camera moves, and editing tricks but it starts to ring hollow, having little in the way of conflict or development to keep us intrigued. Despite all this, what John Dies at the End may lack in the way of careful plotting and interesting characters it manages to excel with a respectable amount of crudely effective jokes, slapstick, and some originality.


          Hollow        

Hollow (Movie Review)

Director: Michael Axelgaard | Release Date: 2011

On the Web

Hollow

director: 
Michael Axelgaard
Release Date: 
2011
3

Certain films succeed almost entirely because of plot devices, singular performances, concepts, or settings. Others fail because of one missing piece to that same puzzle. Unfortunately in the case of "Hollow", it fails despite having a setting so engrossing that it distracts you of the film's pitfalls for nearly three quarters of the film.

We view the film from the perspective of James (Sam Stockman), for the most part, and are witness to his slow descent into madness. He ardently attempts to woo Emma (Emily Plumtree) back into his arms through his insidious inclusion of Lynne (Jessica Ellerby) on the trip to seduce Emma's fiance Scott (Matt Stokoe). The 'friends' are on holiday in the remote village of Dunwich, England. These friends have a checkered past together and soon realize that belief in a myth can quickly materialize into reality as old tensions begin to consume them. Emma & Scott are hoping to enjoy a vacation before they take their wedding vows. While James & Lynne seem to be holding out hope their former flames will reciprocate their unrequited love. The week escalates as Emma dives into the town's gruesome history of young lovers committing suicide together by hanging themselves in a gigantic ominous tree.

James' manipulative scheme and mental breakdown are the driving force of the action; but the star of the show in "Hollow" is the setting. The village of Dunwich in Suffolk, England provides a wonderful backdrop to stage a mysterious horror film. An old mansion, classical gothic church, menacing cliffs, misty graveyard, destroyed castle and the omnipresent tree add more production value than the film deserves. A good comparison is the film "Hot Fuzz" with its gothic architecture and dilapidated castle. These settings give "Hollow" a scale and sense of wonderment that it unfortunately fails to capitalize on. In fact they drop the ball so much the final act occurs literally inside an SUV; palpable anger replaces any sense of awe previously felt.

The performances here are one thing that can't be wholly condemned. Emma, while annoying, comes across as earnest and caring towards her boyfriend Scott and his obvious past indiscretions. While Scott and Lynne have wonderful chemistry that create a seemingly inescapable love triangle. James is relegated to the background, but only by his own choice. His machinations to win the heart of Emma are reasonably thought out, but completely misguided. Once things begin to go south, his previously mentioned psychosis takes over.

The narrative doesn't do the performers any favors though. It's weak and poorly structured. Too often are there sequences where a character's motivation for an action are completely unprovoked and against the nature previously established. This could be traced back to the evil presence in the town of course, but exposition scenes involving the history or curse are mishandled and uninformative. Couple these with a finale that was so clearly written backwards to get to a 'single image' and it grinds the film to a blistering halt just as it should be ramping up.

The average performances, loose concept of plot, and terrible pacing lead this movie into a complete train wreck. This location needs to be mined again for a better horror film, and showcased in all its malevolent glory.


          The Wicker Tree        

The Wicker Tree (Movie Review)

Director: Robin Hardy | Release Date: 2010

On the Web

The Wicker Tree

director: 
Robin Hardy
Release Date: 
2010
1

Let’s start this off by saying I’m not going to spend a lot of time comparing Robin Hardy’s 1973 “The Wicker Man” with his latest film “The Wicker Tree”. Surely enough people out there have grouped “The Wicker Man” amongst films such as “Rosemary’s Baby”, “Don’t Look Now”, and many others as a paramount example of prestige horror. It’s a movie that many genre fans and critics point to as an “excuse” for genre films or to show horror detractors that, yes; these movies are worth their salt. But this isn’t a review of comparing this unofficial/spiritual “sequel” to its noteworthy ancestor. Indeed, even Hardy and other filmmakers/talent are more inclined to see the film as having a narrative that inhabits the same space as the first film but without a direct connections.

So what can I say about a film that sits so tiny in the looming shadow of something as large as what “The Wicker Man’s” legacy has become? “The Wicker Tree” is a huge misstep that seems to have zero interest in taking any chances with its themes, narrative, or stylistic execution. This is an utterly safe, boring, sterile movie that pretends to be prodding at some potentially interesting, racy concepts but has no idea what to do with them. Its characterizations are flat and vague. The suspense-building strategies here are flaccid and hardly ever lead to a satisfying payoff. The film is completely void of any sense of mystery or awe, which is remarkable given its heritage and subject matter. It becomes apparent while viewing that the filmmakers involved are very much riding the wave of the “The Wicker Man”, hoping an audience will bring enough of a memory of that film with it in order to fill out a starkly barebones film. “The Wicker Tree” has so little of a personality or identity of its own that while it unfolds it becomes nearly impossible to see it as anything but an outdated, awkward attempt at recapturing the glory days of its predecessor.

Based on Hardy’s 2006 novel “Cowboys for Christ”, “The Wicker Tree” centers on an unfortunately named pop country superstar Beth Boothby (Brittania Nicol) and her fiancé Steve (Henry Garrett) as they embark on an evangelical mission to the farthest-reaching corners of the sinful, non-Christian world in order to convert those heathens to the original Good-Ole-Boy, JC. But rather than installing Beth and Steve in some secluded corner of the globe, they are sent to the Valhalla of degradation: Scotland. Here Beth’s stardom brings the added bonus of televised declarations of faith. This of course doesn’t come without a price as some of Beth’s more salacious earlier media appearances come back to haunt her in some rather hilarious ways. After being shunned and made into a media pariah in Glasgow, Steve and Beth are invited by a wealthy landowner and nuclear power-plant manager Sir Lachlan Morrison (Graham McTavish) to stay in the small hamlet of Tressock. Together Sir Lachlan and his wife Morag (Keira McMillan) welcome the visitors into their openly pagan community that has been suffering from infertility for years. (Oh, yea, and they worship the goddess Sullis who “doesn’t suffer fools”. Ironic touch? I had trouble finding any evidence). The townspeople at first embrace Beth and Steve with a kind of curiosity one reserves for a TV documentary. But of course things don’t go quite as planned as sexual temptation begins to work its way into the couples’ thoughts and the seemingly kind veneer gives way to something more sinister.
As previously mentioned “The Wicker Tree” completely lacks any sort of mystery, suspense, and intrigue. From nearly the moment Beth and Steve land in Scotland we know exactly where they will end up. And I’m not just saying this as a snarky “I’ve seen too many movies” Kenny from “Scream” kind of way. As we watch Beth singing Christian hymns in a chapel we also see two other character flatly state their plans for them. And while there is the possibility the ruse will be found out it becomes apparent very early on that neither Steve nor Beth are skeptical of their situation. Steve even breaks his commitment of celibacy in no time flat after a single, tame flirtatious exchange. (Oh, and some boobs. Those boys just can’t keep it in their pants).

Where “The Wicker Tree” faults the most, however, are in its attempts at making some kind of critical statement on capitalism, religion, American imperialism, and sacrificial violence. Typically I don’t have any misgivings about characters making poor decisions as long as it serves a particular narrative thread or generic trend. This is where I feel suspension of disbelief for genre fans is extremely flexible. But the sheer naiveté and ignorance displayed by both Beth and Steve is exhausting, preventing us from seeing the two of them as full-fledged characters in any way. Their aw-shucks demeanor whittles away at our patience until the two of them become nearly intolerable. Beth and Steve slowly deteriorate into silly caricatures of American life that an angsty teenager might have written after seeing “American Beauty” one too many times. If we are actually supposed to take Steve and Beth’s open acceptance of Tressock as plain stupidity, the film then becomes even more aggravating in its flippant, shallow finger pointing.

I have to admit that I may fully well be missing the joke here. It is totally possible that the sophisticated humor and deep satire in watching Scots line-dance just goes way over my head. There truly are a few fairly funny, dark camp moments but you get the sense no one on set knew where the joke began and where it ends. The complete disregard for narrative propulsion and awkward editing just destroys the film. “The Wicker Tree” is about 15 years too late to be relevant and its boggish pacing, uninteresting characterizations, complete disregard or interest in further exploring themes of sacrificial violence make this one of the least satisfying films out there.


          Kill List        

Kill List (Movie Review)

Director: Ben Wheatley | Release Date: 2011

On the Web

Kill List

director: 
Ben Wheatley
Release Date: 
2011
8

"Kill List" opens on a small dinner party. Jay and Gal, two average looking English blokes, eat a lovely meal prepared by Jay's wife. Gal has a new lady friend by his side. The friends laugh and, by all appearances, enjoy a happy night. Slowly but surely, marital tension begins to seep out of the glances between Jay and wife Shel. The creep of caustic remarks mixes with a healthy flow of alcohol before eventually erupting into a full-bore domestic incident. Gal, obviously familiar with this scene, acts quickly to settle his friends' young son, and to defuse the near-violent exchange.

Eventually, the proceedings settle down and the rest of the film proceeds apace, but by then, director Ben Wheatley has left viewers with a strong warning shot: things around here may get hairy. The more we learn about Jay and Gal, the more everything falls into place. The two grizzled, working-class type gents are in killers for hire. They've been off for a while, having recently completed a job that may or may not have gone well. Intentionally obscure and off-handed references to "Kiev" clue us in that this was not the type of thing that these hitmen would want to list on their resume.

The duo's boredom -- tinged with PTSD-esque trauma -- gives way to another job, one which neither of them is too keen to take. Details are slim; the client is shady. But out of need to do anything, they take the case.

What begins to unfold borders on the insane. Having clearly studied up on some of David Lynch's more commercial moments, Ben Wheatley walks his killers through several sequences of increasingly bizarre encounters. Jay, the more central character of the killing duo, manages to posses both the more sensitive demeanor as well as the more sadistic streak. He's the family man with a wounded psyche. As they dig into their assignment -- a 3 person hit-list -- these psychic wounds begin to openly bleed onto the screen.

When the killers discover that one of their targets has involvement with a grotesque child pornography ring, Jay goes off the deep end -- no wait, that's not strong enough -- Jay steps into an abyss of vindictive despair. He becomes a broken-down avenging angel who can very happily operate at the borders of humanity. In the realm of hired killing though, this type of behavior cannot stand, and Jay's behavior endangers not only their operation, but the pair's freedom and lives.

By the time they reach the third of their targets, "Kill List" has arrived at a uniquely dark place. Wheatley has so deftly and so slowly navigated the audience there that it almost comes as a surprise when the film takes on the tropes of several different horror sub-genres. The pacing and execution are so flawless that the dive into Jay's, and to a lesser extent, Gal's madnesses becomes the audiences' own dive into the darkness.

In many ways, "Kill List" embodies some uniquely British concerns and paranoias. The setting and language place the film very distinctly in the depressed economic areas outside the major metropolitan centers. But the central, existential questions that unravel as the film draws near its conclusion are the type familiar throughout horror. "Kill List" succeeds by finding that blend of human drama, tense action and quiet desperation that manage to haunt more than they scare. Like his influences, Lynch and even Robin Hardy's "Wicker Man", Wheatley understands that under-explaining the truly mysterious elements of our nightmares only serves to imbue them with more power to terrify.


          Circus of Horrors        

Circus of Horrors (Movie Review)

Director: Sidney Hayers | Release Date: 1960

On the Web

Circus of Horrors

director: 
Sidney Hayers
Release Date: 
1960
8

The close kinship between circuses and horror fiction has been well documented. Tom Browning’s early silent films articulate this relationship quite beautifully. The physical act of viewing segmented attractions and being moved by what the viewer is witnessing is certainly an apt comparison to the act of early movie watching. The cinema of Meilies, the Lumière Brothers, Alice Guy, or Thomas Edison have perhaps more in common with this form of artistry. And indeed, early film exhibition found its earliest home in vaudeville shows. The short durations of these films and the novel technological innovation of moving images made them ripe for multi-film programs strung together much like a circus. The modernist sensibilities of these films made up what film theorist/historian Tom Gunning has called the “cinema of attractions;” a movie going experience that emphasized both the illusory aspects of the technology, the knowledge of the film as a novel fiction, and also the ability of this fictional representation of the world to make us “believe” in them enough to react. This isn’t to say that semblances of narrative were completely absent from these films; but rather, that narrative was the frame that held together the spectacle.

“Circus of Horrors” is a film that speaks to this tradition in a feverishly clear and manic voice. It is a film that wallows in the sensational aspects of its setting. Which isn’t to say the film lacks a narrative, but it is their only marginally, providing the bullet points or sign posts for the audience and the characters on screen to get to where they need to be. Normally this type of thin logic would be laughable and hackneyed—and “Circus of Horrors” does fall victim to this from time to time—but the sheer rapturous delight it takes in showing the circus acts, moments of tense action, and sexuality harkens to this instinctual memory of what it most have been like to see a film as a “pure” attraction.

Directed by Sidney Hayers, “Circus of Horrors” begins in 1947 Britain. The film opens as a brilliant but unethical plastic surgeon flees the countryside following the accidental disfigurement of a patient. Now a fugitive, the surgeon assumes the new identity of Dr. Bernard Schuler (Anton Diffring) and escapes to France with his associates, Angela (Jane Hylton) and her brother Martin (Kenneth Griffith). The group happens upon a young girl whose father (Donald Pleasence, oh yea!) operates a failing circus. The girl’s face has been scarred in a German bombing of her school during the war and Schuler offers to repair it in exchange for part ownership of the circus. The operation is successful and following a freak accident resulting in the father’s death, Schuler becomes the sole proprietor of the circus. He embraces the role, using the cover as an opportunity to continue his experiments on the faces of criminals, turning them into beautiful specimens and blackmailing them into becoming performers. However, when more and more accidental deaths begin to pile up, the circus comes under the suspicion of the authorities and Schuler risks unveiling his past.

If this all sounds a little more than convoluted it’s probably because it is. There are a number of high melodramatic moments in which characters reveal desires or schemes that seem to just spring out from their subconscious. In particular, Schuler’s companions Angela and Martin are hopelessly tethered to the man. Angela cannot help but love him though his sexual promiscuity with the circus performers is quite apparent and to her chagrin. Martin continually expresses his angst and distaste for his role as Schuler’s assassin but continues to murder performers who may cause trouble. The final act of the film is particularly rife with moments like this. Characters who have met merely a few scenes prior are seen rolled up in each other’s arms, promising companionship and making out in that old school “face-smash” style of kissing that I hope no one ever really did. In a way moments like these have an existential quality in the sense that these people are hopelessly compelled to act but have no true focus other than what is immediately in front of them. There are scenes that seem like they could have been pulled from an Antonioni film if they weren’t saturated with screaming color and shrieking violence.

But as “Circus of Horrors” unfolds, the film’s concern for narrative causality becomes increasing absent. The film is less concerned with exploring particular character psychologies or narrative tropes than it is with exploring the sensationalist qualities of human emotion and our experience of watching bodies perform actions that would normal force emotional responses. The camera pushes in, pulls out, or cuts to close-ups of screaming, laughing, crying faces while also lingering at a distance as we watch acrobats and knife throwers in action. It is in the moments of spectacle, intratextually within the film and for the audience, that the experience of watching spectacle is foregrounded; like a wild kaleidoscope of bodies and colors twirling into a climax. This theme is presented not only in the physical feats of the acrobats but also in the “Hall of Beauty” circus stage in which various scenes from famous literature and myth are reconstructed as still lives, Schuler’s remodeled criminals standing in for Helen of Troy or Adam and Eve. In a way, Schuler’s ability to sculpt and create more perfect versions of these individuals is analogous to the act of filmmaking which frames our experience of watching the unflinching ability of the circus performers, Schuler’s violent actions, and sex.


          The Shuttered Room        

The Shuttered Room (Movie Review)

Director: David Greene | Release Date: 1967

On the Web

The Shuttered Room

director: 
David Greene
Release Date: 
1967
3

"The Shuttered Room" is a 1967 British psychological horror movie ostensibly based on an HP Lovecraft story. It's about a couple, with a wide age gap, who move back to the lady's childhood home on a remote island to visit the old mill she's due to inherit. The locals however, do not intend to make her feel welcome. Aside from Oliver Reed, who instantly needs to do the mad nasty with youthful wife Susannah.

Oh and there's a monster in the attic. But, y'know, whatever.

Psyhcological horror is, at it's heart, about creating an atmosphere and building a world. It's a shame then that the gaps in "The Shuttered Room's" atmosphere are often so large I wouldn't have been surprised to see a group of people holding a craft fare in them. Carol Lynley spends a large amount of the running time, when she's not wincing at the mill or being groped, just wandering around. This is is supposed to be her getting a sense of where she was born but often genuinely seems like she's trying to remember when she last purchased milk. Sure, she's relentlessly pursued by twangy jazz music but even that doesn't seem to bother her.

Far being a bother actually, the music might be one of the sole redeeming features of this movie. Alternating between jaunty free-ish jazz and ominous bass twangs, this seems to be one of the more conscious attempts by the filmmakers to make things seem Properly American, a far cry from the kind of pastorally creepy sounds that this movie probably would have had, had it been set in England. Of course, as you and I know, English people cannot contain their discomfort when having to act with any sort of jazz music, even if it is applied in post production. This actually helps the score give the movie some of the uneasy feeling it clearly wanted to have but didn't manage to cultivate.

There are hints of the kind of odd detail that create good psychological horror: the biblical interpretation one local has of the time he was attacked, the locals almost cheerful attempts at sexual assault and Oliver Reed's use of a headless teddybear as an improvised torch. Sadly though, most of the “WEIRD, RIGHT?” attempts at establishing atmospherics fall flat. The setting is benign and the token scary old lady is the kind of woman who could plausibly announce she is going to be giving yoga classes after the movie's twist. Any chance this movie has at creating unease is left mostly to the wild-eyed Oliver Reed and his implausible jeans. And by God, he does his best.

Most of the performances in this movie are hampered by the poor ADR, seemingly delivered by people living inside their microphones, accents, and non-committal acting, vaguely manic is the best you can hope for. This makes Oliver Reed's performance the only real beacon of acting weirdness in the movie. But it's a fucking big beacon.

Reed's crawling, sexual aggressiveness is to the fore the minute Mike and Susannah arrive on the island. Even if it is uncut with a sort of awkward chastity, he's definitely a threat. It's always clear that he will do anything, including stopping in the middle of a very-public attempt at dropping the paw on a local girl, to garner her affection.

What's not clear, however, is what accent he thinks he's doing. Reed plays fast and loose with phonetics in this movie, veering from mid-Atlantic to Fonz-caricature in the space of a single sentence. His accent aerobatics and weird, chaste-perviness combine to give the movie its most memorable line: “I like de taste o' yer wivezzz earzzzz”. Between this, having his eldery aunt give him baths and his kryptonite being naked breasts he makes a valiant attempt to save an otherwise fairly non-descript setting for a “psychological horror” movie.

But what of the horror in the movie? Truthfully, there was more violence in an email I got about swapping shift in work just now than there was in this movie (and I have a desk job). The monster-in-the-attic story always has potential and the movie's opening POV shot showed definite promise for a potential creepfest.

Sadly, it swiftly became apparent the “horror” part of the movie wasn't going to come till the very end. And when the horror does come, it doesn't feel like a build and release House Of The Devil maneuver. Instead it smacks quite obviously of “Jesus, what are we going to put in the trailer for this?”. This panicked inclusion of excitement near the end of the film extends to the plot, with a pathetic, obvious twist and a non-sequitorial late development of psychic powers (“what do people like in other movies, chaps?” you can almost hear them cry).

I must mention Gig Young who plays Susannah's skeptical New York husband Mike Kelton. He gives a great performance, just not one that should have anything to do with this movie. Your chief reaction to an island full of sexual deviants and women howling about curses should not be an occasionally raised eyebrow and a cool witticism. You should weeping with fear.

Not old Mike though. Even when the locals get directly physically aggressive with him he manages to fend them off with the Kung-Fu he inexplicably knows. Eventually though, he's overpowered by locals and has the ultimate indignity visited upon him: they put him in a net and drive his large car near him. If this sounds underwhelming that's because: yep, it totally is.

I'm a nerd and so I've been pretending to have read HP Lovecraft for years, so I can give you no real insight into whether the movie is loyal to his story or not. It's nothing like Stuart Gordon's adaptations I can tell you that much.

Ultimately The Shuttered Room is a British attempt at horror in an American setting that, for the most part, deserves to be forgotten. You probably thought “Oliver Reed as a manchild rapist” could never be boring. Well, think again.


          Comment on JPA with UUID by Rodrigo Vergara        
I found a workaround. See comments. public List findAllByProperties( Map properties ) { CriteriaQuery queryByProperties = createQueryByProperties( properties ); TypedQuery query = em.createQuery( queryByProperties ); // ADDING THIS Set keySet = properties.keySet(); for ( String key : keySet ) { Object value = properties.get( key ); query.setParameter( key, value ); } // return query.getResultList(); } private CriteriaQuery createQueryByProperties( Map properties ) { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery( entityClass ); Root root = cq.from( entityClass ); Set<Entry> entrySet = properties.entrySet(); List predicateList = new ArrayList(); for ( Entry entry : entrySet ) { String key = entry.getKey(); Object value = entry.getValue(); ParameterExpression val = cb.parameter( value.getClass(), key ); // <-- Adding this line Predicate equal = cb.equal( root.get( key ), val ); // <-- And change value by val predicateList.add( equal ); } cq = cq.where( cb.and( predicateList.toArray( new Predicate[ predicateList.size() ] ) ) ); return cq; }
          Comment on JPA with UUID by Rodrigo Vergara        
Hi Wytze, first of all, I want to thank for your great contribution. Second, I have a little problem. The method createQueryByProperties, just take only one property. I try to solve, using a list of predicates, like that: List predicateList = new ArrayList(); for ( Entry entry : entrySet ) { String key = entry.getKey(); Object value = entry.getValue(); Predicate equal = cb.equal( root.get( key ), value ); predicateList.add( equal ); } cq = cq.where( cb.and( predicateList.toArray( new Predicate[ predicateList.size() ] ) ) ); But I get this exception: Caused by: javax.ejb.EJBException: See nested exception; nested exception is: org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class [Ljava.lang.Object;" is not a valid query parameter. Caused by: org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class [Ljava.lang.Object;" is not a valid query parameter. at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1418) at org.apache.openjpa.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:644) at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:553) at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:529) at org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:451) at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:392) at com.ibm.ws.persistence.jdbc.sql.SelectImpl.execute(SelectImpl.java:80) at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:363) at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427) at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230) at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220) at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94) at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:2068) at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34) at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1246) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:861) at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792) at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542) at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:288) at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302) at cl.pjud.sitatp.ejb.util.dao.GenericDAO.findAllByProperties(GenericDAO.java:145) Can you help me, please. Greetings from Chile Rodrigo
          The Loved Ones        

The Loved Ones (Movie Review)

Director: Sean Byrne | Release Date: 2009

On the Web

The Loved Ones

director: 
Sean Byrne
Release Date: 
2009
9

The angst and elation of maturity are the heartbeats of mainstream cinema’s adolescence. Through several decades of teen comedies and horror films there is the consistent playing out of maturation through sexuality, violence (graphic or not), and familial independence. Often genres such as comedy and horror are in themselves perceived as “adolescent” in their form and content. So it is unsurprising—if not appropriate—that such films often find teenagers as their core characters. Indeed, many of these films are primarily about providing a certain kind of cathartic experience founded upon the definitive states of violent expulsion and sexual release within its audience. I’m being a tad hyperbolic of course. There are always exceptions to the “rules.” But it is apparent that the majority of Western films since the late 1950s dealing with teenagers take the principles of bodily engagement and mastery as their primary focus.

Writer/director Sean Byrne’s “The Loved Ones” is a film that seeks to explore these transcendental experiences of maturation for the adolescent subject. More specifically, Byrne’s film is a genre study that explores the ways teen comedy and horror work to help their audiences exorcise seemingly irreconcilable parent-teen dilemmas. Byrne has crafted a smart, engaging, gross, funny, and insightful bit of reflective filmmaking while avoiding the usual traps of projecting self-importance.

“The Loved Ones” opens with the sounds of a static filled radio that eventually lands on a classic rock golden oldie. We watch as Brent (Xavier Samuel), our main protagonist drives a car with his father in the passenger seat. Suddenly a mysterious, blood-soaked figure with a heart carved in its chest appears in the road, causing Brent to swerve into a nearby tree resulting in his father’s death. Cut six months later to the evening of an end of school dance where Brent has grown much more sullen and taken to self-medicating with cutting and pot. Brent’s girlfriend Holly (Victoria Thaine) grows anxious of his emotional detachment yet still proclaims her love for him. Meanwhile, Brent’s best friend Jamie (Richard Wilson) pursues the equally sullen and mysterious Mia (Jessica McNamee). But things are about to get rather…challenging for Brent. After turning down the advancements of fellow student Lola (Robin McLeavy), Brent is abducted by her father (John Brumpton). Tied to a chair and tortured, it appears things are only about to get worse for poor-ole Brent as Holly and his mother (Suzi Dougherty) desperately search for him.

The general set-up seems a bit too similar to some well-worn material. Lola, briefly coded as a withdrawn, though nice-enough loner, becomes part Annie Wilkes, Alex Forrest, and Samantha Baker. The torture and high school set-up have drawn comparisons to “Sixteen Candles”, “The Texas Chainsaw Massacre”, and numerous other films falling under the most annoyingly resilient and useless of critical buzzwords, “torture-porn.” But where “The Loved Ones” finds a savory, rich, and unique identity is in the films handling of the teen-adult dynamics. While the film revels in its fair share of gross, visceral extremes, it becomes apparent that Byrne is just as interested in juxtaposing presumed adolescent life landmarks in a way that showcases the simultaneous elation and sorrow of unfettered emotional response sans the guidance (or misguidance) of their parents. Throughout the film, Byrne strategically cuts back and forth to the Jaime/Mia/Authority experience at the dance and the Brent/Holly/Lola/Daddy storyline at Lola’s home in ways which highlight the various . The film is so tightly balanced tonally that the elation and terror we feel begin to blend together in some rather surreally uncomfortable and provocative ways. The film is able to walk that threadbare line between derivative and exploratory with an apparent effortless intelligence seldom seen in film, not just horror.

This isn’t to say “The Loved Ones” is too heady for its own good. Indeed, the filmmakers and actors bring a layer of commitment and honesty that some how manages to both pull us in and allow us to recognize the commentary at play. This is of course assisted by the film’s refreshingly controlled and precise editing, aural, and visual aesthetic presentation. We are not assaulted by faux aged film, jerking movements, or forced color pallets. Presumed emotion is never forced upon us. The guttural reaction we get from {Cinematographer’s} locked down camera-work does not so much seek to revel in the actions depicted but insists on developing the narrative in the torturous acts and dance sequences we see; each narrative thread commenting on and complimenting one another.

I unabashedly love this film. I haven’t experienced a piece of horror that I immediately wanted to revisit in a long time. “The Loved Ones” is a surprisingly nuanced film that keenly examines the emotional relationships between parents and their adolescents while also tapping into some diverse genre material. It is a smart, well-crafted genre exploration with more than its fair share of laughs and cringe worthy/stomach churning moments, intelligently balancing commentary and admiration.


          Mongolian Death Worm        

Mongolian Death Worm (Movie Review)

Director: Steven R. Monroe | Release Date: 2010

On the Web

Mongolian Death Worm

director: 
Steven R. Monroe
Release Date: 
2010
2

I loved the movie “Tremors” as a child. I really don’t know why. There was something about Kevin Bacon and some hillbilly survivalist out-running and fighting giant worm monsters called Graboids that really spoke to five year old me. It’s kind of always been a sentimental favorite of mine, even though I haven’t watched it in at least ten years. When I got the DVD for “Mongolian Death Worm” sent to me, the first thing I thought upon looking at the cover was “huh, this looks like a shitty version of “Tremors””. Then I watched it. I would never disgrace the good name of “Tremors” by saying that again. “Mongolian Death Worm” is far, far worse than being just a shitty version of “Tremors”. “Mongolian Death Worm” might be the most by-the-numbers, flat and boring Syfy Original I’ve ever seen. Let that sink in.

I’ve seen enough Syfy Originals now to where I can recite the basic plot of each and every one to you. They all revolve around some sort of monster. That monster is either the product of, or unleashed by, some evil multi-national corporation. That evil multi-national corporation refuses to kill the monster because it is either their product, and therefore represents millions of dollars of research and development that must be recouped, or would somehow disrupt the production of whatever it is they do. Sometimes some supernatural, historic artifact or site is involved. Our protagonists are either some sort of rapscallion scofflaw or a retired military type that pairs up with a female doctor or scientist and her companion, that’s either a total pussy or a bumbling comedic relief. That said, here’s “Mongolian Death Worm” in that framework:

Giant sand worms with mouth tentacles. Oil company. Would disrupt the drilling of oil. Ghengis Khan’s tomb. Rapscallion scofflaw, doctor and total pussy.

Seriously. Play this game at home. It’s amazing how well it works.

There are a few things that “Mongolian Death Worm” does to distance itself from its other Syfy Original cousins, though most are detrimental. For one, there’s the actor who’s so bad it sounds as if he’s singing every line. Haven’t seen something that bad before. Secondly, the whole thing takes place in Mongolia, which looks an awful lot like Texas to me. Granted, I’ve never been to Mongolia, so who knows, maybe the two really do look a lot alike. There’s an asian sheriff (you know, to remind you that this occurs in Mongolia and not Texas), who speaks with a southern drawl and wears a cowboy hat. Wait, are you sure this wasn’t supposed to take place in Texas?

Oh no, there’s the village of diseased asian people, definitely Mongolia. Thanks for the vaguely racist reminder Syfy. Ever notice how many times I use the phrase “vaguely racist” when talking about Syfy Originals? Curious. There’s some true greatness in these scenes though. All the male doctors are wearing scrubs because, you know, they’re treating people with ebola or some shit like that. The females doctors? Tank tops and short shorts because, you know, they have cleavage and butts and Syfy Originals will stoop to the lowest of lows to get people to stick around for one commercial break. Gotta get those ads sold.

But why are these scenes in this movie? No clue. The plot of “Mongolian Death Worm” is so paper-thin and flimsy that the driving action is seemingly cliche. Why are there disease camps set up? Well, it’s Mongolia. There’s gotta be villages just teeming with sick people there. Why does the Asian cowboy sheriff take off, leading him to set the rapscallion and the doctor up together? Because he’s gotta go break up a fight over a goat. It’s Mongolia, that shit happens. Why does one of the oil company executive stage a coup to take the company over? Because he’s evil. Obviously.

Let’s go through the Syfy Original checklist some more. Generic Syfy Original plot? Check. Typical Syfy Original characters? Check. Story driven mostly by cliches and tropes? Check. Horrible acting? Check. Terrible CGI? Check. What am I missing, what am I missing... oh yeah! Pacing problems? Check.

“Mongolian Death Worm” is also phenomenally boring. Instead of just embracing it’s shittiness and revelling in an hour and a half of stupidity like a half-Shark, half-Octopi tearing shit up or ware-hyena women fighting with foggy nipples, “Mongolian Death Worm” tries to take the serious route and attempts to play as an allegory for last Spring’s (and Summer’s and Fall’s) BP oil spill disaster and peak oil. Instead of being subtle or reserved about it, “Mongolian Death Worm” takes the “Sesame Street” approach. For example, when we discover that the oil drilling sight is actually drilling oil shale, our doctor character (suddenly an expert in all things oil related) launches into what oil shale is, how it works, why it’s bad for the environment and explains the concept of permafrost and trapped carbon. I like intelligent movies, I have no problem with this message, but I hate blunt force deliveries. I also hate when movies called “Mongolian Death Worm” take themselves seriously and try to have a political message. If you can’t even get me to believe that your actors can act, why would I ever want to hear you wax political about anything?

“Mongolian Death Worm” is about as bad as Syfy Originals come. I can’t see why anyone would watch this movie at 3:00am on a Saturday while trying to sober up, yet alone consciously choose to sit down and watch it. While there may be a chuckle here or there, they’re absolutely not worth sitting through this film to get. Ultimately, it feels like exactly what it is, a film that was cranked out in a factory to merely justify the low-cost sale of a two hour block of ad space. And that’s obviously not worth your time.


          Hitman        

Hitman (Movie Review)

Director: Xavier Gens | Release Date: 2007

On the Web

Hitman

director: 
Xavier Gens
Release Date: 
2007
5

"Hitman" is based on the popular video game series for the Playstation 2, and follows the exploits of "47", an agent who has been trained from the time he was a small child to join the ranks of the world's best assassins. We're shown this through a clumsy montage over the opening credits, that for some inexplicable reason uses old footage from the show "Dark Angel" (circa 2000). We then jump into the future to see 47 confronting an investigator that we learn has been tracking him, and then we jump back in time three months to the beginning of the story.

That's just about the easiest way to describe the setup for the film, the latest in a long line of questionable video game adaptations brought to the big screen. Through a complicated series of events and a rushed action sequence in the beginning, we learn that Agent 47 has been used to help replace the Russian president with a doppleganger... someone who is more sympathetic to the forces that secretly run Russia from behind the scenes. He finishes his end of the deal (unknowingly) and is rewarded by an attempt on his life, which of course fails, lest there be no reason for the rest of the film to progress.

After meeting up with a Russian hooker (Why are they always hookers?) the two set off on a quest to figure out who is trying to kill 47. The plot, which succeeds at being as convoluted as the plots of these games typically are (think "Splinter Cell," only with less cohesion) is a head scratcher from start to finish, although as a veiwer you do understand the basic premise. A lifelong assassin is being set up by his former boss, and he must solve the mystery before he is killed. It's unfortunate that they felt the need to make everything so complicated, because there is a decent actioner in here somewhere.

I say "decent" because nothing in "Hitman" was really all that impressive. After seeing the stock footage from "Dark Angel" (seriously, did they think no one would notice? We are geeks after all) it took me about 20-25 minutes to get myself back into the film. It's one of the most amateurish things I have ever seen, and it's worsened by the fact that it's the only thing we ever see from 47's background. There is no real back story about this shadowy organization, and come to think of it, no real resolution when it was all said and done, unless you count vague insinuations about what may happen in the future.

For his part, Timothy Olyphant is charming as Agent 47, however one can't help but wonder if he isn't miscast here. The character required someone who is cold blooded, quiet, calculating and most of all menacing, but Olyphant never really hits any of these notes. Instead his quirky personality shines through (despite his best efforts) and the moments when he does try to be a hitman he just seems wooden (think Keanu Reeves). He's paired on screen with the red hot Olga Kyralenko (the camel toe chick from the poster). Olga plays "Nika," the hooker, and as you would expect of a hooker, she doesn't disappoint. In fact she was the only one in the entire film that I really cared about, although to be honest, this may have been because of the handful of shots of her spectacular breasts. It's up to you to be the judge.

As for the rumors that FOX brought in outside sources to cut down the violence, I didn't really see any moments that called for red stuff where the film didn't deliver. There were plenty of headshots, arm shots, body shots and bone-breaking to keep the gore hounds satisfied. Still though, with the exception of a handful of exciting sequences I really felt like "Hitman" was underwhelming, never quite reaching the heights it could have. And for their part, I wouldn't be surprised if FOX felt the need to tinker with the story to try and make it a little clearer. If that's the case, it's up in the air as to whose to blame for the convoluted nature of the plot.

To make matters worse the ending will not satisfy anyone looking for answers, and that is just the last in a long list of complaints I have about the film. I will say however that It's not awful by any stretch of the imagination. It's a decent action flick with a handful of great kills, an interesting premise and two unnecessary yet spectacular nude scenes. My biggest frustration is that the plot didn't need to be this complicated. I spent so much energy trying to figure out what was going on (and why footage from an almost 10 year old TV show was used) that by the time it was all over I had already forgotten it.


          WFA 4.1 RESTful API: A Few Notes + Some PowerShell        
OnCommand Workflow Automation (WFA) 4.1 REST APIs are very well documented here: REST Web Services Primer.

WFA Object Collections

Putting the following URLs in a browser returns (mostly) XML output for the specific WFA object collections:

https://{host:port}/rest/users
https://{host:port}/rest/backups (this returns a backup)
https://{host:port}/rest/dars (this returns a DAR)
https://{host:port}/rest/configurations (could not find resource...)
https://{host:port}/rest/search (needs a search term)
https://{host:port}/rest/system
https://{host:port}/rest/system/asup
https://{host:port}/rest/system/ldap
https://{host:port}/rest/workflows
https://{host:port}/rest/filters
https://{host:port}/rest/finders
https://{host:port}/rest/credentials
https://{host:port}/rest/data_sources
https://{host:port}/rest/data_source_types

Note: The list above is similar to what’s under ‘WFA object collection’ on page 8 of the REST Web Services Primer.

A Bit of PowerShell

If you’re still using a self-signed certificate on your WFA box, you’ll probably want to do>


$TypeToAdd = "using System.Net;using System.Security.Cryptography.X509Certificates;public class TrustAllCertsPolicy : ICertificatePolicy {public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) {return true;}}"

add-Type $TypeToAdd

[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy


Otherwise you’ll get an error - when you try to run Invoke-RestMethod - like “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel”.

To configure credentials this one liner will do the job>


$C = New-Object System.Management.Automation.PsCredential($(Read-Host "U"),$(Read-Host "P" -AsSecureString))


With PowerShell you can use either Invoke-RestMethod or Invoke-WebRequest. Invoke-RestMethod is more convenient since it only returns the content, omitting the headers.

A Few GETs

WFAs REST API supports the verbs: GET (list), POST (add), PUT (update), DELETE (remove)

Here are a few examples of GET-ing information via the REST API (hope to do some POST/PUT/DELETEs in a future post).

Example 1: Getting All the Users


$Users = Invoke-RestMethod -Method Get -uri https://{host:port}/rest/users -Credential $C
$Users.collection.user | FT name,roleType -AutoSize


Image: A Simple WFA REST API Get Example
Example 2: Get a List of All the Workflows
Note: This might take a few seconds to run...


$Workflows = Invoke-RestMethod -Method Get -uri https://{host:port}/rest/workflows -Credential $
$Workflows.collection.workflow | FT name,uuid -AutoSize


Example 3: Getting a Specific Workflow


$Workflows = Invoke-RestMethod -Method Get -uri https://{host:port}/rest/workflows?name="Migrate Volumes" -Credential $C
$Workflows.collection.workflow



          Viy        

Viy (Movie Review)

Director: Konstantin Ershov, Georgi Kropachyov | Release Date: 1967

On the Web

Viy

director: 
Konstantin Ershov, Georgi Kropachyov
Release Date: 
1967
6

"Viy" is a Soviet Union era movie about a young seminarian named Khoma, who takes some kind of pilgrimage with two other priests in training. On their first night they stop to sleep at an old woman's house. For some reason the old woman seems to take an liking to Khoma in particular, and she corners him in a stable, and she catches him and picks him up, and begins to fly through the countryside with him. Apparently the old woman is a witch and when Khoma realizes this he flips out and beats her to death with a stick, but before she dies she turns into a beautiful young woman.

Khoma flees the scene and when he gets back to his seminary the head priest tells him a young woman was beaten to death, but as she died she told her father that she asked for Khoma, by name, to pray for her three nights before her burial (I assume that the three nights of prayer were to symbolize the three days of Christ's death and resurrection). Khoma is terrified because he realizes it is the witch, but he is forced to carry out the task anyway.

On the first night when he goes to pray for the witch she comes to life, and Khoma draws a sacred circle around where he prays, so she can't hurt him. On the second night her coffin flies around the room and tries to smash through the circle. On the third night the witch summons all manner of intricately designed demons and monsters to destroy Khoma for her. There are so many of them that they literally come out of the wood-work, and the witch eventually summons one final demon named "Viy", with the ability to see Khoma through his sacred circle.

"Viy" is a pretty fun movie, that at times had a dream-like quality that reminded me a bit of The Wizard of Oz visually; probably because they are both early color films about witches and monsters. The majority of the film is spent with Khoma, the bumbling and drunken hero, hanging out with locals, who are all mostly poor farmers. The people of the film seem to have a very strong sense of community that revolves around the church, which is something that really made "Viy" feel unique to me, especially compared to earlier American movies I've seen. Although I'm not especially familiar with earlier American films, I honestly can't recall watching one where church and community were both so important.

This was a strange film but the one thing that suck out to me me as incredibly odd, in particular, was that the witch became such a beautiful woman after Khoma beat her, and as Khoma prayed for she she maintained her youthful form. I thought they were setting up some kind of sexual tension between the witch and Khoma, but for whatever reason there wasn't any whatsoever. In fact I don't think the two characters exchanged any sort of conversation throughout the whole movie. Even while Khoma was praying for her, and she was trying to kill him, neither of them had anything to say to the other. Despite the fact that Khoma had killed the witch, I found myself completely baffled by why the two were at odds to begin with. I can only assume that in Russia priests and witches were always considered mortal enemies.

Unfortunately the pacing of the movie is very awkward, which was by far the biggest flaw of the film. "Viy" is a fairly short movie, and at 77 minutes, it felt like it should have been a little shorter. There are a few stretches during the movie where nothing is happening and it seemed like it might have been better served if they had axed another 10-15 minutes. Plus the entire movie builds up to the three nights of prayer, and each night of prayer is fairly anti-climactic as only lasts two to three minutes on screen. Even the finale, which is admittedly pretty amazing, is so short that it feels a little anti-climatic also. The fact that all the action occurs over three separate encounters also makes the pacing very awkward. I understand the nights of prayer were broken up into three separate scenes because three nights of prayer were the tradition at the time, however I still feel like it could have been handled a lot better.

If the pacing of this movie had been better then I think "Viy" would be a real classic. Unfortunately it isn't. However the characters are pretty fun, and at 77 minutes, watching the movie isn't much of a commitment. If you are curious to see what a Soviet-era horror film would look like then I'd say definitely check it out.


          Grub and snappy updates        

This week, the snappy powered Ubuntu Core landed some interesting changes with regards to how it handles grub based systems.

History

The original implementation was based on traditional Ubuntu systems, where a bunch of files that any debian package could setup influenced the resulting grub.cfg that resulted after running update-grub. This produced a grub.cfg that was really hard to manage or debug, and what is most important, out of our control. This also differed greatly from our u-boot story where any gadget could override the boot setup so it bootstraps as needed.

We don’t want to own the logic for this, but only provide the guidelines for the necessary primitives for proper rollback at that level to work.

These steps also make our bootloader story look and feel more similar between each other where soon we may be able to just not care about it as the logic will be driven as if it were a black box.

Rolling it out

Even though this worked targeted the development release, also known as the rolling one, we trie to make sure all systems would transition to this model transparently. Given the model though, it isn’t a one step solution as we need to be able to update to systems which do not run update-grub and rollback to systems that do. We also need to update from a sytem that has this new snappy logic to one that doesn’t. This was solved with a very grub.cfg slick grub.cfg delivered through the gadget packages (still named oem in current implementations), in contrast, similar to the u-boot and uEnv.txt mechanics.

On a running system, these would be the steps taken:

  • Device is running a version that runs update-grub.
  • oem package update is delivered through autopilot containing the new grub.cfg.
  • The os is updated bringing in some new snappy logic.
  • The next os update would be driven by the new snappy logic which would sync grub.cfg from the oem package into the bootloader area. This new snappy would not run update-grub. The system would boot from the legacy kernel paths as if it were a delta update no new kernel would be delivered.
  • Updates would rinse and repeat, when there’s a new kernel provided in an update, the bootloader a and b locations would be used to store that kernel, grub.cfg already has logic to boot from those locations so the change is transparent.
  • On the next update, kernel asset file syncing would take place and populate the other label (a or b).

This is the development release so we shouldn’t worry to much about breaking, but why do so if it can be avoided ;-)

Outcome

The resulting code base is much simpler, there are less headaches and we don’t need to maintain or understand huge grub script snippets. Just for kicks, this is the grub.cfg we use:

set default=0
set timeout=3

insmod part_gpt
insmod ext2

if [ -s $prefix/grubenv ]; then
  load_env
fi

if [ -z "$snappy_mode" ]; then
    set snappy_mode=regular
    save_env snappy_mode
fi
if [ -z "$snappy_ab" ]; then
    set snappy_ab=a
    save_env snappy_ab
fi

if [ "$snappy_mode" = "try" ]; then
    if [ "$snappy_trial_boot" = "1" ]; then
        # Previous boot failed to unset snappy_trial_boot, so toggle
        # rootfs.
        if [ "$snappy_ab" = "a" ]; then
            set snappy_ab=b
        else
            set snappy_ab=a
        fi
        save_env snappy_ab
    else
        # Trial mode so set the snappy_trial_boot (which snappy is
        # expected to unset).
        #
        # Note: don't use the standard recordfail variable since that forces
        # the menu to be displayed and sets an infinite timeout if set.
        set snappy_trial_boot=1
        save_env snappy_trial_boot
    fi
fi

set label="system-$snappy_ab"
set cmdline="root=LABEL=$label ro init=/lib/systemd/systemd console=ttyS0 console=tty1 panic=-1"

menuentry "$label" {
    if [ -e "$prefix/$snappy_ab/vmlinuz" ]; then
        linux $prefix/$snappy_ab/vmlinuz $cmdline
        initrd $prefix/$snappy_ab/initrd.img
    else
        # old-style kernel-in-os-partition
        search --no-floppy --set --label "$label"
        linux /vmlinuz $cmdline
        initrd /initrd.img
    fi
}

and this was the grub.cfg that was auto generated:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ] ; then
  set timeout=0
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/09_snappy ###
menuentry 'Ubuntu Core Snappy system-b rootfs'  $menuentry_id_option 'gnulinux-simple-LABEL=system-b' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt4'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  4ff468ee-953f-45df-a751-e6232a1c8ef7
	else
	  search --no-floppy --fs-uuid --set=root 4ff468ee-953f-45df-a751-e6232a1c8ef7
	fi
	linux /boot/vmlinuz-3.19.0-22-generic root=LABEL=system-b ro init=/lib/systemd/systemd console=tty1 console=ttyS0 panic=-1
	initrd /boot/initrd.img-3.19.0-22-generic
}
menuentry 'Ubuntu Core Snappy system-a rootfs'  $menuentry_id_option 'gnulinux-simple-LABEL=system-a' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  47ea9cad-ec4f-4290-85e8-eee7dac19f1c
	else
	  search --no-floppy --fs-uuid --set=root 47ea9cad-ec4f-4290-85e8-eee7dac19f1c
	fi
	linux /boot/vmlinuz-3.19.0-22-generic root=LABEL=system-a ro init=/lib/systemd/systemd console=tty1 console=ttyS0 panic=-1
	initrd /boot/initrd.img-3.19.0-22-generic
}
    # set defaults
    if [ -z "$snappy_mode" ]; then
        set snappy_mode=regular
        save_env snappy_mode
    fi
    if [ -z "$snappy_ab" ]; then
        set snappy_ab=a
        save_env snappy_ab
    fi

    if [ "$snappy_mode" = "try" ]; then
        if [ "$snappy_trial_boot" = "1" ]; then
            # Previous boot failed to unset snappy_trial_boot, so toggle
            # rootfs.
            if [ "$snappy_ab" = "a" ]; then
                set default="Ubuntu Core Snappy system-b rootfs"
                set snappy_ab=b
            else
                set snappy_ab=a
                set default="Ubuntu Core Snappy system-a rootfs"
            fi
            save_env snappy_ab
        else
            # Trial mode so set the snappy_trial_boot (which snappy is
            # expected to unset).
            #
            # Note: don't use the standard recordfail variable since that forces
            # the menu to be displayed and sets an infinite timeout if set.
            set snappy_trial_boot=1
            save_env snappy_trial_boot

            if [ "$snappy_ab" = "a" ]; then
                set default="Ubuntu Core Snappy system-a rootfs"
            else
                set default="Ubuntu Core Snappy system-b rootfs"
            fi
        fi
    else
        if [ "$snappy_ab" = "a" ]; then
            set default="Ubuntu Core Snappy system-a rootfs"
        else
            set default="Ubuntu Core Snappy system-b rootfs"
        fi
    fi
### END /etc/grub.d/09_snappy ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4ff468ee-953f-45df-a751-e6232a1c8ef7' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt4'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  4ff468ee-953f-45df-a751-e6232a1c8ef7
	else
	  search --no-floppy --fs-uuid --set=root 4ff468ee-953f-45df-a751-e6232a1c8ef7
	fi
	linux	/boot/vmlinuz-3.19.0-22-generic root=/dev/sda4 ro init=/lib/systemd/systemd console=tty1 console=ttyS0 panic=-1
	initrd	/boot/initrd.img-3.19.0-22-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-4ff468ee-953f-45df-a751-e6232a1c8ef7' {
	menuentry 'Ubuntu, with Linux 3.19.0-22-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-22-generic-advanced-4ff468ee-953f-45df-a751-e6232a1c8ef7' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt4'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  4ff468ee-953f-45df-a751-e6232a1c8ef7
		else
		  search --no-floppy --fs-uuid --set=root 4ff468ee-953f-45df-a751-e6232a1c8ef7
		fi
		echo	'Loading Linux 3.19.0-22-generic ...'
		linux	/boot/vmlinuz-3.19.0-22-generic root=/dev/sda4 ro init=/lib/systemd/systemd console=tty1 console=ttyS0 panic=-1
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.19.0-22-generic
	}
	menuentry 'Ubuntu, with Linux 3.19.0-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-22-generic-recovery-4ff468ee-953f-45df-a751-e6232a1c8ef7' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt4'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  4ff468ee-953f-45df-a751-e6232a1c8ef7
		else
		  search --no-floppy --fs-uuid --set=root 4ff468ee-953f-45df-a751-e6232a1c8ef7
		fi
		echo	'Loading Linux 3.19.0-22-generic ...'
		linux	/boot/vmlinuz-3.19.0-22-generic root=/dev/sda4 ro single nomodeset init=/lib/systemd/systemd
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-3.19.0-22-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

          2001 Maniacs        

2001 Maniacs (Movie Review)

Director: Tim Sullivan | Release Date: 2001 Maniacs

On the Web

2001 Maniacs

director: 
Tim Sullivan
Release Date: 
2001 Maniacs
7

As far as horror fans are concerned, remakes are generally looked down upon these days. We're all aware of this. From time to time though they do manage to be justified. "2001 Maniacs" is no doubt a huge cult classic, but in being so it also suffers from a lot low-budget side effects. Little known to the casual movie watcher, beloved by many hardcore fans, Herschell Gordon Lewis's "2000 Maniacs" was cheap, grainy and disgusting; which is why it was so well loved.

With his 2005 remake, Director Tim Sullivan realized that the standards for gory films had changed since the days of "2000 Maniacs" and that he wouldn't be able to do a direct remake. Instead, he chose to use the important elements from the story and craft them into a newer story all his own. We still have the best parts; cannibal civil war ghosts, a crazy mayor, bizarre rednecks and unsuspecting virginal types. In fact, the story as a whole remains more or less intact. Sullivan gives a feel of reverence to Herschell Gordon Lewis, and you can sense his respect towards Lewis' work all throughout this film.

Perhaps the key factor to the enjoyment of "2001 Maniacs" is the casting of Robert Englund in the role of the town's Mayor Buckman. Englund is well known for being hammy and over the top in classic b-movie fashion and does so here in spades. He appears to be enjoying himself quite a bit as well! Beyond Englund, there are many cameos sprinkled about, spaced enough to make make it distracting and to keep it enjoyable.

Seeing the likes of Eli Roth, Travis Tritt, Kane Hodder and others, they're in just the right balance that leaves you thinking 'is that who I thought it was?' vs. 'oh god not again'. Outside of the veteran actors like Lin Shaye, the acting is stilted at best. Many of your yokels are obviously newcomers to the acting world and their delivery can be offputting at first. With enough subtle laughs happening in the background and a story that keeps the gore and jokes rolling smoothly, it ultimately doesn't detract from the film much. Throughout the entire movie, there is a definite air that all people involved are enjoying themselves quite a bit and never does the film take itself too seriously.

The stand out of the movie, much like the original, is the gore. In "2000 Maniacs", Herschel Gordon Lewis worked magic to show new and bizarre ways for people to die on a bargain budget. In "2001", Sullivan works to reinvent the original ideas behind the deaths without directly copying the master. Again, reverence and admiration show in the work of special effects with good results. With an honest to goodness drawing and quartering and a whole host of other over the top ways to die, these aspects help to make "2001 Maniacs" fun to watch.

Not a film to make you think, "2001 Maniacs" sets out to establish itself as a fun and nothing more and it reaches that goal easily. With so many other heavy handed horror films out there trying to take that mantel, this makes for a nice change. While the film went direct to video back in 2005, the popularity of the movie has spawned two more sequels with most of the bad guys coming back. The characters are memorable, they're enjoyable, they're depraved. Even our gang of milk-toast protaganists are enjoyable if not stereotypical which again, doesn't matter. If you're worried about the stereotypes, you're thinking too hard.


          Weekend project: Ghetto RPC with redis, ruby and clojure        

There’s a fair amount of things that are pretty much set on current architectures. Configuration management is handled by chef, puppet (or pallet, for the brave). Monitoring and graphing is getter better by the day thanks to products such as collectd, graphite and riemann. But one area which - at least to me - still has no obvious go-to solution is command and control.

There are a few choices which fall in two categories: ssh for-loops and pubsub based solutions. As far as ssh for loops are concerned, capistrano (ruby), fabric (python), rundeck (java) and pallet (clojure) will do the trick, while the obvious candidate in the pubsub based space is mcollective.

Mcollective has a single transport system, namely STOMP, preferably set-up over RabbitMQ. It’s a great product and I recommend checking it out, but two aspects of the solution prompted me to write a simple - albeit less featured - alternative:

  • There’s currently no other transport method than STOMP and I was reluctant to bring RabbitMQ into the already well blended technology mix in front of me.
  • The client implementation is ruby only.

So let me here engage in a bit of NIHilism and describe a redis based approach to command and control.

The scope of the tool would be rather limited and only handle these tasks:

  • Node discovery and filtering
  • Request / response mechanism
  • Asynchronous communication (out of order replies)

Enter redis

To allow out of order replies, the protocol will need to broadcast requests and listen for replies separately. We will thus need both a pub-sub mechanism for requests and a queue for replies.

While redis is initially an in-memory key value store with optional persistence, it offers a wide range of data structures (see the full list at http://redis.io) and pub-sub support. No explicit queue function exist, but two operations on lists provide the same functionality.

Let’s see how this works in practice, with the standard redis-client redis-cli and assuming you know how to run and connect to a redis server:

  1. Queue Example

    Here is how to push items on a queue named my_queue:

    redis 127.0.0.1:6379> LPUSH my_queue first
    (integer) 1
    redis 127.0.0.1:6379> LPUSH my_queue second
    (integer) 2
    redis 127.0.0.1:6379> LPUSH my_queue third
    (integer) 3
    

    You can now subsequently issue the following command to pop items:

    redis 127.0.0.1:6379> BRPOP my_queue 0
    1) "my_queue"
    2) "first"
    redis 127.0.0.1:6379> BRPOP my_queue 0
    1) "my_queue"
    2) "second"
    redis 127.0.0.1:6379> BRPOP my_queue 0
    1) "my_queue"
    2) "third"
    

    LPUSH as its name implies pushes items on the left (head) of a list, while BRPOP pops items from the right (tail) of a list, in a blocking manner, with a timeout argument which we set to 0, meaning that the action will block forever if no items are available for popping.

    This basic queue mechanism is the main mechanism used in several open source projecs such as logstash, resque, sidekick, and many others.

  2. Pub-Sub Example

    Queues can be subscribed to through the SUBSCRIBE command, you’ll need to open two clients, start by issuing this in the first:

    redis 127.0.0.1:6379> SUBSCRIBE my_exchange
    Reading messages... (press Ctrl-C to quit)
    1) "subscribe"
    2) "my_hub"
    3) (integer) 1
    

    You are now listening on the my_exchange exchange, issue the following in the second terminal:

    redis 127.0.0.1:6379> PUBLISH my_exchange hey
    (integer) 1
    

    You’ll now see this in the first terminal:

    1) "message"
    2) "my_hub"
    3) "hey"
    
  3. Differences between queues and pub-sub

    The pub-sub mechanism in redis, broadcasts to all subscribers and will not queue up data for disconnect subscribers, where-as queues will deliver to the first available consumer, but will queue up (in RAM, so make sure of your consuming ability)

Designing the protocol

With the following building blocks in place, a simple layered protocol can be designed offering the following functionality, offering the following workflow:

  • A control box broadcasts a requests with a unique ID (UUID), with a command and node specification
  • All nodes matching the specification reply immediately with a START status, indicating that the requests has been acknowledged
  • All nodes refusing to go ahead reply with a NOOP status
  • Once execution is finished, nodes reply with a COMPLETE status

Acknowledgments and replies will be implemented over queues, solely to demonstrate working with queues, using pub-sub for replies would lead to cleaner code.

If we model this around JSON, we can thus work with the following payloads, starting with requests:

request = {
  reply_to: "51665ac9-bab5-4995-aa80-09bc79cfb2bd",
  match: {
    all: false, /* setting to true matches all nodes */
    node_facts: {
      hostname: "www*" /* allowing simple glob(3) type matches */
    }
  },
  command: {
    provider: "uptime",
    args: { 
     averages: {
       shortterm: true,
       midterm: true,
       longterm: true
     }
    }
  }
}

START responses would then use the following format:

response = {
  in_reply_to: "51665ac9-bab5-4995-aa80-09bc79cfb2bd",
  uuid: "5b4197bd-a537-4cc7-972f-d08ea5760feb",
  hostname: "www01.example.com",
  status: "start"
}

NOOP responses would drop the sequence UUID not needed:

response = {
  in_reply_to: "51665ac9-bab5-4995-aa80-09bc79cfb2bd",
  hostname: "www01.example.com",
  status: "noop"
}

Finally, COMPLETE responses would include the result of command execution:

response = {
  in_reply_to: "51665ac9-bab5-4995-aa80-09bc79cfb2bd",
  uuid: "5b4197bd-a537-4cc7-972f-d08ea5760feb",
  hostname: "www01.example.com",
  status: "complete",
  output: {
    exit: 0,
    time: "23:17:20",
    up: "4 days, 1:45",
    users: 6,
    load_averages: [ 0.06, 0.10, 0.13 ]
  }
}

We essentially end up with an architecture where each node is a daemon while the command and control interface acts as a client.

Securing the protocol

Since this is a proof of concept protocol and we want implementation to be as simple as possible, a somewhat acceptable compromise would be to share an SSH private key specific to command and control messages amongst nodes and sign requests and responses with it.

SSL keys would also be appropriate, but using ssh keys allows the use of the simple ssh-keygen(1) command.

Here is a stock ruby snippet, gem which performs signing with an SSH key, given a passphrase-less key.

require 'openssl'

signature = File.open '/path/to/private-key' do |file|
  digest = OpenSSL::Digest::SHA1.digest("some text")
  OpenSSL::PKey::DSA.new(file).syssign(digest)
end

To verify a signature here is the relevant snippet:

require 'openssl'

valid? = File.open '/path/to/private-key' do |file|

  OpenSSL::PKey::DSA.new(file).sysverify("some text", sig)
end

This implements the common scheme of signing a SHA1 digest with a DSA key (we could just as well sign with an RSA key by using OpenSSL::PKey::RSA)

A better way of doing this would be to sign every request with the host’s private key, and let the controller look up known host keys to validate the signature.

The clojure side of things

My drive for implementing a clojure controller is integration in the command and control tool I am using to interact with a number of things.

This means I only did the work to implement the controller side of things. Reading SSH keys meant pulling in the bouncycastle libs and the apache commons-codec lib for base64:

(import '[java.security                   Signature Security KeyPair]
        '[org.bouncycastle.jce.provider   BouncyCastleProvider]
        '[org.bouncycastle.openssl        PEMReader]
        '[org.apache.commons.codec.binary Base64])
(require '[clojure.java.io :as io])


(def algorithms {:dss "SHA1withDSA"
                 :rsa "SHA1withRSA"})

;; getting a public and private key from a path
(def keypair (let [pem (-> (PEMReader. (io/reader "/path/to/key")) .readObject)]
               {:public (.getPublic pem)
                :private (.getPrivate pem)}))

(def keytype :dss)

(defn sign
  [content]
  (-> (doto (Signature/getInstance (get algorithms keytype))
        (.initSign (:private keypair))
        (.update (.getBytes str)))
      (.sign)
      (Base64/encodeBase64string)))

(defn verify
  [content signature]
  (-> (doto (Signature/getInstance (get algorithms keytype))
        (.initVerify (:public keypair))
        (.update (.getBytes str)))
      (.verify (-> signature Base64/decodeBase64))))

Redis support has several options, I used the jedis Java library which has support for everything we’re interested in.

Wrapping up

I have early - read: with lots of room for improvements, and a few corners cut - implementations of the protocol, both the agent and controller code in ruby, and the controller code in clojure, wrapped in my IRC bot in clojure, which might warrant another article.

The code can be found here: https://github.com/pyr/amiral (name alternatives welcome!)

If you just want to try out, you can fetch the amiral gem in ruby, and start an agent like so:

$ amiral.rb -k /path/to/privkey agent

You can then test querying the agent through a controller:

$ amiral.rb -k /path/to/privkey controller uptime
accepting acknowledgements for 2 seconds
got 1/1 positive acknowledgements
got 1/1 responses
phoenix.spootnik.org: 09:06:15 up 5 days, 10:48, 10 users,  load average: 0.08, 0.06, 0.05

If you’re feeling adventurous you can now start the clojure controller, it’s configuration is relatively straightforward, but a bit more involved since it’s part of an IRC + HTTP bot framework:

{:transports {amiral.transport.HTTPTransport {:port 8080}
              amiral.transport.irc/create    {:host "irc.freenode.net"
                                              :channel "#mychan"}}
 :executors {amiral.executor.fleet/create    {:keytype :dss
                                              :keypath "/path/to/key"}}}

In that config we defined two ways of listening for incoming controller requests: IRC and HTTP, and we added an “executor” i.e: a way of doing something.

You can now query your hosts through HTTP:

$ curl -XPOST -H 'Content-Type: application/json' -d '{"args":["uptime"]}' http://localhost:8080/amiral/fleet
{"count":1,
 "message":"phoenix.spootnik.org: 09:40:57 up 5 days, 11:23, 10 users,  load average: 0.15, 0.19, 0.16",
 "resps":[{"in_reply_to":"94ab9776-e201-463b-8f16-d33fbb75120f",
           "uuid":"23f508da-7c30-432b-b492-f9d77a809a2a",
           "status":"complete",
           "output":{"exit":0,
                     "time":"09:40:57",
                     "since":"5 days, 11:23",
                     "users":"10",
                     "averages":["0.15","0.19","0.16"],
                     "short":"09:40:57 up 5 days, 11:23, 10 users,  load average: 0.15, 0.19, 0.16"},
           "hostname":"phoenix.spootnik.org"}]}

Or on IRC:

09:42 < pyr> amiral: fleet uptime
09:42 < amiral> pyr: waiting 2 seconds for acks
09:43 < amiral> pyr: got 1/1 positive acknowledgement
09:43 < amiral> pyr: got 1 responses
09:43 < amiral> pyr: phoenix.spootnik.org: 09:42:57 up 5 days, 11:25, 10 users,  load average: 0.16, 0.20, 0.17

Next Steps

This was a fun experiment, but there are two outstanding problems which will need to be addressed quickly

  • Tests test tests. This was a PoC project to start with, I should have known better and wrote tests along the way.
  • The queue based reply handling makes controller logic complex, and timeout handling approximate, it should be switched to pub-sub
  • The signing should be done based on known hosts’ public keys instead of the shared key used now.
  • The agent should expose more common actions: service interaction, puppet runs, etc.

          [XenServer] 安裝與新增HD        
安裝注意: On Server: XenServer 7.0 1. 第一次安裝XenServer時,請在Bios中取消UEFI,使用Legacy。在HP Workstation中,請直接使用Legacy DVD開機,才能安裝XenServer。 2. 同時Bios中還需要到 Security >>> Virtualization Technology >>>Enable。啟用這個功能,才能裝Guest OS。 3. 安裝時請使用DVD和固定IP較佳。 4. 使用DVD開機後進入Welcome to XenServer後,按說明選擇安裝。 5. 安裝完後,即可使用SSH遠端連入。     On Client: XenCenter 1. for wins x64,請直接安裝XenCenter-setup.exe。 2. 啟用後請直接Add new server,輸入ip,輸入帳號密碼,即可遠端管理XenServer。 下載地址:http://xenserver.org/open-source-virtualization-download.html 如果到官網下載,需先sign up。   新增HD:因為XenServer是Linux系統,可在console或是ssh遠端連入後,在command下操作: # xe host-list  //檢查host uuid (也可以在XenCenter中查詢,但不知為何查下來的資料系統說不認識)           uuid (RO): dab1a2b9-1603-4704-b0cb-aaaaaaaaaaaa           name-label ( RW): Server-XenServer           name-description ( RW): Default install # ll /dev/disk/by-id  //查詢new hd的id total 0 lrwxrwxrwx 1 root root  9 Aug 17 16:04 ata-hp_CDDVDW_SU-208GB_xxxxxxxxxxxxxxxx -> ../../sr0 lrwxrwxrwx 1 root root  9 Aug 17  2016 ata-xxxxxx_SSDSC2KW240H6_xxxxxxxxxxxxxxxxx -> ../../sdb  ←這顆是XenServer的安裝HD。是開機HD。 lrwxrwxrwx 1 root root  9 Aug 17  2016 ata-ST1000DM003-1ER162_xxxxxxxxxxxxxxxx -> ../../sda   ←這顆是新增的HD。 lrwxrwxrwx 1 root root 10 Aug 17  2016 dm-name-VG_XenStorage--89674aa4--b51a--6216--98cb--xxxxxxxxxxxxxx-MGT -> ../../dm-0 lrwxrwxrwx 1 root root 10 Aug 17  2016 dm-uuid-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -> ../../dm-0 lrwxrwxrwx 1 root root  9 Aug 17  2016 wwn-xxxxxxxxxxxxxxxx -> ../../sda lrwxrwxrwx 1 root root  9 Aug 17  2016 wwn-xxxxxxxxxxxxxxxxx -> ../../sdb # xe sr-create content-type=user device-config:device=/dev/disk/by-id/ata-ST1000DM003-1ER162_xxxxxxxxxxxxxxxx host-uuid=dab1a2b9-1603-4704-b0cb-aaaaaaaaaaaa name-label="local storage 2" shared=false type=lvm 如果沒有錯誤訊息,只是跑出一排數字,就是完成了。 如果是給Linux用,最後的type=ext。lvm是給windows用的。 範例: # xe sr-create content-type=user device-config:device=/dev/disk/by-id/ata-ST3000DM008-2DM166_Z504G31M host-uuid=23866b8b-2695-4801-a13c-360c9e697be9 name-label="3T" shared=false type=ext fb8fb8b3-cddf-5643-d5bc-0ff606d6eec1 ↑ 硬碟越大,時間越長,要等到有這個數字出現,HD才有mount並且connected完成。   # xe pbd-list     //用來檢查這台機器上有哪些HD。可以看到這台機器掛了二顆實體HD,一顆是SSD,一顆是3T的HD。 uuid ( RO)                  : 4a13c891-bae9-4414-5e53-2c29df9ccba8              host-uuid ( RO): 23866b8b-2695-4801-a13c-360c9e697be9                sr-uuid ( RO): 5d05f07d-bc3b-7c43-52d4-15026ae5d977          device-config (MRO): path: /opt/xensource/packages/iso; location: /opt/xensource/packages/iso; legacy_mode: true     currently-attached ( RO): true uuid ( RO)                  : 742cf737-cfb9-b910-0ece-45dfd185785c              host-uuid ( RO): 23866b8b-2695-4801-a13c-360c9e697be9                sr-uuid ( RO): f3541f79-37db-bac2-1b84-eff48f23e258          device-config (MRO): device: /dev/disk/by-id/ata-INTEL_SSDSC2KW240H6_CVLT615506EC240CGN-part3     currently-attached ( RO): true uuid ( RO)                  : 883ad8d3-9c71-3c7d-3a26-5de8c9cbca43              host-uuid ( RO): 23866b8b-2695-4801-a13c-360c9e697be9                sr-uuid ( RO): df2160e1-c95f-35e3-bf31-b03d82f24d82          device-config (MRO): location: /dev/xapi/block     currently-attached ( RO): true uuid ( RO)                  : c168a6c1-91fe-b55a-e385-27f72fa4b2aa              host-uuid ( RO): 23866b8b-2695-4801-a13c-360c9e697be9                sr-uuid ( RO): fb8fb8b3-cddf-5643-d5bc-0ff606d6eec1          device-config (MRO): device: /dev/disk/by-id/ata-ST3000DM008-2DM166_Z504G31M     currently-attached ( RO): true uuid ( RO)                  : 4a86b079-e362-fd03-502b-3ab25546661e              host-uuid ( RO): 23866b8b-2695-4801-a13c-360c9e697be9                sr-uuid ( RO): 365e74d4-ef7e-dc93-d45b-8e12ffcd53fc          device-config (MRO): location: /dev/xapi/cd     currently-attached ( RO): true   回到XenCenter中,重新讀取這台XenServer,就會看到新增的HD出現了,可以加在New VMs中了。   參考資訊: http://support.citrix.com/article/CTX121313 http://support.citrix.com/article/CTX131386 https://discussions.citrix.com/topic/282610-the-sr-operation-cannot-be-performed-because-a-device-underlying-the-sr-is-in-use-by-the-host/
          The Woman In Black        

The Woman In Black (Movie Review)

Director: James Watkins | Release Date: 2012

On the Web

The Woman In Black

director: 
James Watkins
Release Date: 
2012
7

“The Woman in Black,” starring Daniel Radcliffe, is a film that relies upon atmosphere. It practically oozes it, from the beginning scenes of Victorian London (dank, sorrowful, and dirty) to the dilapidated haunted manor that takes up much of the film’s setting. Unfortunately, atmosphere alone can’t carry a film, and in the end “The Woman in Black” is a good movie but I wouldn’t go so far as to call it great.

Radcliffe plays Arthur Kepps, a young attorney whose wife passed away a few years earlier in childbirth. He’s raising his son alone now (well, he has help from a very fetching nanny who doesn’t speak much), and battling what appears to be a very deep depression. When we first see him he’s holding a straight razor against his throat a little longer than he needs to. He is failing at work, and his firm sends him to a remote English village named Cryphin Gifford to review documentation at the Eel Marsh House. It seems the lady of the house recently died and there are some issues with her will.

I know, I know, nothing says horror like reviewing probate documentation. But Kepps leaves for the village and along the way meets Mr. Daily (played by Ciarán Hinds), a resident of Cryphin Gifford and perhaps the only sensible person left there. Everyone else seems gripped by fear and wants nothing to do with Kepps and his work. These first scenes of the village are reminiscent of “Dracula,” where the townsfolk know there is an ancient evil just waiting to burst out.

Of course, it’s not long before Kepps goes to Eel Marsh House, and the tension grows. The house itself is a perfect example of what a haunted house should be—old and decaying, separated from the village, sitting alone in the middle of a muddy marsh. It’s here that Kepps learns more about the woman, and why the village hates her so. It’s a story of insanity and murdered children, and it’s a pretty good tale.

Huge chunks of the rest of the movie take place at Eel Marsh, but while the first few scenes there provide some decent scares, they get old fast. The producers went to the “let’s have Radcliffe wander the halls in the dark with a candle in one hand and an axe in the other” well just a few times too many. This is not a criticism of Radcliffe, however, who does an admirable job (especially considering how much of the film is just him wordlessly reacting to letters or inspecting random noises in the house).

The pace picks up again when Kepps returns to the village, although the moody atmosphere never changes. Children die, villagers become more violent towards him, and Kepps and Daily try to solve the mystery surrounding the ghost. It doesn’t take time to realize that this is one very dour movie. The film’s only attempt at humor involve Daily’s wife at a dinner table, although even that scene quickly turns grim. It’s unfortunate “The Woman in Black” didn’t try its hand at a little more of this sarcastic humor.

I would be remiss if I didn’t mention the ending. Although getting there was a bit of a chore, I loved the ending to “The Woman in Black.” It went against convention and gave an ending that wasn’t just a jump scare and preview to a sequel, but gave suitable closure to the film.


          Pig Hunt        

Pig Hunt (Movie Review)

Director: James Isaac | Release Date: 2008

On the Web

Pig Hunt

director: 
James Isaac
Release Date: 
2008
7

Hemp, hicks, hunters, hippies and hogs; this would be a reasonable tagline for the 2008 creature feature “Pig Hunt”. Alas the actual tag is “Get Muddy, Get Bloody, Kill or be Killed”, which is more in line with the film’s German title “Pig Hunt-Dreck, Blut, and Schweine”. The film was shot near my neck of the woods, specifically Boonville, California. And yes for those of you scoring at home that means that this movie about hillbillies was literally shot in the Boonies. In addition to its apropos location the filmmakers pulled a minor coup by getting local celebrity and anomalous bass meister Les Claypool to act in and contribute original music to their little trip into the backwoods. Add to the mix the director of “Skinwalkers” and your expectations might go from quirky blood-soaked woodland high jinx to a protracted trip down a flight of stairs with Claypool’s exaggerated, drawling vocal mockery echoing through 99 minutes of torment.

“Pig Hunt” begins with a panicked hunter meeting a tusky end and quickly moves us onto a protagonist roll call. The group is a feckless phalanx of four weekend sportsmen: John, Quincy, military reservist Ben, and Wayne. They are joined, to the chagrin of the Ben and Wayne by John’s girlfriend Brooks. This SUV of fools leaves the cozy squats of San Francisco for a boar hunting weekend on property owned by John’s Uncle (who is the hunter we saw killed at the outset). Quickly we learn that John has some demons in and around his ancestral hunting grounds. Two of these demons come calling in the form of old redneck shooting friends Jake and Ricky. The crass and cantankerous duo forges an uneasy alliance with John’s band of huntsmen in order to bag more boars, and with their inclusion the group morphs into a sort of continuum of testosterone that bears little chance of avoiding a violent dispute.

Just before the group is attacked by a battery of big baby boars Jake regales the others with the tale of a local 3,000lbs pig called the Ripper. John confutes the claim but as they press on into the dense timber the hunters find clues that something big and hungry is very close by. After the accidental discovery of a vast pot plantation, Ben shoots Ricky to protect John and Jake vows revenge. Shortly after the shooting the Ripper shows up and starts picking off the boar-stalkers, fortunately John and Brooks encounter a scimitar wielding hippie guru who promises them safe passage. As the hunters make their way out of the forest the hillbillies set out after them with vengeance burning off their moonshine buzz. Pigs, patchouli and pot converge and in a finale that sees John and Brooks facing down the Ripper in a muddy battle wit and will.

“Pig Hunt” has all the necessary components to be a scatterbrained mess. An overstuffed plot, a giant creature effect, and an ensemble cast of modeling agency talent are all points on the Scary Madison/ Platinum Dunes circuit diagram. This formula generally yields a specious, antiseptic procession of latter day boulevardiers slumming in Kryolan mud while expertly communicating the filmmakers’ snooty contempt for horror fans. I am happy to report that this big pig story only steps in such mud holes momentarily.

The most pleasantly surprising thing about the successes of “Pig Hunt” is that they are due to a capable directorial hand. With only three films in his helmer's canon I am gonna go out on a limb and say that this is the James Isaacs that gave us the unreasonably fun “Jason X” and not the one who rendered the werewolf dull-a-thon “Skinwalkers’. With “Pig Hunt” he generates a strong story trajectory and backs it up with an immersive off-kilter environment. Add to this the production’s devotion to high quality practical FX and creature design and a really energetic redneck rampage sequence and you have a movie with a lot life pumping through its porcine heart.

Sadly, on the hoof, there is plenty to dislike about “Pig Hunt”, too. The cast is mostly a bunch of starchy headshots who never leave the written page long enough to even accidentally embody their characters. The dialog, especially the hick-speak is just plum awful, dadgummit. The bonds between the characters also suffer for the poor performances, leaving the audience to wonder how and why the friends became friends in the first place. The film is a mixed bag technically as well; good framing and solid, rhythmic editing stand cheek by jowl with amateurish conversation blocking, and cutting that too often refuses to employ a “kill your darlings” approach. The last significant complaint I have is around the film's war metaphor which has moments of symbiosis with the narrative but overall seems more muddled through than fleshed out to a satisfactory degree.

“Pig Hunt” may rub you the wrong way. It certainly isn’t a ground breaking film and it has the kind of problems that can alienate an audience that isn’t inclined to forgive shortcomings. On the other hand, the pitch-shifting of the story lines up well with Les Claypool’s soundtrack contributions to make this trip to the wilds of Boonville feel heterodoxical to most hillbilly inclusive horror romps. In my mind this makes it worth at least one pass through your DVD player, even if I still think I could write a better tagline.


          admin on "Problem with uuid in RSS output"        

Sorry, it seems that 'guid' tag cannot be a reason here, as it contains no mistake in the given example. The standard documentation states that the value can be whatever you may want since its attribute is set to 'false' (quotation: guid must be a full URL, unless isPermaLink attribute is false; source: https://validator.w3.org/feed/docs/error/InvalidPermalink.html)


          Arnold Burian on "Problem with uuid in RSS output"        

Hey guys - love your service, but I'm having a strange problem. Some RSS readers/parsers get confused by the "guid ispermalink" link in your outputs. For example:

<guid isPermaLink="false">urn:uuid:51a4a442-66e2-8629-e723-3f1d88ea8945</guid>

So I can't use your service because the clickable hyperlink ends up opening up a bad link (the uuid as above). When I reach out to them, they tell me the problem is with the RSS feed format, and that should be fixed.

Any thoughts or suggestions?

Thank you!


          Maniac (remake)         

Maniac (remake) (Movie Review)

Director: Franck Khalfoun | Release Date: 2012

On the Web

Maniac (remake)

director: 
Franck Khalfoun
Release Date: 
2012
8

“Maniac,”starring Elijah Wood as the maniac killer, is a remake of a 1980 slasher of the same name, and while the recent trend of pointless and half-assed remakes has turned many horror fans off of remakes altogether, I think this is the kind of movie that shows exactly the type of potential that remakes have by showcasing a level of care and craftsmanship that is rare for a horror film, let alone a horror film remake.

“Maniac” tells the story of Frank, a serial killer who was traumatized by seeing his mother work as a prostitute while he was a child. Despite the fact that his mother is now dead, he is driven to kill by his attachment to his mother, who he believes doesn’t want him to have any sort of relationship with other women, and also by his emasculation by the women in his life.

The film explores Frank’s perceived emasculation at length, and his new relationship with Anna, a beautiful young artist with which he becomes enamored with, is a sort of microcosm of how Frank feels emasculated by all women. Frank works as someone who restores old mannequins, and at one point Frank sees himself with no genitals, as a human torso on top of a mannequin’s waist and legs. After a few “dates” with Anna he finds out that Anna already had a boyfriend. When Frank finally meets the boyfriend it is an African American man, which I thought was a pretty bold choice considering how politically incorrect it is, despite the fact that it hammers home how sexually inadequate Frank feels about himself as a small, delicately featured, white man. Frank finds out from Anna’s boyfriend that Anna thought he was gay the entire time she’d been seeing him, which of course, emasculates Frank even further.

At one point in the movie Frank is shown as a child watching his mother having sex with two customers. Although I’m sure this would traumatize anyone, while watching the movie I was really confused by how this would later motivate Frank to kill women. However I think is also meant to be another scene in the movie where Frank is emasculated. In Freudian psychology young boys have what is called an “Oedipus complex” where they wish to replace their father and have sex with their mother. I believe seeing his mother have sex with these men is meant to show that he is again sexually inadequate for women, only this time the woman is his mother (This is kind of extra creepy idea in this context, because in this scene he is essentially being “cuckolded” in front of his mother). I think this is a little bizarre to see in movie in 2013 when Freudian psychology and Oedipus complexes are fairly outdated ideas and Freud is almost never referenced in popular culture the way he once was. I realize that when the original movie was written Freud was much more popular, but I think it might have helped this movie a little bit to make it a little more clear why this moment specifically emasculates Frank, when I think the modern audience will pretty baffled by a reference to something that is so outdated most people probably won’t even know what it is.

The majority of film is shot from a first-person POV perspective from Frank’s viewpoint which allows all the anxiety of found-footage film, but in this case, without all the annoying shaky-cam, low-quality visuals, or annoying scenes that try to justify why everything you are seeing is being video recorded. I found the POV style of the movie was especially effective in that it makes the viewer incredibly uncomfortable by putting them in the perspective of a stalker and violent murderer.

The opening minutes of the movie show him following a frightened young woman, which is incredibly uncomfortable to watch, because the viewer feels like they are both seeing and doing something that they shouldn’t be. It does become a little distracting after a while however, because whenever the director wants you to know what Wood’s character is feeling he has to find a creative way to sneak a mirror or a video monitor into the scene. Once the movie gets going the director does relax a little on the POV shots, and show some third-person perspective, which I felt was really helpful in keeping the film from being bogged down by the constraints of first-person perspective.

One of the more interesting aspects of the film is that while Frank stalks and murders his victims the settings are immaculately clean, tidy, and at points even luxurious, while his home and inner world are cluttered and disgusting. I imagine this was to show the difference between how Frank viewed his relationship with women in such a perfect and idealized way, while the reality of his life was completely the opposite.

The POV style also is also effective as portraying Frank as a “sympathetic monster” by showing him when he is vulnerable and wrestling with his inner demons. At one point Anna calls Frank “Dr. Frankenstein,” and the killer's name is Frank which also hammers home the idea of the sympathetic monster. While this theme is interesting, I have to wonder if audiences will connect with it considering the extreme and exploitative nature of the violence in the movie. This movie is so realistic and so incredibly violent that I think the idea of seeing the humanity in a serial killer is probably lost while wallowing in extended murder scenes that feature some of the most disturbing gore I can remember seeing in a horror movie.

The most impressive thing about “Maniac” is how great it looks visually. The entire film looks amazing, and while I don’t think every single special effect is practical, the majority of the gore looks so real it is almost sickening. The amount of care that went into making this movie look amazing is something that makes me really hope studios and horror film-makers take notice and start putting a priority on fantastic practical effects.

This movie is so violent that I absolutely can’t recommend it to the normal viewer, but if you’re a big horror fan I think this is something you will definitely want to check out. “Maniac” really raises the bar for what our expectations of a horror remake should be, and I believe this is a movie that people are going to be talking about for a long time to come.


          The Holy Mountain (La Montana Sagrada)        

The Holy Mountain (La Montana Sagrada) (Movie Review)

Director: Alejandro Jodorowsky | Release Date: 1973

On the Web

The Holy Mountain (La Montana Sagrada)

director: 
Alejandro Jodorowsky
Release Date: 
1973
8

I’ve been reading some of the reviews from people who have been to screenings of Rob Zombie’s latest film and they all point to Alejandro Jodorowsky as a huge influence. I’ve been really psyched about this movie, and since God only knows when we’ll get to see a wide release of “The Lords of Salem,” I figured the next best thing would be to watch something by Jodorowsky instead.

After watching “The Holy Mountain” I feel like I made a really good choice because what I found was a two hour parade of crazy images, acid-influenced religious exploration, genital mutilation, toilet humor, and more-or-less nonstop insanity.

The first part of the movie introduces a buffoonish Christ-figure, known only as “The thief,” while lambasting the Catholic Church as it shows things like: soldiers making a cast of the thief so they can turn a profit by selling hundreds of crucifixes, the Pope sleeping in bed with a crucifix, and nuns dressed as prostitutes.

The rest of the movie can’t be summed up easily because it relies so heavily on stream-of-consciousness imagery, and because there isn’t exactly much of a plot arc; but I’ll describe the following scene so you can get a feel for what kind of craziness “The Holy Mountain” is all about: Eventually the thief ascends an enormous tower, via giant fishhook and rope, where he crawls through a huge tube and enters a giant rainbow colored room where he finds “The Alchemist,” played by Jodorowsky himself, sitting in between two goats. They have a ridiculous fight where the alchemist beats the thief into submission using some kind of extremely awkward form of martial arts. Then the alchemist and a naked woman give the thief a bath in a pool with a baby hippo, which closes with an extended shot of the thief getting his butt-hole scrubbed clean with a sponge. The alchemist has the thief shit in a pot and they cook his turd while the thief has to sit in a glass dome and breath the fumes in, as the shit eventually turns into gold.

From here on out the movie is almost indescribable because it becomes even more strange and less coherent; but basically the thief/Christ-figure ascends a “holy mountain” with a group of sages in search for enlightenment.

On one hand this movie is really preachy and pretentious, but on the other hand it is impossible to take seriously because it is filled with so many silly images and toilet humor (for instance two women fondle a giant penis ice sculpture, and later two cows have sex while a women gets a face full of white glop). The movie is so ridiculous that I wondered if all the pretentious religious themes sandwiched between dick-jokes was all just a parody of art house films in general. However, according to Wikipedia ( Hyperlink: http://en.wikipedia.org/wiki/The_Holy_Mountain_%281973_film%29 ) Jodorowsky was influenced by LCD and at one point of the movie had the actors take hallucinogenic mushrooms. None of this is exactly a shock, and with that in mind, I would guess that this movie was meant to be taken seriously.

If I have any complaints about this movie it would mostly be how incredibly sacrilegious it is towards Catholicism in the opening scenes of the movie, but then presents an extremely positive view of a mish-mash of various other religions/philosophies including: Kabbalah, Rosicrucianism, Taoism, Alchemy, and Tarot. The way Jodorowsky spits on Catholicism and then presents religions he seems to find more “enlightened” reminds me a lot of something I read by religious scholar Elaine Pagels (Hyperlink: http://www.amazon.com/Origin-Satan-Christians-Demonized-Heretics/dp/0679... ). Pagels said that newer religions usually demonize older religions as a way to establish their own legitimacy. For example she argued that Judaism co-opted the image of the serpent from an older Babylonian religion (Zoroastrianism if I remember correctly), and in doing so they demonized what the Babylonians knew as the goddess “Tiamat,” as a way to help establish Judaism as a legitimate religion. This isn’t exactly a logical argument, but it is more of just a way to bully people into believing what you want them to, while at the same time cannibalizing an older competing belief.

However overall I thought this was a really fun exploitation movie with a lot of very impressive imagery. Plus it felt well paced, which is pretty impressive for a two-hour movie where most of the scenes and images seem completely unrelated. Beyond all that I think the movie has even more value as a genuine time-capsule of it’s era. Being released in 1973, toward the tail-end of the Vietnam War, “The Holy Mountain” crystallizes a lot of the attitudes and elements of the era including: anger about the war and militarism in general, dissolution and rejection of traditional institutions like the Church and government, and exploration of hallucinogenic drugs and Eastern religions.

I can understand if someone might be turned off by the sacrilegious nature of the movie or the nearly incoherent story, but if any of this sounds interesting to you, or if you think that you’d enjoy a movie where the characters shout things like: "Rub your clitoris against the mountain!” or “Your sacrifice completes my sanctuary of 1,000 testicles,” I think “The Holy Mountain” might be right up your alley.


          Blind Beast        

Blind Beast (Movie Review)

Director: Yasuzô Masumura | Release Date: 1969

On the Web

Blind Beast

director: 
Yasuzô Masumura
Release Date: 
1969
7

Every now and then I’ll stumble across a movie at my university library that I imagine someone must have snuck by an unwitting librarian. Such is the case with "Blind Beast", a bizarre Japanese sexploitation film from 1969.

Blind Beast tells the story of a blind sculptor who is so obsessed with a particular nude model that he decides to kidnap her with the help of his mother, and take her back to his art studio in the hopes of creating an entirely new genre of art for blind people (and doing a lot of groping).

The movie opens up with the sculptor feeling up a statue of the model, while she watches him as she hides, and then begins moaning as the intensity of his fondling the statue intensifies. Things only get stranger from here on out.

The sculptor and his mother use chloroform to kidnap the model and take her back to his art studio/rape dungeon. The model wakes up, terrified and confused, in total darkness and the sculptor reveals his enormous studio to her one wall at a time. Each section of the wall of his studio is covered in sculptures of a particular body part. So there is a wall of eyes, legs, arms, boobs, and so on. If all of this isn’t weird enough, in the middle of the studio are two enormous sculptures of naked women lying on the floor.

The sculptor eventually rapes the model, which the film leads you to believe she enjoys. It’s a small moment in the film and one I think you could write off as “Stockholm syndrome,” however this type of creepy rape-fantasy is something that appears in a lot of low-brow Japanese media, (If you don’t believe me, just watch the Criterion selection- "Hanzo the Razor: Sword of Justice"). This is the movie’s most genuinely exploitative moment, and it is glossed over so quickly that I think it is important to note.

This transitions the movie from a story about captivity and crazy art, into a downward spiral of depraved sex that involves biting, cutting with knives, drinking blood, and then eventually turns deadly. This is by far the best part of the movie and the actors really let loose with some strong, yet wild performances. You can tell the director really only cared about the scenes of crazy sexuality, as other transitional scenes seem mostly thrown together without nearly as much thought or preparation.

Blind Beast is very artistic visually, yet if there is a purpose beneath all the insanity the director isn’t clear about what it is. At one point the sculptor rambles on about “touch” being the greatest sensation, and at another point he rants about hypocritical artists who think what he does is trashy. These are small moments and so loosely connected that they don’t seem to underlay any greater purpose. What this movie really seems to boil down to is a genuine obsession with sadomasochism and the guilt this obsession produces.

But all that said, don’t expect Blind Beast to be a total sleaze-fest; for being a movie about crazy and abusive sex, it is almost prudish when it comes it’s portrayal of actual nudity. Strangely enough the director seems to go out of his way to hide the actors' nudity during their sex-scenes, despite the fact that they are going at it in-between the enormous boobs of a 50-foot long statue next to a wall of boobs and various other lady-bits.

As old as this movie is, I feel like it is still a pretty wild film by today’s standards, and I can only imagine what someone who saw this in 1969 must have thought (However someone seeing it back then would have probably snuck into the theater wearing a giant trenchcoat).

Besides all the crazy imagery and wild sex, I think "Blind Beast" is an endearing film. It's genuine sexploitation, but it isn’t a movie that will leave you feeling disgusted and running for a shower after watching it, like many other similar films might. It's both artsy and low-brow, and there is absolutely no hint of irony, which all modern “exploitation” films seem to wallow in. These attributes make "Blind Beas"t a very entertaining movie.

Top Stories