FLOSS Project Planets

Bryan Pendleton: Transactional replicated databases using consensus algorithms

Planet Apache - Mon, 2014-07-21 13:59

A trendy thing nowadays is to build a transactional replicated database without using two phase commit, but using a different type of consensus algorithm.

The gold standard in this area is Google's F1 database, which is built on top of their Spanner infrastructure, which in turn is built on their production-quality implementation of the Paxos consensus algorithm.

Now other, similar systems are starting to emerge, demonstrating that one way to get attention in the world is to hire some Google engineers who worked on-or-near Spanner and/or F1 and/or Paxos, and build something yourself.

  • Man Busts Out of Google, Rebuilds Top-Secret Query MachineUnder development for the past two years, Impala is a means of instantly analyzing the massive amounts of data stored in Hadoop, and it’s based on a sweeping Google database known as F1. Google only revealed F1 this past May, with a presentation delivered at a conference in Arizona, and it has yet to release a full paper describing the technology. Two years ago, Cloudera hired away one of the main Google engineers behind the project, a database guru named Marcel Kornacker.
  • In Search of an Understandable Consensus Algorithm (Extended Version)Raft is a consensus algorithm for managing a replicated log. It produces a result equivalent to (multi-)Paxos, and it is as efficient as Paxos, but its structure is different from Paxos; this makes Raft more understandable than Paxos and also provides a better foundation for building practical systems.
  • Introducing Ark: A Consensus Algorithm For TokuMX and MongoDBArk is an implementation of a consensus algorithm (also known as elections) similar to Paxos and Raft that we are working on to handle replica set elections and failovers in TokuMX. It has many similarities to Raft, but also has some big differences.
  • Ark: A Real-World Consensus ImplementationArk was designed from first principles, improving on the election algorithm used by TokuMX, to fix deficiencies in MongoDB’s consensus algorithms that can cause data loss. It ultimately has many similar- ities with Raft, but diverges in a few ways, mainly to support other features like chained replication and unacknowledged writes.
  • Out in the Open: Ex-Googlers Building Cloud Software That’s Almost Impossible to Take DownBut if anyone is up for the challenge of rebuilding Spanner—one of the most impressive systems in the history of computing—it’s the CockroachDB team. Many of them were engineers at Google, though none of them worked on Spanner.
  • Cockroach: A Scalable, Geo-Replicated, Transactional DatastoreCockroach is a distributed key/value datastore which supports ACID transactional semantics and versioned values as first-class features. The primary design goal is global consistency and survivability, hence the name. Cockroach aims to tolerate disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention. Cockroach nodes are symmetric; a design goal is one binary with minimal configuration and no required auxiliary services.
  • CockroachSingle mutations to ranges are mediated via an instance of a distributed consensus algorithm to ensure consistency. We've chosen to use the Raft consensus algorithm. All consensus state is stored in RocksDB.

Just so there's no confusion, let me be clear about one thing:

I am not building a consensus algorithm.

But I enjoy reading about consensus algorithms!

Categories: FLOSS Project Planets

Mike Driscoll: Python 101: An Intro to Pony ORM

Planet Python - Mon, 2014-07-21 13:15

The Pony ORM project is another object relational mapper package for Python. They allow you to query a database using generators. They also have an online ER Diagram Editor that is supposed to help you create a model. They are also one of the only Python packages I’ve seen with a multi-licensing scheme where you can develop using a GNU license or purchase a license for non-open source work. See their website for additional details.

In this article, we will spend some time learning the basics of this package.

Getting Started

Since this project is not included with Python, you will need to download and install it. If you have pip, then you can just do this:


pip install pony

Otherwise you’ll have to download the source and install it via its setup.py script.

Creating the Database

We will start out by creating a database to hold some music. We will need two tables: Artist and Album. Let’s get started!

import datetime import pony.orm as pny   database = pny.Database("sqlite", "music.sqlite", create_db=True)   ######################################################################## class Artist(database.Entity): """ Pony ORM model of the Artist table """ name = pny.Required(unicode) albums = pny.Set("Album")   ######################################################################## class Album(database.Entity): """ Pony ORM model of album table """ artist = pny.Required(Artist) title = pny.Required(unicode) release_date = pny.Required(datetime.date) publisher = pny.Required(unicode) media_type = pny.Required(unicode)   # turn on debug mode pny.sql_debug(True)   # map the models to the database # and create the tables, if they don't exist database.generate_mapping(create_tables=True)

Pony ORM will create our primary key for us automatically if we don’t specify one. To create a foreign key, all you need to do is pass the model class into a different table, as we did in the Album class. Each Required field takes a Python type. Most of our fields are unicode, with one being a datatime object. Next we turn on debug mode, which will output the SQL that Pony generates when it creates the tables in the last statement. Note that if you run this code multiple times, you won’t recreate the table. Pony will check to see if the tables exist before creating them.

If you run the code above, you should see something like this get generated as output:

GET CONNECTION FROM THE LOCAL POOL PRAGMA foreign_keys = false BEGIN IMMEDIATE TRANSACTION CREATE TABLE "Artist" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL )   CREATE TABLE "Album" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT, "artist" INTEGER NOT NULL REFERENCES "Artist" ("id"), "title" TEXT NOT NULL, "release_date" DATE NOT NULL, "publisher" TEXT NOT NULL, "media_type" TEXT NOT NULL )   CREATE INDEX "idx_album__artist" ON "Album" ("artist")   SELECT "Album"."id", "Album"."artist", "Album"."title", "Album"."release_date", "Album"."publisher", "Album"."media_type" FROM "Album" "Album" WHERE 0 = 1   SELECT "Artist"."id", "Artist"."name" FROM "Artist" "Artist" WHERE 0 = 1   COMMIT PRAGMA foreign_keys = true CLOSE CONNECTION

Wasn’t that neat? Now we’re ready to learn how to add data to our database.

How to Insert / Add Data to Your Tables

Pony makes adding data to your tables pretty painless. Let’s take a look at how easy it is:

import datetime import pony.orm as pny   from models import Album, Artist   #---------------------------------------------------------------------- @pny.db_session def add_data(): """"""   new_artist = Artist(name=u"Newsboys") bands = [u"MXPX", u"Kutless", u"Thousand Foot Krutch"] for band in bands: artist = Artist(name=band)   album = Album(artist=new_artist, title=u"Read All About It", release_date=datetime.date(1988,12,01), publisher=u"Refuge", media_type=u"CD")   albums = [{"artist": new_artist, "title": "Hell is for Wimps", "release_date": datetime.date(1990,07,31), "publisher": "Sparrow", "media_type": "CD" }, {"artist": new_artist, "title": "Love Liberty Disco", "release_date": datetime.date(1999,11,16), "publisher": "Sparrow", "media_type": "CD" }, {"artist": new_artist, "title": "Thrive", "release_date": datetime.date(2002,03,26), "publisher": "Sparrow", "media_type": "CD"} ]   for album in albums: a = Album(**album)   if __name__ == "__main__": add_data()   # use db_session as a context manager with pny.db_session: a = Artist(name="Skillet")

