Sabtu, 21 Januari 2012

Python di Mozilla

Web Developers Mozilla sedang mengadakan AMA (Ask Me Anything) di Reddit (http://www.reddit.com/r/IAmA/comments/oonrg/iama_member_of_the_mozilla_webdev_team_ama) pada saat post ini sedang ditulis.

Beberapa points yang menarik:
Beberapa website Mozilla yang menggunakan Django adalah (Github link ke source code nya):
Add-ons dan Support sebelum nya menggunakan CakePHP dan belum lama sudah di migrate semua ke Django.

Dalam hal testing, salah satu Web Developers Mozilla menuliskan:

Testing - To add to what Fred said, we also use jstestnet (kumar303 wrote it) to include our QUnit(JavaScript/front-end unit tests) in our CI results. Our WebQA and Automation teams are big contributors to and consumers of the Selenium test automation project. We're working to get those tests included with the nose/QUnit results, because a failure is a failure is a failure, no matter where it failed.
We also have developed a culture of testing--this is something I've been meaning to write a blog post about. That means a few things:
  1. Time to write tests is included in how long it takes to write the code under test. A feature isn't complete without tests.
  2. If you break the tests, there's some good-natured teasing, and you lose points in the CI game. Light social pressure is incredibly helpful.
  3. If you break the tests, your first priority is fixing them.
Next I want to develop a culture of performance.
Deployment - This is my favorite topic! I've been giving talks on it for around a year now. I actually started putting a joke about that into my talks about it.
My goal with all the projects I touch is to deploy continuously. Not only does continuous deployment mean fixes get to users as fast as possible, but it has a bunch of requirements that are great in-and-of themselves, like...
  1. You must have a robust, automated, and fast deployment pipeline. One-button and wait.
  2. You must have a high confidence level from automated tests so you don't break things.
  3. You must have active, real-time monitoring of the site.
  4. You must keep master/trunk/whatever branch in a clean, working state, all the time.
  5. Developers must develop a sense of ownership over their code that lasts all the way out the door.
It also has a number of side benefits, like not doing code pushes at night when people are tired, or about to leave for the day.
Some projects are closer than others. We learned a lot from Etsy (link to blog post and video, watch Kellan and Erik's sections). But their Deployinator tool is Ruby, and it took them a while to open source it, so we built Chief to do the same thing (run some shell scripts, print a bunch of output).
We've got push-button production deploys with Chief or other, ad-hoc tools, for a few sites now. We've got it set up in the -stage environment Fred mentioned for a few more. We use another tool called Freddo to deploy -dev environments on Github post-push hooks. My goal is to have all new environments set up with Freddo and Chief by default in the future.
Salah satu utility untuk testing Mozilla.org adalah sebuah project yang bernaung di: https://github.com/jbalogh/test-utils. Mereka juga menggunakan nose testing framework (http://readthedocs.org/docs/nose/en/latest/)

Beberapa angka yang cukup menarik perhatian:
  • Mozilla memiliki lebih dari 100 websites
  • Traffic: 1000+ pengunjung/day - 100juta+ pengunjung/month
  • API: Milyard-an API calls
  • Localized dan juga tersedia translasi untuk 30+ bahasa 

Tidak ada komentar:

Posting Komentar