Databases aren’t boring

It sounds super boring, sometimes scary. Let’s talk about database development, data management, and database administration. Sounds boring, right? I promise: it isn’t. I mainly develop for Fauxton, the UI for CouchDB we’ll release with 2.0. We are developing, designing, and concepting a UI for administration and data management.

When I tell fellow developers and designers that I develop a database, many of them look scared. Sometimes they also look bored, because people rarely imagine data management is exciting. Some of them might think of boring database courses in college. In this article we’ll discover what makes database development so interesting and exciting.

One of our main objectives is to make data management as frictionless as possible for the user. How can we lower the entry barrier for new users, but still support our power users? How can we display data in an accurate, detailed way, but still have a high density of information? How do we measure our success without traditional systems to measure engagement, like tracking? It is important to remember–we can be successful only if our users are successful.

A recent example where we want to make our users more successful is eventual consistency and MVCC. Large numbers of conflicts can be problematic; they will slow down the database and take up a lot of space. Some of the Fauxton developers recently had a hackweek. As part of one project we asked ourselves: “How can we make conflict detection and resolution a first class citizen in CouchDB and make it as frictionless as possible?”

Our goals:

  • Conflict detection should be as easy as possible
  • Make conflict resolution as easy as possible and provide necessary tooling
  • Help to avoid situations where a large number of conflicts become problematic
  • Provide better education and tutorials for conflict resolution, directly in the dashboard

We focused mainly on conflict resolution as our time was limited to one week. A document with conflicts has different revisions, and Couch elects one as the “winning revision.” How to choose the right revision and get rid of the other ones? Our project, codenamed “The Revision Browser,” was born. We wanted to provide a way to easily diff revisions, and inspect the revision tree. We also wanted an easy way to delete conflicting revisions and select other revisions as a winner. The first, ugly prototype had two dropdowns:

first-prototype

The first prototype

We are a distributed team, so use video calls for evaluating the iterations. We demo the current, incomplete work. Whenever possible, we test ad-hoc changes directly in the browser during the session. One addition that came up during our demos was to provide another view mode next to the “diff mode”. It shows both conflicting documents next to each other:

Both conflicting documents next to each other

Both conflicting documents next to each other

After the hackweek we had some work left to bring the project over the finish line. I am happy to announce that we have a minimum viable product now:

The diffing for both conflicting documents

The diffing for both conflicting documents

The feature was created in close collaboration with other developers and UX researchers. Here is a video showing the new features in action:

Data management is also interesting from the technical point of view. How can we display a lot of documents, but keep the application snappy? The revision browser is written in React. The code itself is pretty concise as we recently added ES 2015 / ES6 support to Fauxton. Thanks to our test coverage, we can refactor large parts of Fauxton. Recently, we changed the whole infrastructure underneath without much trouble. Interested in the code? It is available at: https://github.com/apache/couchdb-fauxton/pull/670

Conclusion

Despite its image, data management and database administration IS interesting. We face hard problems from a product point of view. They are challenging and it is fun to solve them in a team including developers, UX researchers, and designers. We also face interesting technical problems and solve them with the best technology available.

About the author

Robert Kowalski is a passionate software engineer and CouchDB contributor. He enjoys traveling and recently released a book about command line tools in Node.js, The CLI Book.

CouchDB Weekly News, April 21, 2016

Releases

PouchDB 5.3.2 is released, with some bugfixes for replication, ajax, and integration with Cordova SQLite. See the CHANGELOG for more.

Major Discussions

Nolan Lawson elected as CouchDB committer (see thread)

As you will see below, the CouchDB Project Management Committee has elected Nolan Lawson as a CouchDB committer. Welcome and congrats Nolan!

On dependency management and CI issues associated with it (see thread)

In this discussion Ilya Khlopotov has suggested some potential changes to the workflow to account for CI failures and other issues with outdated dependencies. Other folks have chimed in with responses so it’s a thread worth reviewing.

Admin party considered harmful (see thread)

Here’s a whole discussion posed by Paul Hammant on whether admin party is “considered harmful” or not.

Closing in on 2.0 (see thread)

Only two issues remain in the way of CouchDB 2.0 being released and we need your help to solve them. The plan is to release a CouchDB 2.0.0 RC1 when the two issues above are resolved and do the blocking docs issues, Windows and Mac builds etc. during the RC timeframe.

Adam Kocoloski is now an IBM Fellow (see thread)

Adam made IBM Fellow! He’s now one of only 267-ish individuals who’ve been awarded this honour for their contributions to IBM and computing in general. Be sure to congratulate him when you get the chance.