You will note that we need to use a decorator caled db_session to work with the database. It takes care of opening a connection, committing the data and closing the connection. You can also use it as a context manager, which is demonstrated at the very end of this piece of code.

Using Basic Queries to Modify Records with Pony ORM

In this section, we will learn how to make some basic queries and modify a few entries in our database.

] import pony.orm as pny   from models import Artist, Album   with pny.db_session: band = Artist.get(name="Newsboys") print band.name   for record in band.albums: print record.title   # update a record band_name = Artist.get(name="Kutless") band_name.name = "Beach Boys"

Here we use the db_session as a context manager. We make a query to get an artist object from the database and print its name. Then we loop over the artist’s albums that are also contained in the returned object. Finally, we change one of the artist’s names.

Let’s try querying the database using a generator:

result = pny.select(i.name for i in Artist) result.show()

If you run this code, you should see something like the following:


i.name
--------------------
Newsboys
MXPX
Beach Boys
Thousand Foot Krutch

The documentation has several other examples that are worth checking out. Note that Pony also supports using SQL itself via its select_by_sql and get_by_sql methods.

How to Delete Records in Pony ORM

Deleting records with Pony is also pretty easy. Let’s remove one of the bands from the database:

import pony.orm as pny   from models import Artist   with pny.db_session: band = Artist.get(name="MXPX") band.delete()

Once more we use db_session to access the database and commit our changes. We use the band object’s delete method to remove the record. You will need to dig to find out if Pony supports cascading deletes where if you delete the Artist, it will also delete all the Albums that are connected to it. According to the docs, if the field is Required, then cascade is enabled.

Wrapping Up

Now you know the basics of using the Pony ORM package. I personally think the documentation needs a little work as you have to dig a lot to find some of the functionality that I felt should have been in the tutorials. Overall though, the documentation is still a lot better than most projects. Give it a go and see what you think!

Additional Resources

Categories: FLOSS Project Planets

Daniel Pocock: Australia can't criticize Putin while competing with him

Planet Debian - Mon, 2014-07-21 13:00

While much of the world is watching the tragedy of MH17 and contemplating the grim fate of 298 deceased passengers sealed into a refrigerated freight train in the middle of a war zone, Australia (with 28 victims on that train) has more than just theoretical skeletons in the closet too.

At this moment, some 153 Tamil refugees, fleeing the same type of instability that brought a horrible death to the passengers of MH17, have been locked up in the hull of a customs ship on the high seas. Windowless cabins and a supply of food not fit for a dog are part of the Government's strategy to brutalize these people for simply trying to avoid the risk of enhanced imprisonment(TM) in their own country.

Under international protocol for rescue at sea and political asylum, these people should be taken to the nearest port and given a humanitarian visa on arrival. Australia, however, is trying to lie and cheat their way out of these international obligations while squealing like a stuck pig about the plight of Australians in the hands of Putin. If Prime Minister Tony Abbott wants to encourage Putin to co-operate with the international community, shouldn't he try to lead by example? How can Australians be safe abroad if our country systematically abuses foreigners in their time of need?

Categories: FLOSS Project Planets

FSF Blogs: Introducing Tyler Livingston, a summer Licensing Team intern

GNU Planet! - Mon, 2014-07-21 12:45

Hello. I am a rising Third Year law student at SMU Dedman School of Law in Dallas, TX. I am working hard to master the technical aspects of law, electronics, and software. My current interests involve protecting individuals and investigating new technology, particularly in the communications field by utilizing licenses for authorship, art, and inventions. Prior to law school, I attained a bachelor's degree in History at the University of Texas at Dallas.

Licensing is where I began to be involved with free software; the FSF in particular utilizes a great strategy of working within the current licensing jurisprudence by using copyleft to support freedom and empowerment for users over their computers and software. My computer science skills are lacking, but I have worked with UNIX systems in the past and am now finally feeling comfortable enough to make a permanent switch to enjoy software on my own terms. Other interests include electronics and travel (with a trip planned to Eastern Europe later this year).

Over the summer I will be working with the licensing department on various projects, including the Free Software Directory, publications, and hopefully a bit of the nitty-gritty licensing terms and compliance issues. The number one priority for my time at the FSF is to learn. Collaboration brings together society and carries with it several other natural positive externalities. I hope to integrate into the free software community because it is an integral cog of the free software movement. I am extremely excited to reach out to others and soak up as much as I can from this enthralling environment.

I encourage all to contact me at tlivingston@fsf.org.

More information about the FSF's internship program is available at https://www.fsf.org/volunteer/internships.

Categories: FLOSS Project Planets

Introducing Tyler Livingston, a summer Licensing Team intern

FSF Blogs - Mon, 2014-07-21 12:45

Hello. I am a rising Third Year law student at SMU Dedman School of Law in Dallas, TX. I am working hard to master the technical aspects of law, electronics, and software. My current interests involve protecting individuals and investigating new technology, particularly in the communications field by utilizing licenses for authorship, art, and inventions. Prior to law school, I attained a bachelor's degree in History at the University of Texas at Dallas.

Licensing is where I began to be involved with free software; the FSF in particular utilizes a great strategy of working within the current licensing jurisprudence by using copyleft to support freedom and empowerment for users over their computers and software. My computer science skills are lacking, but I have worked with UNIX systems in the past and am now finally feeling comfortable enough to make a permanent switch to enjoy software on my own terms. Other interests include electronics and travel (with a trip planned to Eastern Europe later this year).

Over the summer I will be working with the licensing department on various projects, including the Free Software Directory, publications, and hopefully a bit of the nitty-gritty licensing terms and compliance issues. The number one priority for my time at the FSF is to learn. Collaboration brings together society and carries with it several other natural positive externalities. I hope to integrate into the free software community because it is an integral cog of the free software movement. I am extremely excited to reach out to others and soak up as much as I can from this enthralling environment.

I encourage all to contact me at tlivingston@fsf.org.

More information about the FSF's internship program is available at https://www.fsf.org/volunteer/internships.

Categories: FLOSS Project Planets

