Welcome to Arman Anwar's Scrap Book
Welcome to Arman's digital scrap book. Here you will find his notes on things that he enjoys and wrestles with. Two subjects that will often be addressed are Drupal and Web engineering. On rare occasion, you will find opinions on matters he has no qualification on.
Schema API: Drupal becomes reflective
I was at the Affinity Labs yesterday and Alex Barth gave an introductory talk about the Schema API in Drupal 6.0. I could glean the following pragmatics from his informative presentation:
- Drupal 6.0 is now aware of its schema, modules can query this interface and find out what the structure of the database schema is.
- The install files will not have hard coded DDL/SQL for the creation of tables in a Drupal instance's schema.
I've penciled in a note to myself to review this further but what worries me is the fact that are we complicating Drupal to a level where it will suffer the fate of some many other technology platforms. Don't get me wrong I still like the OR Managers such as Hibernate in the Java world but I'm very cautions at what may lead to conceptual bloat in Drupal.Perhaps Death by Bloat is a fundamental law of nature.
- aaanwar's blog
- Login or register to post comments
On Forester report on Open Source CMSes
I have not been able to get my hands on the original document, there is an distillation review of the report on CNet.
Interestingly the report cites Drupal and Alfresco and two leading contenders for the OSS CMS (or rather Web-CMS) space.
As someone who followed Alfresco initially, I was quite surprised that it came up on the list. Alfresco was more of the classical content management system -- or rather what I like to call digital asset management system like Documentum, etc. They had recently released a WebCMS capability. Going by innuendo the technical architecture of anything produced by Alfresco would have sufficient merit. But to me what differentiates Drupal is the number and variety of contributed modules. How Alfresco fares on that front or will continue to fare seems questionable. I think part of the reason is that the barrier to entry for someone to develop interesting functionality is much lower for Drupal as it is based on the LAMP stack as opposed to J2EE. Pundits may question Drupal's scalability credentials -- as someone who manages the development of a very large Drupal install and I mean large in terms of features, content and traffic -- the issue of scalability is tractable.
- aaanwar's blog
- Login or register to post comments
Drupal CDN module does not scale
Distressing comment about the Drupal module that works with CDNs: "This module is not yet production ready. It works fine on smaller sites, but it doesn't scale yet"I'm thinking of using ProxyHTMLURLMap for this purpose.
- aaanwar's blog
- Login or register to post comments
Darth of Drupal Architecture articles
I've had a hard time finding articles and diagrams that illustrate the Drupal architecture. I've decided to post items explicitly in that area.Stay tuned.
- aaanwar's blog
- Login or register to post comments
Drupal Architecture
The organization of the Drupal’s architecture at the subsystem level is traditional. It requires the use of a web server to handle transport via the http protocol and a relational database for persistence. Drupal exhibits the traditional three tiered architecture as seen in the attached image:
- The theme layer adds visual style to content generated by the business layers – this layer is generally seems heavy customization during the implementation of a target solution.
- The Business layer consists of components, known as modules; implement both functional and non functional features.
- The Utility stack cross cuts level and provides access to the database layer, controller (as in MVC), security, etc.
- aaanwar's blog
- Login or register to post comments
Three items on the Wishlist for the current Drupal apache_solr module
The current Solr-Drupal integration module written by Robert Douglass is very sophisticated. There are a three things that would be helpful:
- The ability to with in with a Solr Cluster -- split read writes -- you send updates to a solr update instance and read from a read instance.
- Allow a cck field mapping wizard in the admin pages
- Generate a schema.xml for updating the Solr scheme when the mapping of cckfields is updated.
- aaanwar's blog
- Login or register to post comments
Drupal Apache Solr <----> Views integration under way
I seems that there is an effort to integrate the Solr module in Drupal to the Views family of modules, details here.Offered to collaborate with Thomas -- the chap running the effort.
- aaanwar's blog
- Login or register to post comments
Generating Primes -- generatively
I have a new resolution that I'll write simple snippets of code that exercise my brain :-).
This is a simple code snippet that generates primes in a "generative" fashion -- it uses
previously generated primes to generate new primes.
Checked its correctness by comparing it to http://primes.utm.edu/lis...
$num_primes=1000; // the number of primes you want to generate
$primes = array(2,3,5,7); // prime the pump
$test=9; // set the first test prime
while(count($primes)<$num_primes) {
foreach ($primes as $prime) {
if ($prime > $test/2) { // if u haven't found one u won't
$primes[]=$test;
break;
} else if ($test%$prime===0) { // caught -- not a prime
break;
}
}
$test+=2;
}
print_r($primes); // print out the goodies
- aaanwar's blog
- Login or register to post comments
Spiral Generator
Ever wanted to draw a spiral like below:
*****************************************
* *
* ************************************* *
* * * *
* * ********************************* * *
* * * * * *
* * * ***************************** * * *
* * * * * * * *
* * * * ************************* * * * *
* * * * * * * * * *
* * * * * ********************* * * * * *
* * * * * * * * * * * *
* * * * * * ***************** * * * * * *
* * * * * * * * * * * * * *
* * * * * * * ************* * * * * * * *
* * * * * * * * * * * * * * * *
* * * * * * * * ********* * * * * * * * *
* * * * * * * * * * * * * * * * * *
* * * * * * * * * ***** * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * *** * * * * * * * * * *
* * * * * * * * * * * * * * * * * * *
* * * * * * * * ******* * * * * * * * * *
* * * * * * * * * * * * * * * * *
* * * * * * * *********** * * * * * * * *
* * * * * * * * * * * * * * *
* * * * * * *************** * * * * * * *
* * * * * * * * * * * * *
* * * * * ******************* * * * * * *
* * * * * * * * * * *
* * * * *********************** * * * * *
* * * * * * * * *
* * * *************************** * * * *
* * * * * * *
* * ******************************* * * *
* * * * *
* *********************************** * *
* * *
*************************************** *
*
The following code will do the trick -- I don't like the
way it is written -- I would like a f(x,y) approach
rather than this generative manner. If I have some time
I'll write that up too.
function gen_spiral($side_len=79) { $x=$y=$side_len/2; $len=1; $direction=0; $grid=array(); $dx=0; //delta x $dy=0; //delta y for ($count=0;$count<$side_len;$count++) $grid[]=array_fill(0,$side_len,0); // init 2d grid $grid[$x][$y]=1; //return $grid; $run=true; while ($run) { switch ($direction) { case 0: $dx=1; $dy=0; break; case 1: $dx=0; $dy=-1; break; case 2: $dx=-1; $dy=0; break; case 3: $dx=0; $dy=1; break; } for ($count=0;$count<$len;$count++) { $x+=$dx; $y+=$dy; if ($x<0 || $y<0 || $x>=$side_len || $y>=$side_len) { $run=false; break; } $grid[$x][$y]=1; } $direction=($direction+1)%4; $len++; } return $grid; } $spiral=gen_spiral(41); foreach ($spiral as $line) { foreach ($line as $cell) { echo ($cell==0?' ':'*'); //echo $cell; } echo PHP_EOL; }
- aaanwar's blog
- Login or register to post comments
Lucene indexing performance parameters -- mergeFactor, mergeFactor, minMergeDocs
Key Lucene indexing performance parameters:
- mergeFactor -- this variable controls how many index segments get created. Interested tidbit that it uses power law to decide when to merge the segments. In short more segments quicker the indexing but slower the searching.
- maxMergeDocs -- this limits the documents per index segment.
- minMergeDocs -- this controls how many have to end up in the buffer before they are written to disk.
- aaanwar's blog
- Login or register to post comments
Drupal Tech
- Fatal error
- Programmer/Analyst | EDUCAUSE
- Lazy Loading Theme Variables
- Excessive cache_get time
- Best practices for URLs, Titles, etc for SEO
- Utilizing Multiple Caching Strategies?
- Optimizing a Views generated block
- Technical Architect / Consultant | Oshyn INC
- First Cache Router release for Drupal 7
- Drupal in Academia Showcase
- New group page design
- Pathauto, clean urls, SEO in business directories
- Top 10 Modules for educational site?
- An old Tech Learning Article
- D6 Page Compression vs. Apache2 mod_deflate?
- Drupal Classes or Courses at 3rd level/Uni/College, online or face to face?
- Drupal Classes or Courses at 3rd level/Uni/College, online or face to face?
- Thought for food?
- Interesting post on teaching with Drupal
- Best solution for assignment calendar?
Drupal Groups
- Programmer/Analyst | EDUCAUSE
- Silver Spring Youth Media Group Looking for Drupal Sensei (revered teacher)
- Drupalist | Lucidus Corporation
- Drupal Labs?
- Experienced Drupal Developer for Social Network Site Creation | Myself
- Global Justice sprinters invite DC drupalers to dinner at Tamarindo Dec 16th (tomorrow night)
- Sr. Drupal Developer | Contractor | Live Liberty, LLC
- Drupal Developer/Theme Designer | Kehila Chadasha
- Washington, DC Drupal Meetup December 8th at Stetson's
- [JOB] Drupal Developer, Dulles, VA | CMP (client)
- Contractor - social network | Society for Human Resource Management - SHRM
- Experienced Drupal/Drigg Freelancer | Small DC-based Company
- Senior Programmer - Tech Lead | Forum One Communications
- spare an hour for Drupal usability
- PHP / Drupal Developer | Grand Junction Design
- Drupal Tutor | Michelle Cantrell
- Vote for a Drupal Site to Win Apps for Democracy Contest!
- Drupal Developer | Saforian
- DC Drupal Meetup November 17 at Stetson's
- PHP Programmer | 4Site Interactive Studios, Inc.
Zen-Den
- Jargon of the Day: NGO, CBO
- Virtual Museum of the Gulag Seized
- Looking backward, looking forward
- Digital Campus #35 - Top 10 of 2008, Predictions for 2009
- Four skills I would never have acquired if I hadn’t lived abroad
- Jargon of the Day: Multilateral
- A semi-definitive guide
- Jargon of the Day: Holistic
- Development 2.0 – More than jargon?
- Nothing, something, and more
- Journal of American History Begins Podcasting
- International Development on Twitter, Part II – Five more people to follow
- Omeka Wins $50,000 MATC Award
- Sol LeWitt and the Soul of Creative and Intellectual Work
- Leave the Blogging to Us
- Jargon of the Day: Granularity
- International development on Twitter, Part 1
- Digital Campus #34 - Extra, Extra!
- Jargon of the Day: Operationalize
- Giving thanks
Mason (GMU) Vibe
- Reflections on "ThinkGeek: The Interview"
- New Hampshire Drives Growth with BPlan Comp
- Creative Capitalism and the Continuing Social Entre Debate
- Facebook Breast Controversy Highlights Mommies
- Rickrolled IRL - I Think Reality is Collapsing...
- Congress to Shakedown Philanthropists?
- App St. Wins Juicy Ideas Contest/Trip to Googleplex
- Big New Post Coming Soon...
- New Study of Diversity on Campus
- Now is Time to get ‘Barbarian’ on Your Competitors
- 8 Rankings of B-Schools
- Rolex Recognizes Social Entrepreneur w/ Rice Husk Powr’d Cooker
- How Entrepreneurial is Your School?
- Cool Social Entreprise: Teecyle.org
- Watching Announcement of Sec Ed Arne Duncan…
- The Ender Saga Fills a Plot Hole Nicely [Ender in Exile Review]
- Angel Investments Down
- Columbia Calls for Social Entrepreneur Fellows on ME
- The Ideablob is Growing on Campus!
- Campus Entrepreneur Goes to Snatch Nike’s Soul!