Releases in the CouchDB Universe

  • couchmagick 2.3.0 (Node) – Couchmagick runs ImageMagicks convert on CouchDB documents.
  • jsonobject-couchdbkit 0.7.4.0 (Python) – a fork of couchdbkit that replaces couchdbkit.schema with a thin wrapper around jsonobject (which was, incidentally, written as a way faster replacement for couchdbkit.schema.)
  • node-couchdb 1.1.0 (Node) – ES2015-compatible package to interact with CouchDB
  • spicy-action 6.2.0 (Node) – Web proxy for CouchDB and others, plus Socket.IO relay

PouchDB

Opinions and other News in the CouchDB Universe

… and in the PouchDB Universe

CouchDB Use Cases, Questions and Answers

Stack Overflow:

no public answer yet:

PouchDB Use Cases, Questions and Answers

Stack Overflow:

For more new questions and answers about CouchDB, see these search results and about PouchDB, see these.

Get involved!

If you want to get into working on CouchDB:

  • We have an infinite number of open contributor positions on CouchDB. Submit a pull request and join the project!
  • Do you want to help us with the work on the new CouchDB website? Get in touch on our new website mailing list and join the website team! – www@couchdb.apache.org
  • The CouchDB advocate marketing programme is just getting started. Join us in CouchDB’s Advocate Hub!
  • CouchDB has a new wiki. Help us move content from the old to the new one!
  • Can you help with Web Design, Development or UX for our Admin Console? No Erlang skills required! – Get in touch with us.
  • Do you want to help moving the CouchDB docs translation forward? We’d love to have you in our L10n team! See our current status and languages we’d like to provide CouchDB docs in on this page. If you’d like to help, don’t hesitate to contact the L10n mailing list on l10n@couchdb.apache.org or ping Andy Wenk (awenkhh on IRC).

We’d be happy to welcome you on board!

New Committer

  • Nolan Lawson (IRC nick: nolanlawson, Twitter: nolanlawson) has been elected as a CouchDB committer. Welcome to CouchDB, Nolan!

Events

Job opportunities for people with CouchDB skills

Time to relax!

  • “Look at this baby polar bear. Look at her and have your heart melt at the sight of her. Look at how excited she is to meet a traffic cone in her playground. Her name is Nora, and she made her public debut at the Columbus Zoo on Friday.” – Sit back, relax and watch this baby polar bear play with a traffic cone
  • “‘There is a saying about wine that I really like and it’s something like this, ‘The first glass of wine is all about the food, the second glass is about love and the third glass is about mayhem.’ I really wanted to see it for myself if that affirmation was in fact true.’” – Viral photos capture how people relax after 1, 2 and 3 glasses of wine
  • “At 4:00am this morning, Adult Swim aired a brand new piece of delightful weirdness from comedian Joe Pera called Joe Pera Talks You to Sleep, and if you’re looking for 11 minutes of relaxing, stress-free reflections on Stephen Hawking, fireworks, pretzels, The Snack Belt, barns, how insignificant we all are in this vast universe, and getting turned down by women, Pera is here to chat about ‘anything that will help relax you into sleep and keep your mind off of the day-to-day worries that make you anxious, like remembering to refill the ice cube trays and race relations.’” – Calm Down to the Soothing Sounds of ‘Joe Pera Talks You to Sleep’
  • “You know what a bicycle looks like… right? Two wheels, handlebars, pedals, some crossbars. But get a piece of paper and try to draw one exactly, you might be surprised at the results. Even for people who ride bikes regularly, it can be very hard to remember exactly how all of the parts fit together. (Not convinced? Go ahead and try drawing one from memory now — no googling.)” – The strange, hilarious pictures you get when you ask random people to draw a bicycle
  • “The result is more failed chicken dance than Saturday Night Fever (1977), though, as it quickly becomes apparent that trying to get Wobble Man’s Jell-O-like body to match whatever pose you’re assigned is somewhat like trying to herd cats. His body parts just do not want to listen, and he moves like a dancer that’s half-forgotten his choreography and is trying to figure it out on the fly by copying his neighbors. Also, if you lift him up by his feet, he apparently has anti-gravity powers ¯\_(ツ)_/¯” – Hilarious new game gives yoga the QWOP treatment
  • “Mental blocks and creative ruts are the WORST, and sadly inevitable. There are countless apps that promise to help you get your productivity back on track, but nondigital activities can work just as well for giving your brain a break and restoring your mental acuity. As a fierce quartet of philosophers once said: ‘Free your mind and the rest will follow.’” – 5 Non-Apps To Boost Your Productivity

… and also in the news