Mediacurrent: 10 Reasons Enterprise Marketers Choose Drupal

Planet Drupal - Mon, 2014-07-21 11:43

As marketers, you understand the importance of having a system that promotes ease and efficiency when it comes to implementing marketing processes. You want to create content once and use it over and over in different ways to create contextual user experiences. 

Drupal provides you with a variety of powerful, integrated tools to not only help you understand who you visitors are and what they want to accomplish, but to also dig deeper into their interactions, engagements and habits with your site. 

Here are just a few reasons why enterprise marketers adopt Drupal. 
 

Categories: FLOSS Project Planets

Lars Heinemann: How to install JBoss Fuse Tooling into Eclipse Luna

Planet Apache - Mon, 2014-07-21 10:58
Installation of JBoss Fuse Tooling for Eclipse Luna:

Before continuing please keep in mind that you are now installing a development snapshot of the tooling for Eclipse Luna. This is a work in progress and not released yet.

Lets choose the download for Eclipse Standard 4.4. Once the download finished unpack the archive onto your hard drive and start Eclipse by executing the Eclipse launcher. Choose your workspace and then you should find yourself in the Eclipse Welcome Screen. (only if you start it for the first time)
Welcome to Eclipse Luna!
Now lets open the Help menu from the top menu bar and select the entry "Install new Software".




Lets define a new update site location for JBoss Fuse Tooling. Click the "Add" button next to the combo box for the update sites.



Now enter the following...

Name: 
JBoss Fuse Tooling (Luna)
Location: 
http://download.jboss.org/jbosstools/updates/integration/luna/integration-stack/fuse-tooling/7.3.0/all/repo/
Click the OK button to add the new update site to your Eclipse installation.
A new dialog will open up and ask you what features to install from the new update site:




There are three features available from that update site:

JBoss Fuse Camel Editor Feature:
This feature gives you the route editor for Apache Camel Routes, a new project wizard to setup new integration modules and the option to launch your new routes locally for testing purposes.

JBoss Fuse Runtimes Feature:
This allows you to monitor your routes, trace messages, edit remote routes and there are also Fabric bits available to work with Fuse Fabric.

JBoss Fuse Server Extension Feature:
When installing this feature you will get server adapters for Apache ServiceMixApache Karaf, Fabric8 and JBoss Fuse runtimes. It allows you to start / stop those servers and to connect to their shell. Deployment options are also available.

Once you are done with selecting your features click on the Next button. The following screen will show you what will be installed into your Luna installation.




You can review your selection and make changes to it by clicking the Back button if needed. If all is fine you can click the Next button instead. This will lead you to the license agreement screen. You need to agree to the licenses in order to install the software.




Once that is done you can click again the Next button and the installation will start by downloading all needed plugins and features. Once that is done the new features will be installed into your Luna folder. Before that happens Eclipse will warn you that you are going to install unsigned content. This happens because our plugins are not signed but thats nothing to worry about. Just click OK to do the installation.


After everything is installed Eclipse will ask you for a restart.



Click the Yes button to restart Eclipse. When the restart is done you will be able to select the Fuse Integration perspective from the perspectives list.




Well done! You've installed JBoss Fuse Tooling for Eclipse Luna! 


Categories: FLOSS Project Planets

Phase2: Talking Mapping at the 2014 ESIP Summer Meeting

Planet Drupal - Mon, 2014-07-21 10:43

Last week I had the opportunity to present at the Federation of Earth Science Information Partners (ESIP) Summer Meeting held in Copper Mountain, CO. The Summer Meeting is a gathering of IT professionals from across several different agencies such as NASA, NOAA and USGS. Each year, the group comes together to talk about the challenges that they each face while trying to engage and support the scientific community.

When I got in on Wednesday a few of us got together to talk about how to kickstart the Science on Drupal group. While there’s been a science presence in the Drupal community for several years now in one form or another, there’s been a recent interest in pooling resources together to make a larger group. We had a great time strategizing how to grow the group over chips and salsa.

For my presentation, I went over various different tools for doing online mapping work, both with native Drupal tools and other toolsets.

One of the big challenges that this community has to face is how to work with large datasets that don’t fit neatly into a typical Drupal site. For my part, we spent a lot of time going over how to leverage tools like D3, CartoDB, GeoServer, and Mapbox to connect to data outside of Drupal and provide meaningful interaction with it.

They also exposed me to DEIMS, a Drupal distribution that they had collaborated on that also features some interesting ways to interact with external data. There was a great presentation at Drupalcon Austin on the distribution that’s definitely worth checking out.

If you’re interested in catching the presentation, the slides are posted on Github and the video is here. If you’re interested in catching up with what’s going on with the Drupal in Science working group, check out their page on groups.drupal.org.

Thanks again to Adam Shepherd and the rest of the ESIP Drupal Working Group for inviting me out to hang out and learn from their experiences.

Categories: FLOSS Project Planets

Steve Kemp: An alternative to devilspie/devilspie2

Planet Debian - Mon, 2014-07-21 10:30

Recently I was updating my dotfiles, because I wanted to ensure that media-players were "always on top", when launched, as this suits the way I work.

For many years I've used devilspie to script the placement of new windows, and once I googled a recipe I managed to achieve my aim.

However during the course of my googling I discovered that devilspie is unmaintained, and has been replaced by something using Lua - something I like.

I'm surprised I hadn't realized that the project was dead, although I've always hated the configuration syntax it is something that I've used on a constant basis since I found it.

Unfortunately the replacement, despite using Lua, and despite being functional just didn't seem to gell with me. So I figured "How hard could it be?".

In the past I've written softare which iterated over all (visible) windows, and obviously I'm no stranger to writing Lua bindings.

However I did run into a snag. My initial implementation did two things:

  • Find all windows.
  • For each window invoke a lua script-file.

This worked. This worked well. This worked too well.

The problem I ran into was that if I wrote something like "Move window 'emacs' to desktop 2" that action would be applied, over and over again. So if I launched emacs, and then manually moved the window to desktop3 it would jump back!

In short I needed to add a "stop()" function, which would cause further actions against a given window to cease. (By keeping a linked list of windows-to-ignore, and avoiding processing them.)

The code did work, but it felt wrong to have an ever-growing linked-list of processed windows. So I figured I'd look at the alternative - the original devilspie used libwnck to operate. That library allows you to nominate a callback to be executed every time a new window is created.

If you apply your magic only on a window-create event - well you don't need to bother caching prior-windows.

So in conclusion :

I think my code is better than devilspie2 because it is smaller, simpler, and does things more neatly - for example instead of a function to get geometry and another to set it, I use one. (e.g. "xy()" returns the position of a window, but xy(3,3) sets it.).

