A CouchDB user story: Gregory (MadPink) Miller shares his CouchDB Udemy course

We were excited to talk with Gregory (MadPink) Miller recently about his new CouchDB Udemy course (yay for coupon codes!). The course itself helps students learn how to do the following:

  • Install and configure CouchDB
  • Understand differences between CouchDB and traditional databases
  • Create and edit documents and databases
  • Security options for CouchDB
  • Work with design documents and Map/Reduce to query data
  • Work with the Mango Query system to query data
  • Utilize replication and clustering
  • Perform many actions in bulk

After learning of this amazing resource, we were delighted to continue the conversation and learn more about how Gregory first discovered CouchDB and what his experience has been like employing it in applications.

How did you hear about CouchDB, and why did you choose to use it?

My primary programming language is Livecode which is a cross-platform rapid-application development platform. There is built-in support for SQL type databases, and I grudgingly used it, but was never very satisfied with tabular data. There were no other database drivers or libraries, and I was in the market for something new. Livecode has excellent support for REST APIs, so I began searching.

When I first came across CouchDB, I knew nothing about NoSQL databases… or better yet, I knew nothing but the traditional relational database management system (RDBMS) offerings. I was searching for methods of accessing MySQL through a REST API and for converting JSON to a format that could more easily be inserted into a database. Luckily I started asking questions on a forum and someone sent me a link to CouchDB.

I am going to admit that the old logo with the silhouette relaxing on a couch instantly endeared itself to me. I was practically hooked immediately. Once I downloaded and ran CouchDB, I was totally in love with it. I was amazed that I could finally structure my data exactly how I like it. Most of my app data tends to be in hierarchical trees that would take hours to reformat to be able to insert into a table. So if I want to summarize why I choose to use CouchDB it was, “My data, my way.” No more reformatting, no more having to link tables, no more inserting new columns and joins because I thought of one more thing I needed to add. CouchDB gives me a huge amount of flexibility.

Did you have a specific problem that CouchDB solved?

I actually had specific problems for 2 unrelated projects that I had no idea could be solved with this one simple change.

I had created an application for a local shop that allowed customers to browse images and search for specific kinds of work or examples from a particular artist. All data at the time was saved in local files on a single computer. The problem arose when their business expanded and the data needed to be shared among multiple computers. We tried local sharing, and a few other ideas, but none of the solutions were reliable. Dreading the work ahead, I resigned myself to reformatting the data to go into a MySQL database.

Meanwhile, at my full-time job for a research company, I was creating a CATI (computer-assisted telephone interviewing) system from scratch. The traditional model for this type of software is a server/client setup, where the server does all the heavy lifting, keeps track of call histories and makes all the decisions about what to do next. So I was storing data on the server, it was being translated in to JSON and sent to the client. But it was sloooooow and inefficient.

Discovering CouchDB fixed both my issues. At the shop, I set up CouchDB on one machine and without reformatting, I added all the existing data to a database. Less than a half hour later, all of the machines in the shop were accessing it. Back in the office, I ditched the server model entirely, and using CouchDB and a few design documents, made it so that the client computers could make all the decisions necessary to function. Things sped up considerably and again, I could use the data exactly how it was already structured in the program.

What would you say is the top benefit of using CouchDB?

  • Schemaless – I can format my data the way I want, and adding new keys to a record doesn’t require tons of preplanning or refactoring.
  • REST API – I can access my databases easily with any programming language, especially Livecode.
  • The Changes stream – I use Livecode as a backend system for mobile apps, and the _changes feed is great for syncing with local data.

What tools are you using in addition for your infrastructure? Have you discovered anything that pairs well with CouchDB?

Again, my primary programming language Livecode fits very well with CouchDB. I’ve created a library called “Daybed,” available on GitHub, that accesses CouchDB and synchronizes with local files.

What are your future plans with your project? Any cool plans or developments you want to promote?

At this point, I use CouchDB with almost every project I create. I am trying to replace old dated programs at work with new ones that use CouchDB as a backend. For example, we are still using a program based on MS Access that keeps track of all participants in research studies. I am working on a new program to handle all that with CouchDB, that would also integrate with the previously mentioned CATI program.

CouchDB is the backend for an iPad app I have on the Apple app store, with a Mac version coming soon. (Lite version also available)

I’m most excited about my Udemy course on CouchDB, I’m happy to provide a coupon code for CouchDB Blog readers. The course’s curriculum is available for more information.

 

Use cases are a great avenue for sharing useful technical information. Please consider joining the fun! Additionally, if there’s something you’d like to see covered on the CouchDB blog, we would love to accommodate. Email us!

For more about CouchDB visit couchdb.org or follow us on Twitter at @couchdb

CouchDB Developer Profile: Michelle Phung

Michelle Phung is a project management committee (or PMC) member of the Apache CouchDB project. Michelle has a bachelor’s in computer engineering from San Jose State University, with a minor in mathematics. Currently she teaches computer science at New York University and has been an active contributor to CouchDB for the past 2 years.

Recently Michelle shared some of her insights about the project with us.

Do you want to talk about your background, or how you got involved in CouchDB?

A few months after I applied for a position at Cloudant, Joan Touzet called me for interviews and then eventually offered me a job, working on the Cloudant Dashboard for IBM. The Cloudant Dashboard is actually a fork of CouchDB’s Fauxton.
Getting the job felt fantastic and really exciting, but at the time I really didn’t know anything about NoSQL or CouchDB, or even what IRC was. All of my database experience was using MySQL and its variations. My team at that time was: Garren Smith, Robert Kowalski, and Ben Keen. Garren and Robert had been in the community for a while by then, and Ben just picks everything up really quick. They all really helped me figure out what open source means, what it meant to work on CouchDB, to be part of the community, and of course, coding.

What areas of the project do you work on?

I work on Fauxton (the admin console), some small parts of the website (the 404 page) and the Fauxton Visual Guide.

The visual guide, Andrea Lee designed it for us when we were at IBM together. I’m so happy she agreed to do it. There are still some aspects of her design I haven’t implemented yet, actually. 🙂 But the site is one of my favorite things.

The 404 page, Paul Davis designed.

What’s a recent development/event/aspect of the project that you’re excited about?

Getting 2.0 out was pretty exciting — everyone was able to rally. There was a lot of build up, and it’s been a few months since then, but it still feels recent in my mind.
More recently than that: a week ago, the legal team from Apache asked us to stop using ReactJS, a JavaScript framework, for “legal reasons.” At first I kinda just sighed, but then as the news started to sink in, I got excited. I felt like it’s an opportunity to restructure the code base, or clean it, or take a look at it in a different way. Although, realistically, we probably won’t be making any big changes, but the possibilities abound!

What do you think are the top three benefits of using CouchDB as a database solution?

1. The filtered replication is quite cool.
2. It’s robust, every node can update itself.
3. You get Fauxton!

What do you look forward to in the future of CouchDB?

I’d like to see new ideas for the next iteration of the UI.

I know we just switched to Fauxton, but front end technology and trends move really quickly and I wonder what will be next in that space. There are a lot of features in CouchDB that aren’t implemented in Fauxton. It’s always interesting to see how concepts take shape and get realized into a visual form.

What advice do you have for someone who just discovered CouchDB?

It was a new way of thinking for me. There is a learning curve, but it’s really interesting. Also, make stuff that will help the people in the world.

 

For more about CouchDB visit couchdb.org or follow us on Twitter at @couchdb

Have a suggestion on what you’d like to hear about next on the CouchDB blog? Email us!