DevOps Zone is brought to you in partnership with:

Kris Buytaert is a long time Linux and Open Source Consultant. He's one of instigators of the devops movement, currently working for Inuits He is frequently speaking at, or organizing different international conferences and has written about the same subjects in different Books, Papers and Articles He spends most of his time working on bridging the gap between developers and operations with a strong focus on High Availability, Scalability , Virtualisation and Large Infrastructure Management projects hence trying to build infrastructures that can survive the 10th floor test, better known today as the cloud while actively promoting the devops idea ! Kris is a DZone MVB and is not an employee of DZone and has posted 26 posts at DZone. You can read more from them at their website. View Full User Profile

Using Broken Development Frameworks, or Why We Don't Use Zurmo

07.15.2013
| 4338 views |
  • submit to reddit

People often wonder why DBA's used to hate developers, and with DBA's also the System Engineers...

(note that I just expanded devops by adding dba's to the picture..)

So let me tell you a story ..

A couple of weeks ago one of our customers wanted to start experimenting with a new type of CRM. A gamified CRM. Zurmo.

So we set this thing up in a dev environment and started playing with it. While at first it looks nice...
the application actually felt pretty slow. Given that it is a low resource development environment, however, we looked no further.

Yet the next step is that we run into missing features, such as the fact that every contact you create by default is
set to private .. which really isn't productive for a CRM system where you want to be able to follow up on different
customer and share information.

So we tried figuring out what the database changes to do this in bulk would mean, surely it had to be a flag on the contact record .
Wrong, Zurmo uses an ORM for their database connectivity ...so their data model wasn't really trivial.

So we decided to look at the MySQL log file to figure out what db changes happened when updating the record
Yes there's better approaches but this one learned us a lot ..
The procedure I followed was pointing my browser to the page where I wanted to switch the checkbox,
log on to the mysql box, set global logging on . Clicked the checkbox and stopped global logging.

This gave me a log file with all the database actions required to make that one single change.
I had to cross check a number of times ... the file created by this short and small action was.
about 70K

Puzzled you start looking at the queries ...
The query list was full with "SELECT * FROM " stanza's ..
70K whopping K of queries that make your hair turn grey ...

I figured I'd file a bug .. but I couldn't find no bugtracker for Zurmo, only a forum (and forums are the most broken form of communication imvho) , yet the developers responded on Twitter.

The feedback wasn't really satisfying so we quickly decided that supporting this application was not something we would like to do..
and abandonned it..

The real question is who needs a Gamified CRM anyhow...

PS. So while finishing up this article on a late evening this week I might not have put in clear enough that the generated logfile was 70Kb .. I fear some people misunderstood that it generated 70.000 queries. Obviously a huge difference. But still the log file shouldn't have been bigger han 1Kb There should have been 2-3 queries max (https://github.com/KrisBuytaert/snippets/tree/master/zurmo)

But imvho if the size of the queries you are generating is bigger than the page you are generating you are most often doing it wrong.

Published at DZone with permission of Kris Buytaert, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Fabien Charlet replied on Mon, 2013/07/15 - 2:37am

 And I could post after this : Why developpers hate DBAs ....

I don't understand the fact that using an ORM is bad.

You're saying it yourself : Zurmo uses an ORM for their database connectivity ...so their data model wasn't really trivial

Which leads me to think that you don't understand well ORMs. ORM just plug your datas to tables. But if your data model is wrong, an ORM won't help you.

After a quick look at your file, I agree with you that the model seems complicated and that there is way too much queries. But this can be caused by poor development and nothing to deal with the ORM (I can sell you a phone with a very good battery but if you play 3D games all day long, your battery won't last anyway).

BTW, I found a bug tracker two clicks away from the homepage : https://bitbucket.org/zurmo/zurmo/issues

So please, don't fight the wrong battle. A poorly coded website which use an ORM doesn't mean that it's bad to use an ORM. It's like saying : this application is slow and use MySQL, so MySQL is slow.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.