kpie also allows you to run as a one-off job, and using the simple primitives I wrote a file to dump your windows, and their size/placement, which looks like this:

shelob ~/git/kpie $ ./kpie --single ./samples/dump.lua -- Screen width : 1920 -- Screen height: 1080 .. if ( ( window_title() == "Buddy List" ) and ( window_class() == "Pidgin" ) and ( window_application() == "Pidgin" ) ) then xy(1536,24 ) size(384,1032 ) workspace(2) end if ( ( window_title() == "feeds" ) and ( window_class() == "Pidgin" ) and ( window_application() == "Pidgin" ) ) then xy(1,24 ) size(1536,1032 ) workspace(2) end ..

As you can see that has dumped all my windows, along with their current state. This allows a simple starting-point - Configure your windows the way you want them, then dump them to a script file. Re-run that script file and your windows will be set back the way they were! (Obviously there might be tweaks required.)

I used that starting-point to define a simple recipe for configuring pidgin, which is more flexible than what I ever had with pidgin, and suits my tastes.

Bug-reports welcome.

Categories: FLOSS Project Planets

Drupal core announcements: Work on Drupal 8 at major core sprints, August 7-10

Planet Drupal - Mon, 2014-07-21 10:22

This summer is an important time to help get Drupal 8 done, so there is no good reason to skip getting together. We are holding two Drupal 8 sprints at the same time on August 7 to 10: one in North America at TCDrupal, and one in Europe at Drupalaton. Sprinters from both events will collaborate on Drupal 8 issues.

Join jthorson, xjm, alexpott, Crell, mtift, YesCT, and other lead Drupal 8 developers at Twin Cities DrupalCamp (North America) or dawehner, swentel, fago, Wim Leers, rteijeiro, lewisnyman, emma.maria and Gábor Hojtsy among others at Drupalaton (Europe). Read more in the event announcement.

Categories: FLOSS Project Planets

Lars Heinemann: Where can I get JBoss Fuse Tooling and how to install it?

Planet Apache - Mon, 2014-07-21 09:16
These questions have been raised over and over again so it's time to cover that topic in a bit more detail.In the following posts I'd like to show you how to install our tooling for Apache Camel into Eclipse. We will cover two versions of the tooling - the Kepler based GA version which is already shipped with the JBoss Integration Stack and the upcoming tooling for the Luna version of Eclipse.
So these are your options...

Option 1: The Eclipse Kepler based version which is available as GA version coming with the JBoss Integration Stack
- Click here -


Option 2:The Eclipse Luna based version which will be released for the Luna based JBDS 8 and the Integration Stack. That version is currently being worked on and there is no release yet. If you want to go for that option you will use a development nightly build - but it will contain the latest set of new features.
- Click here -

Categories: FLOSS Project Planets

Lars Heinemann: How to install JBoss Fuse Tooling into Eclipse Kepler

Planet Apache - Mon, 2014-07-21 09:15
Installation of JBoss Fuse Tooling for Eclipse Kepler:
For this guide we will use a vanilla Eclipse Kepler from the Eclipse Download page and install JBoss Fuse Tooling from the update site directly instead of installing JBDS or the Integration Stack. If you were looking for those installation methods there is a good blog post from Paul Leacu available HERE.

Lets choose the download for Eclipse Standard 4.3.2. Once the download finished unpack the archive onto your hard drive and start Eclipse by executing the Eclipse launcher. Choose your workspace and then you should find yourself in the Eclipse Welcome Screen. (only if you start it for the first time)
Welcome to your new Eclipse Kepler installation...
Now lets open the Help menu from the top menu bar and select the entry "Install new Software".

Lets define a new update site location for JBoss Fuse Tooling. Click the "Add" button next to the combo box for the update sites.


Now enter the following...

Name: 
JBoss Fuse Tooling (Kepler)
Location: 
http://download.jboss.org/jbosstools/updates/integration/kepler/integration-stack/fuse-tooling/7.2.0/all/repo/

Click the OK button to add the new update site to your Eclipse installation.
A new dialog will open up and ask you what features to install from the new update site:


There are three features available from that update site:

JBoss Fuse Camel Editor Feature:
This feature gives you the route editor for Apache Camel Routes, a new project wizard to setup new integration modules and the option to launch your new routes locally for testing purposes.

JBoss Fuse Runtimes Feature:
This allows you to monitor your routes, trace messages, edit remote routes and there are also Fabric bits available to work with Fuse Fabric.

JBoss Fuse Server Extension Feature:
When installing this feature you will get server adapters for Apache ServiceMix, Apache Karaf and JBoss Fuse runtimes. It allows you to start / stop those servers and to connect to their shell. Deployment options are also available.

Once you are done with selecting your features click on the Next button. The following screen will show you what will be installed into your Kepler installation.


You can review your selection and make changes to it by clicking the Back button if needed. If all is fine you can click the Next button instead. This will lead you to the license agreement screen. You need to agree to the licenses in order to install the software.

Once that is done you can click again the Next button and the installation will start by downloading all needed plugins and features. Once that is done the new features will be installed into your Kepler folder. Before that happens Eclipse will warn you that you are going to install unsigned content. This happens because our plugins are not signed but thats nothing to worry about. Just click OK to do the installation.


After everything is installed Eclipse will ask you for a restart.


Click the Yes button to restart Eclipse. When the restart is done you will be able to select the Fuse Integration perspective from the perspectives list.




Well done! You've installed JBoss Fuse Tooling for Eclipse Kepler! 
Categories: FLOSS Project Planets

My New Page

LinuxPlanet - Mon, 2014-07-21 08:54

This is my new page

Categories: FLOSS Project Planets

Tim Retout: apt-transport-tor 0.2.1

Planet Debian - Mon, 2014-07-21 08:17

apt-transport-tor 0.2.1 should now be on your preferred unstable Debian mirror. It will let you download Debian packages through Tor.

New in this release: support for HTTPS over Tor, to keep up with people.debian.org. :)

I haven't mentioned it before on this blog. To get it working, you need to "apt-get install apt-transport-tor", and then use sources.list lines like so:

deb tor+http://http.debian.net/debian unstable main

Note the use of http.debian.net in order to pick a mirror near to whichever Tor exit node. Throughput is surprisingly good.

On the TODO list: reproducible builds? It would be nice to have some mirrors offer Tor hidden services, although I have yet to think about the logistics of this, such as how the load could be balanced (maybe a service like http.debian.net). I also need to look at how cowbuilder etc. can be made to play nicely with Tor. And then Debian installer support!

