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
- Website launched! Drupal Design Camp Boston
- Do you test new modules before uploading them to your live site?
- Linking Open Data Triplification Challenge 2009
- Mock Web Service for SimpleTest
- SEO issue with Drupal Forums
- custom search form and search filter as that in orkut
- QUAIL Accessibility Library + Drupal = Checking content before it is published
- RDFa Introduction
- Alternative RDF in core implementation draft
- Proposal for RDF mappings in core
- sending a cookie in the simpletest browser
- Half way through the RDF code sprint - Google Announces Support for RDFa
- Course
- Proposal for RDF in Contrib, storing and loading, after first day of sprint
- BossEd Bangkok 2009: Call for Presenters, Facilitators, Evangelists
- Views block exposed filters get indexed?
- using Views to construct a View?
- Drupal For Education
- Drupal For Education
- LinuxDays 2009
Drupal Groups
- back end Drupal developer (telecommuting ok) | Drupal Staffing
- Programmer - Drupal | Social & Scientific Systems, Inc.
- developer/designer | Looking for a freelance good developper/designer
- Principal Software Engineer | Slate
- CiviCRM Meetup this Wednesday
- Server Programmer for Facebook Games | Large Animal Games
- Drupal Developer | E*Pro Inc
- ical feed for this group is always empty!
- Contractor - Collaborative Journalism Site | EastBay Media
- May Drupal Meetup: Monday, May 11 at Stetson's
- Northern Virginia Drupal May Meetup
- Internationalization of website | International Resources Group
- "Introduction to CiviCRM" training May 6th
- Washington DC CiviCRM Meetup this Wednesday!
- CMS Expo 2009 Chicago April 29 - May 1....anybody going?
- Drupal at HostingWorld, Washington DC
- Drupal Site Building Security Training
- Web Development Fellow (1 Year Fellowship) | Oceana
- custom module development | medical student start-up
- DC CiviCRM Meetup
Zen-Den
- Digital Campus #42 - The Real World
- Zotero 2.0 Is Here!
- Idealism and Pragmatism in the Free Culture Movement
- The Spider and the Web: Results
- The Spider and the Web: What Is This?
- The Spider and the Web: A Crowdsourcing Experiment
- Digital Campus #40 - Super Models
- I'm leaving!
- Digital Campus #39 - Upgrade in the Downturn?
- All right, everybody out of the pool...
- Five ways to fake a good process
- How to cure your PTSD
- THATCamp 2009
- The American Historical Association Announces the Roy Rosenzweig Fellowship for Innovation in Digital History
- On process
- Anger, control, and finding the zone
- Digital Campus #37 - Material Culture
- Bill Easterly and the Culture of Nice
- Smithsonian 1.1 and 2.9
- Smithsonian 2.0
Mason (GMU) Vibe
- Georgetown BSchool Hires 13 Profs, Says No to Entrepreneurship
- Uber Philanthropists Plotting Global Takeover?
- Southwestern Oklahoma State Wins Biz Center Award
- VC Investors Don’t Care About BPlans
- What Happened @ Wharton’s BPlan Competition
- Entrepreneur v MBA Debate Continues
- Obama Nominates Micro-Lender to State Dept
- New Kindle to Target Campus
- What is an Entrepreneur? Video
- Mason Continues Social Entrepreneurship March
- "Science Is Magic" is LIVE
- Jimmy 2.0: Moving On
- Swine Flu is the Talk of the Town!
- Back from Hiatus?
- Apprentice to begin graduate school at Hopkins
- BRAIN gets a Mason neuroscience undergraduate
- Graduating senior to be a Brigham-Women's STAR
- GMU students recognized as Goldwater Scholar and Honorable Mention
- SACNAS abstracts 5/1/09
- Intel Science Talent Search