BzZzZ - ustvarjamo podobe logo
slovenščina
english
Disable statistics collection in Joomla - less backups, faster response

In Joomla 1.0 (or Mambo before that) one could simply disable statistics collection by choosing equaly named option in global configuration - guess what, this is not possible in 1.5. and it looks like it also won't be possible in 1.6.

While article view and weblink clicks statistics are a nice feature for low traffic sites there are number of problems arising from it - basically this kind of statistics means that for every pageview or link click Joomla has to write new data to a database. This has numerous implications:

  • On every article view Mysql UPDATE has to be run which slows a site down by itself
  • Constantly updated tables can't be cached by Mysql query cache (another slowdown)
  • If you are doing incremental/differential backups that store only changed parts of your site, new backup of the database will be created on every run even if your site hasn't changed for a long time. If you use remote backup services like Amazon S3 this will directly result in increased charges. With multiple sites or even few 1000 accounts holding multiple sites each in case of shared hosting providers, numbers can get quite significant.
  • If you are using built-in Joomla view cache (activated by turning on caching in global configuration) article statistic won't work anyway - page view is recorded only when cache expires and com_content is actually run to recreate it and so this statistic is totally unreliable.

 

By using this simple hack you can shrink your backups and improve your Joomla site's performance at the same time:

Beri dalje...
 
Showing different templates or sites to different visitors in Joomla

This is one of the Joomla's hidden features - there is builtin JBrowser library in Joomla that detects browsers and their capabilities and by using it you can show different template or content to different user types.

We are successfully using it on some of our sites to detect whether user/browser has javascript support (or is a robot) and redirect them later to appropriate site version with few simple lines of code:

 

Beri dalje...
 
Turbocharging your extension (with Joomla cache)

Video and slides from our "Turbocharging your extension" presentation at J and beyond, an international Joomla conference in Wiesbaeden, 30.5 - 1.6. 2010.

How to make your Joomla extension run up to 10 times faster!

 

Video


Get Flash to see this player.



Beri dalje...
 
Why URL as a cache id is inherently dangerous
While this article focuses on Joomla, this is also valid for all sorts of web applications - from Drupal to nearly all cache classes on phpclasses.org - they all use the same, inherently faulty approach.

 

Background

Caching is used in all sorts of software and hardware to speed up access to data that has been previously retrieved or generated - such data is stored and subsequent requests for the same data are quickly served from stored copy. The longer it originally takes to retrieve or generate some data, the higher are speed gains when data is served from cached copy.

With php web applications such gains are especially important as php and all surrounding web technologies are not particularly efficient and due to the nature of web there are a lot of request for the same data (multiple users viewing the same page). This inefficiency gets significantly bad when complex calculations or remote data accesses are involved and that's why nearly all advanced web applications make extensive use of various caching techniques.

 

Beri dalje...
 
Root mount error after upgrade to FreeBSD 8

After upgrading our backup server from 7.2  to Freebsd 8 it refused to boot as it couldn't mount root device. 

ROOT MOUNT ERROR:
If you have invalid mount options, rebott, and first try the following from
the loader prompt:
set vfs.root.mountfrom.options=rw
and the remove invalid mount options from /etc/fstab.
Loader variables:
vfs.root.mountfrom=ufs:/dev/da6s1a
vfs.root.mountform.options=rw
[manual boot prompt]
mountroot> ?
List of GEOM managed disk devices:
Loader variables:
....
##################################

 

Beri dalje...
 
Using caching in Joomla extensions

There is much confusion about Joomla 1.5 cache capabilities, it's variations and possible ways to implement it in extensions. Incomplete or missing documentation is the first to blame, but the fact that even core extensions didn't use cache until Joomla 1.5.15 or that they stop working properly when cache is turned on (related items module - fixed in upcomming 1.5.16 release, mainmenu etc.) doesn't help either.

I hope the following information will help you create another excellent extension that will not only do it's job, but will also be able to do it fast and scale well under a heavy load.

 

Give me speed! (Why bother by using cache at all?)

On a typical web site the same content gets displayed over and over again to anyone who visits your site. Without cache everything has to be generated for each and every page view - but caching can speed up this process by storing some or all of the information your code generates in a cache object and return it when next visitor requests the same page or particular piece of information.

Beri dalje...
 
Using mysql socket in apache jail

Confining apache and mysql in separate jails creates interesting problem - how to make them communicate with each other. TCP works, but is much slower than using mysql socket - some measurements show up to 10 times difference. If you add current FreebSD syncache bug that causes packet drops in TCP, this becomes much needed option.

To be able to communicati trough unix sockets both jails must have access to the same directory. For start create required directories:

  • In parent system create subdirectory /usr/mysqltmp
  • In each jail create subdirectory /mysqltmp
Beri dalje...
 
Sodelujemo pri razvoju Joomle

Vodja naše agencije, Klas Berlič, je v decembru minulega leta postal član Joomla bug squad-a, ki je sestavni del razvojnega teama odprtokodnega projekta Joomla.

Klas je nasploh prvi Slovenec, ki mu je bila dana priložnost sodelovati pri razvoju tega projekta in je že tudi aktivno sodeloval pri nastanku zadnjih dveh različic sistema.

Joomla je najbolj razširjen sistem za urejanje spletnih vsebin (CMS) na svetu, ki beleži že več kot 9 milijonov namestitev. Med drugimi ga uporabljajo Združeni narodi, podjetje Danone itd, za izdelavo spletnih strani pa ga uporablja tudi naše podjetje. Sistem namreč omogoča uporabniku prijazno objavljanje in urejanje vsebin na spletnih straneh - urejamo in objavljamo lahko vse vrste vsebin, kot so novice, fotografije, dogodki, katalog izdelkov in podobno. V kolikor nam zmožnosti, ki so vključene v osnovno namestitev ne zadostujejo, nam je na voljo več kot 4500 razširitev. Vse to je mogoče zaradi odprtokodne narave projekta in njegove licence, ki omogočata brezplačno namestitev in uporabo, hkrati pa vzpodbujata tisoče programerjev po vsem svetu, da prispevajo k rasti projekta s svojimi razširitvami ali predlagajo različne popravke. Posledica takšnega modela sodelovanja sta skokovita rast in razvoj, ki mu na razvoj v posameznem podjetju omejeni, klasični sistemi, težko konkurirajo.

»V BzZzZ že od samega začetka uporabljamo odprtokodne rešitve kot konkurenčno prednost, saj se tako lahko posvečamo potrebam strank in ne izumljanju tople vode. Ves čas smo z manjšimi prispevki vračali skupnosti, kar smo od nje dobili, članstvo v JBS pa je le še en dokaz, da je naša usmeritev pravilna«.

 
  • strateško usmerjeno
  • integrirano
  • s kreativnostjo pospešeno
  • učinkovito komuniciranje
© BzZzZ 2008
stik z nami    zaposlitev    kazalo strani