Categories: FLOSS Project Planets

Francois Marier: Creating a modern tiling desktop environment using i3

Planet Debian - Mon, 2014-07-21 07:03

Modern desktop environments like GNOME and KDE involving a lot of mousing around and I much prefer using the keyboard where I can. This is why I switched to the Ion tiling window manager back when I interned at Net Integration Technologies and kept using it until I noticed it had been removed from Debian.

After experimenting with awesome for 2 years and briefly considering xmonad , I finally found a replacement I like in i3. Here is how I customized it and made it play nice with the GNOME and KDE applications I use every day.

Startup script

As soon as I log into my desktop, my startup script starts a few programs, including:

Because of a bug in gnome-settings-daemon which makes the mouse cursor disappear as soon as gnome-settings-daemon is started, I had to run the following to disable the offending gnome-settings-daemon plugin:

dconf write /org/gnome/settings-daemon/plugins/cursor/active false Screensaver

In addition, gnome-screensaver didn't automatically lock my screen, so I installed xautolock and added it to my startup script:

xautolock -time 30 -locker "gnome-screensaver-command --lock" &

to lock the screen using gnome-screensaver after 30 minutes of inactivity.

I can also trigger it manually using the following shortcut defined in my ~/.i3/config:

bindsym Ctrl+Mod1+l exec xautolock -locknow Keyboard shortcuts

While keyboard shortcuts can be configured in GNOME, they don't work within i3, so I added a few more bindings to my ~/.i3/config:

# volume control bindsym XF86AudioLowerVolume exec /usr/bin/pactl set-sink-volume @DEFAULT_SINK@ -- '-5%' bindsym XF86AudioRaiseVolume exec /usr/bin/pactl set-sink-volume @DEFAULT_SINK@ -- '+5%' # brightness control bindsym XF86MonBrightnessDown exec xbacklight -steps 1 -time 0 -dec 5 bindsym XF86MonBrightnessUp exec xbacklight -steps 1 -time 0 -inc 5 # show battery stats bindsym XF86Battery exec gnome-power-statistics

to make volume control, screen brightness and battery status buttons work as expected on my laptop.

These bindings require the following packages:

Keyboard layout switcher

Another thing that used to work with GNOME and had to re-create in i3 is the ability to quickly toggle between two keyboard layouts using the keyboard.

To make it work, I wrote a simple shell script and assigned a keyboard shortcut to it in ~/.i3/config:

bindsym $mod+u exec /home/francois/bin/toggle-xkbmap Suspend script

Since I run lots of things in the background, I have set my laptop to avoid suspending when the lid is closed by putting the following in /etc/systemd/login.conf:

HandleLidSwitch=lock

Instead, when I want to suspend to ram, I use the following keyboard shortcut:

bindsym Ctrl+Mod1+s exec /home/francois/bin/s2ram

which executes a custom suspend script to clear the clipboards (using xsel), flush writes to disk and lock the screen before going to sleep.

To avoid having to type my sudo password every time pm-suspend is invoked, I added the following line to /etc/sudoers:

francois ALL=(ALL) NOPASSWD: /usr/sbin/pm-suspend Window and workspace placement hacks

While tiling window managers promise to manage windows for you so that you can focus on more important things, you will most likely want to customize window placement to fit your needs better.

Working around misbehaving applications

A few applications make too many assumptions about window placement and are just plain broken in tiling mode. Here's how to automatically switch them to floating mode:

for_window [class="VidyoDesktop"] floating enable

You can get the Xorg class of the offending application by running this command:

xprop | grep WM_CLASS

before clicking on the window.

Keeping IM windows on the first workspace

I run Pidgin on my first workspace and I have the following rule to keep any new window that pops up (e.g. in response to a new incoming message) on the same workspace:

assign [class="Pidgin"] 1 Automatically moving workspaces when docking

Here's a neat configuration blurb which automatically moves my workspaces (and their contents) from the laptop screen (eDP1) to the external monitor (DP2) when I dock my laptop:

# bind workspaces to the right monitors workspace 1 output DP2 workspace 2 output DP2 workspace 3 output DP2 workspace 4 output DP2 workspace 5 output DP2 workspace 6 output eDP1

You can get these output names by running:

xrandr --display :0 | grep " connected"
Categories: FLOSS Project Planets

What is preloading?

Planet KDE - Mon, 2014-07-21 06:38

by Jakub Hrozek and Andreas Schneider

The LD_PRELOAD trick!

Preloading is a feature of the dynamic linker (ld). It is a available on most Unix system and allows to load a user specified, shared library before all other shared libraries which are linked to an executable.

Library pre-loading is most commonly used when you need a custom version of a library function to be called. You might want to implement your own malloc(3) and free(3) functions that would perform a rudimentary leak checking or memory access control for example, or you might want to extend the I/O calls to dump data when reverse engineering a binary blob. In this case, the library to be preloaded would implement the functions you want to override with prelinking. Only functions of dynamically loaded libraries can be overridden. You’re not able to override a function the application implements by itself or links statically with.

The library to preload is defined by the environment variable LD_PRELOAD, such as LD_PRELOAD=libwurst.so. The symbols of the preloaded library are bound first, before other linked shared libraries.
Lets look into symbol binding in more details. If your application calls a function, then the linker looks if it is available in the application itself first. If the symbol is not found, the linker checks all preloaded libraries and only then all the libraries which have been linked to your application. The shared libraries are searched in the order which has been given during compilation and linking. You can find out the linking order by calling 'ldd /path/to/my/applicaton'. If you’re interested how the linker is searching for the symbols it needs or if you want do debug if the symbol of your preloaded library is used correctly, you can do that by enabling tracing in the linker.

A simple example would be 'LD_DEBUG=symbols ls'. You can find more details about debugging with the linker in the manpage: 'man ld.so'.

Example:

Your application uses the function open(2).

  • Your application doesn’t implement it.
  • LD_PRELOAD=libcwrap.so provides open(2).
  • The linked libc.so provides open(2).

=> The open(2) symbol from libcwrap.so gets bound!

The wrappers used for creating complex testing environments of the cwrap project use preloading to supply their own variants of several system or library calls suitable for unit testing of networked software or privilege separation. For example, one wrapper includes its version of most of the standard API used to communicate over sockets that routes the communication over local sockets.

Categories: FLOSS Project Planets

DebConf team: Talks review and selection process. (Posted by René Mayorga)

Planet Debian - Mon, 2014-07-21 06:30

Today we finished the talk selection process. We are very grateful to everyone who decided to submit talks and events for DebConf14.

If you have submitted an event, please check your email :). If you have not received any confirmation regarding your talk status, please contact us on talks@debconf.org

During the selection process, we bore in mind the number of talk slots during the conference, as well as maintaining a balance among the different submitted topics. We are pleased to announce that we have received a total of 115 events, of which 80 have been approved (69%). Approval means your event will be scheduled during the conference and you will have video coverage.

The list of approved talks can be found on the following link: https://summit.debconf.org/debconf14/all/

If you got an email telling your talk have being approved, and your talk is not listed, don’t panic. Check the status on summit, and make sure to select a track, if you have some track suggestions please mail us and tell us about it.

This year, we expect to also have a sort of “unconference” schedule. This will take place during the designated “hacking time”. During that time the talks rooms will be empty, and ad hoc meetings can be scheduled on-site while we are in the Conference. The method for booking a room for your ad hoc meeting will be decided and announced later, but is expected to be flexible (i.e: open scheduling board / 1 day or less in advance booking), Please don’t abuse the system: bear in mind the space will be limited, and only book your event if you gather enough people to work on your idea.

Please make sure to read the email regarding your talk. :) and prepare yourself.

Time is ticking and we will be happy to meet you in Portland.

Categories: FLOSS Project Planets

Dave Hall Consulting: Interacting with the Acquia Cloud API with Python

Planet Drupal - Mon, 2014-07-21 04:54

The Acquia Cloud API makes it easy to manage sites on the platform. The API allows you to perform many administrative tasks including creating, destroying and copying databases, deploying code, managing domains and copying files.

Acquia offers 2 official clients. The primary client is a drush plugin which can only be downloaded from Acquia Insight. The other is a PHP library which states in the README that it is "[n]ot ready for production usage".

On a recent project using WF Tools we needed some pretty advanced deployment scripts for sites hosted on Acquia Cloud. We had tried using a mix of bash and PHP, but that created a maintenance nightmare, so we switched to Python.

I was unable to find a high quality Python library, so I wrote a python client for the Acquia Cloud API. The library implements all of the features that we needed, so there is a few things missing.

Chaining complex commands together is easy because the library implements a fluent interface. An extreme example of what is possible is below:

import acapi # Instantiate the client c = acapi.Client('user@example.com', 'acquia-token') # Copy the prod db to dev, make a backup of the dev db and download it to /tmp c.site('mysite').environment('prod').db('mysite').copy('dev').backups().create().download('/tmp/backup.sql.gz')

Some of the code is library is "borrowed" from the Python client for Twilio. The library is licensed under the terms of the MIT license.

I am continuing to develop the library. Consider this a working alpha. Improving error handling, creating a comprehensive test suite and implementing the missing API calls are all on the roadmap. Pull requests are welcome.

The code is PEP 8 (coding standards and PEP 257 (documentation standards) compliant and uses the numpydoc for code documentation.

Check out the Python client for Acquia's Cloud API on github.

Categories: FLOSS Project Planets

Keith Packard: Glamorous Intel

Planet Debian - Mon, 2014-07-21 03:39
Reworking Intel Glamor

The original Intel driver Glamor support was based on the notion that it would be better to have the Intel driver capture any fall backs and try to make them faster than Glamor could do internally. Now that Glamor has reasonably complete acceleration, and its fall backs aren’t terrible, this isn’t as useful as it once was, and because this uses Glamor in a weird way, we’re making the Glamor code harder to maintain.

Fixing the Intel driver to not use Glamor in this way took a bit of effort; the UXA support is all tied into the overall operation of the driver.

Separating out UXA functions

The first task was to just identify which functions were UXA-specific by adding “_uxa” to their names. A couple dozen sed runs and now a bunch of the driver is looking better.

Next, a pile of UXA-specific functions were actually inside the non-UXA parts of the code. Those got moved out, and a new ‘intel_uxa.h” file was created to hold all of the definitions.

Finally, a few non UXA-specific functions were actually in the uxa files; those got moved over to the generic code.

Removing the Glamor paths in UXA

Each one of the UXA functions had a little piece of code at the top like:

if (uxa_screen->info->flags & UXA_USE_GLAMOR) { int ok = 0; if (uxa_prepare_access(pDrawable, UXA_GLAMOR_ACCESS_RW)) { ok = glamor_fill_spans_nf(pDrawable, pGC, n, ppt, pwidth, fSorted); uxa_finish_access(pDrawable, UXA_GLAMOR_ACCESS_RW); } if (!ok) goto fallback; return; }

Pulling those out shrank the UXA code by quite a bit.

Selecting Acceleration (or not)

The intel driver only supported UXA before; Glamor was really just a slightly different mode for UXA. I switched the driver from using a bit in the UXA flags to having an ‘accel’ variable which could be one of three options:

  • ACCEL_GLAMOR.
  • ACCEL_UXA.
  • ACCEL_NONE

I added ACCEL_NONE to give us a dumb frame buffer mode. That actually supports DRI3 so that we can bring up Mesa and run it under X before we have any acceleration code ready; avoiding a dependency loop when doing new hardware. All that it requires is a kernel that offers mode setting and buffer allocation.

Initializing Glamor

With UXA no longer supporting Glamor, it was time to plug the Glamor support into the top of the driver. That meant changing a bunch of the entry points to select appropriate Glamor or UXA functionality, instead of just calling into UXA. So, now we’ve got lots of places that look like:

switch (intel->accel) { #if USE_GLAMOR case ACCEL_GLAMOR: if (!intel_glamor_create_screen_resources(screen)) return FALSE; break; #endif #if USE_UXA case ACCEL_UXA: if (!intel_uxa_create_screen_resources(screen)) return FALSE; break; #endif case ACCEL_NONE: if (!intel_none_create_screen_resources(screen)) return FALSE; break; }

Using a switch means that we can easily elide code that isn’t wanted in a particular build. Of course ‘accel’ is an enum, so places which are missing one of the required paths will cause a compiler warning.

It’s not all perfectly clean yet; there are piles of UXA-only paths still.

Making It Build Without UXA

The final trick was to make the driver build without UXA turned on; that took several iterations before I had the symbols sorted out appropriately.

I built the driver with various acceleration options and then tried to count the lines of source code. What I did was just list the source files named in the driver binary itself. This skips all of the header files and the render program source code, and ignores the fact that there are a bunch of #ifdef’s in the uxa directory selecting between uxa, glamor and none.

Accel Lines Size(B) ----------- ------ ------- none 7143 73039 glamor 7397 76540 uxa 25979 283777 sna 118832 1303904 none legacy 14449 152480 glamor legacy 14703 156125 uxa legacy 33285 350685 sna legacy 126138 1395231

The ‘legacy’ addition supports i810-class hardware, which is needed for a complete driver.

Along The Way, Enable Tiling for the Front Buffer

While hacking the code, I discovered that the initial frame buffer allocated for the screen was created without tiling because a few parameters that depend on the GTT size were not initialized until after that frame buffer was allocated. I haven’t analyzed what effect this has on performance.

Page Flipping and Resize

Page flipping (or just flipping) means switching the entire display from one frame buffer to another. It’s generally the fastest way of updating the screen as you don’t have to copy any bits.

The trick with flipping is that a client hands you a random pixmap and you need to stuff that into the KMS API. With UXA, that’s pretty easy as all pixmaps are managed through the UXA API which knows which underlying kernel BO is tied with each pixmap. Using Glamor, only the underlying GL driver knows the mapping. Fortunately (?), we have the EGL Image extension, which lets us take a random GL texture and turn it into a file descriptor for a DMA-BUF kernel object. So, we have this cute little dance:

fd = glamor_fd_from_pixmap(screen, pixmap, &stride, &size); bo = drm_intel_bo_gem_create_from_prime(intel->bufmgr, fd, size); close(fd); intel_glamor_get_pixmap(pixmap)->bo = bo;

That last bit remembers the bo in some local memory so we don’t have to do this more than once for each pixmap. glamorfdfrompixmap ends up calling eglCreateImageKHR followed by gbmbo_import and then a kernel ioctl to convert a prime handle into an fd. It’s all quite round-about, but it does seem to work just fine.

After I’d gotten Glamor mostly working, I tried a few OpenGL applications and discovered flipping wasn’t working. That turned out to have an unexpected consequence — all full-screen applications would run flat-out, and not be limited to frame rate. Present ‘recovers’ from a failed flip queue operation by immediately performing a CopyArea; not waiting for vblank. This needs to get fixed in Present by having it re-queued the CopyArea for the right time. What I did in the intel driver was to add a bunch more checks for tiling mode, pixmap stride and other things to catch pixmaps that were going to fail before the operation was queued and forcing them to fall back to CopyArea at the right time.

The second adventure was with XRandR. Glamor has an API to fix up the screen pixmap for a new frame buffer, but that pulls the size of the frame buffer out of the pixmap instead of out of the screen. XRandR leaves the pixmap size set to the old screen size during this call; fixing that just meant getting the pixmap size set correctly before calling into glamor. I think glamor should get fixed to use the screen size rather than the pixmap size.

Painting Root before Mode set

The X server has generally done initialization in one order:

  1. Create root pixmap
  2. Set video modes
  3. Paint root window

Recently, we’ve added a ‘-background none’ option to the X server which causes it to set the root window background to none and have the driver fill in that pixmap with whatever contents were on the screen before the X server started.

In a pre-Glamor world, that was done by hacking the video driver to copy the frame buffer console contents to the root pixmap as it was created. The trouble here is that the root pixmap is created long before the upper layers of the X server are ready for drawing, so you can’t use the core rendering paths. Instead, UXA had kludges to call directly into the acceleration functions.

What we really want though is to change the order of operations:

  1. Create root pixmap
  2. Paint root window
  3. Set video mode

That way, the normal root window painting operation will take care of getting the image ready before that pixmap is ever used for scanout. I can use regular core X rendering to get the original frame buffer contents into the root window, and even if we’re not using -background none and are instead painting the root with some other pattern (like the root weave), I get that presented without an intervening black flash.

That turned out to be really easy — just delay the call to I830EnterVT (which sets the modes) until the server is actually running. That required one additional kludge — I needed to tell the DIX level RandR functions about the new modes; the mode setting operation used during server init doesn’t call up into RandR as RandR lists the current configuration after the screen has been initialized, which is when the modes used to be set.

Calling xf86RandR12CreateScreenResources does the trick nicely. Getting the root window bits from fbcon, setting video modes and updating the RandR/Xinerama DIX info is now all done from the BlockHandler the first time it is called.

Performance

I ran the current glamor version of the intel driver with the master branch of the X server and there were not any huge differences since my last Glamor performance evaluation aside from GetImage. The reason is that UXA/Glamor never called Glamor’s image functions, and the UXA GetImage is pretty slow. Using Mesa’s image download turns out to have a huge performance benefit:

1. UXA/Glamor from April 2. Glamor from today 1 2 Operation ------------ ------------------------- ------------------------- 50700.0 56300.0 ( 1.110) ShmGetImage 10x10 square 12600.0 26200.0 ( 2.079) ShmGetImage 100x100 square 1840.0 4250.0 ( 2.310) ShmGetImage 500x500 square 3290.0 202.0 ( 0.061) ShmGetImage XY 10x10 square 36.5 170.0 ( 4.658) ShmGetImage XY 100x100 square 1.5 56.4 ( 37.600) ShmGetImage XY 500x500 square 49800.0 50200.0 ( 1.008) GetImage 10x10 square 5690.0 19300.0 ( 3.392) GetImage 100x100 square 609.0 1360.0 ( 2.233) GetImage 500x500 square 3100.0 206.0 ( 0.066) GetImage XY 10x10 square 36.4 183.0 ( 5.027) GetImage XY 100x100 square 1.5 55.4 ( 36.933) GetImage XY 500x500 square

Running UXA from today the situation is even more dire; I suspect that enabling tiling has made CPU reads through the GTT even worse than before?

1: UXA today 2: Glamor today 1 2 Operation ------------ ------------------------- ------------------------- 43200.0 56300.0 ( 1.303) ShmGetImage 10x10 square 2600.0 26200.0 ( 10.077) ShmGetImage 100x100 square 130.0 4250.0 ( 32.692) ShmGetImage 500x500 square 3260.0 202.0 ( 0.062) ShmGetImage XY 10x10 square 36.7 170.0 ( 4.632) ShmGetImage XY 100x100 square 1.5 56.4 ( 37.600) ShmGetImage XY 500x500 square 41700.0 50200.0 ( 1.204) GetImage 10x10 square 2520.0 19300.0 ( 7.659) GetImage 100x100 square 125.0 1360.0 ( 10.880) GetImage 500x500 square 3150.0 206.0 ( 0.065) GetImage XY 10x10 square 36.1 183.0 ( 5.069) GetImage XY 100x100 square 1.5 55.4 ( 36.933) GetImage XY 500x500 square

Of course, this is all just x11perf, which doesn’t represent real applications at all well. However, there are applications which end up doing more GetImage than would seem reasonable, and it’s nice to have this kind of speed up.

Status

I’m running this on my crash box to get some performance numbers and continue testing it. I’ll switch my desktop over when I feel a bit more comfortable with how it’s working. But, I think it’s feature complete at this point.

Where’s the Code

As usual, the code is in my personal repository. It’s on the ‘glamor’ branch.

git://people.freedesktop.org/~keithp/xf86-video-intel glamor
Categories: FLOSS Project Planets

godel.com.au: Creating an immersive Drupal front-end with Yes Way

Planet Drupal - Mon, 2014-07-21 03:20
Mon July 21, 2014 Creating an immersive Drupal front-end with Yes Way

Yes Way are a creative agency who connect businesses, brands and communities with the creative talent they need. They specialise in strategic planning for businesses and representation for creative individuals to engage their target audience through branding, events and marketing.

The brief

Godel were approached by Yes Way to help complete designs for their website update and produce a custom responsive website built in a Drupal 7 backend with a totally custom front-end that leveraged a minimalist and modern Aurora subtheme, Singularity grids and a lot of Javascript via Drupal behaviors.

The brief was to create a vibrant online presence to reflect the creatives that Yes Way represent; specialists in photography, street art, fine art, illustration and fashion styling. Yes Way wanted to stick with their existing branding, but give it new life through a new design. As such, the new site design that we created for Yes Way is not only clean and minimalist with a typographic focus, but also projects a vibrant persona, bringing creative talent to the forefront through their personal profiles and visual portfolios.

Working on projects like this is a great experience as it allows us to work closely with the client to iteratively improve on an existing product. Although we did the redesign and site build in a short period of time this time, this sort of iterative improvement process can work as on ongoing agreement as well, allowing us to build trust with our clients and gradually make improvements to their product over time, keeping it up to current standards in design and dev and allowing the client freedom to make suggestions based on their changing needs.

The site

Yes Way's new landing page features a full length background image and a retractable navigation which engages as soon as the viewer starts scrolling. More information is revealed about Yes Way as you scroll down past each header and when the a navigation menu item is clicked the screen smoothly transits to the appropriate area on the site using jQuery.

Godel wanted to bring the site up to date with dynamic and responsive features. Responsive design elements include the use of mmenu which creates a slick, user-friendly navigation pattern for mobile devices. The desktop functions as a "one pager" with some pop-up overlays. The navigation uses the scrollTo library to hijack the normal scrolling behaviour of the browser when the user clicks a menu item from the sticky header. The idea was to make site navigation as easy and fun as possible - the user never has to reload the page or follow a series of links, only interact with a single page.

All of the second-level sections are created using a nice little technique we've created using data-attributes. It allows us to create an immersive Javascript-powered app-style front end for a Drupal CMS backend, which creates websites that don't necessarily have to look "like Drupal sites".

Data attributes and custom display suite fields

This section is a brief technical explanation of our technique, skip it if it's Greek to you!
The day we learnt about custom display suite fields from This PreviousNext blog post was a happy day for us. Although DS offers a lot of great tools for UI-focused node display building, for devs who want more control it was starting to feel a bit limiting. We didn't want to go down the php field route (shudder) so we were happy to be able to create fields with PHP possibilities through this custom DS field technique.

One of the best things about the custom fields is the ability to generate fields that actually contain more data than the eye can see, stored in data attributes of HTML elements away from the visible part of the DOM. For example, we were able to store all of the data for an artist portfolio popup in the teaser tile for that artist that appears on the initial page load. What that means is that when the user clicks on an artist's face to view their portfolio, it loads dynamically in to the page via Javascript and that data that it displays is already stored on the page, just hidden.

First, we define the info hook for our field:

/** * Implements hook_ds_fields_info. */ function gp_global_ds_fields_info($entity_type) { $fields = array(); $fields['node']['body'] = array( 'title' => t('Body data attribute'), 'field_type' => DS_FIELD_TYPE_FUNCTION, 'function' => 'gp_global_ds_field_body', ); if (isset($fields[$entity_type])) { return array($entity_type => $fields[$entity_type]); } return; }

Then we make the markup for the field itself, which is surprisingly simple:

/** * Return the body as a div with a data attribute. */ function gp_global_ds_field_body($field) { $entity = $field['entity']; if(isset($entity->body[LANGUAGE_NONE][0]['safe_value'])){ $data = $entity->body[LANGUAGE_NONE][0]['safe_value']; $content = '<div class="body" data-body="' . check_plain($data) . '"></div>'; return $content; } }

The key is "data-body", a custom data attribute we create and then store the body text in. It doesn't get rendered on the page until we grab it with our Javascript, like this (abridged version):

(function($, undefined) { // We get the element that has the data-attribute on it and extract the data from the attribute bodyEl: '.fullwidth .body', _this.bodytext = $(element).find('[data-body]').data('body'); bodyText: function bodyText() var _this = Drupal.behaviors.overlayAnimate; // We replace the HTML of the blank element with the data we grabbed earlier. $(_this.bodyEl).html(_this.bodytext); }, }) (jQuery); Why this technique is meaningful

We think it's a step towards creating a better reputation for Drupal by creating beautiful sites that don't necessarily need to use the template themes Drupal provides. We use techniques like this in combination with very bare themes to build up our own custom front-end markup.

You can see this technique in action with the unique hover state overlays for each featured artist on the main page. The user can click through to more information about each person including a written blurb, gallery of images and even a video. For each of those things, the data is entered as a node in the Drupal backend, sent to the front of the site as a data attribute in a custom display suite field and triggered in to visibility via Javascript.

All in all, the user experience is intended to have an immersive web-app feeling, with content loading in to the page quietly, displayed in seamless overlays rather than new page loads and making them most of a one-page layout with some animated navigation styles. Yes Way are able to keep users on their site for longer by holding their attention for longer. Because users aren't directed off site (not even off-page!) they're more likely to click around and explore the single page they see. Because we already load the data into the page before we display it, they get the added benefit of a fast-loading site as well.

We think the result is an engaging site that uses some cool techniques to satisfy a real business need. Check out the website here!

Emma ForsterProject managerEmma manages our client relations and sits in between the dev team and the site owner to facilitate efficient, productive and fun projects. Ideas to help keep your Drupal project secure against the OWASP Top 10 Fri July 11, 2014 I'm sure you've heard the phrase "Security is a process, not a product" before, or something along those lines. Drupal has a pretty good track record as far as Web-based CMS security goes, and there's a dedicated team of experts looking after Core and Contrib, but it's no secret that...
Categories: FLOSS Project Planets
Syndicate content