Last update: 02/06/2016 13:53
SAMBA interacts with UIKey in many ways. It relies on indirect targets to get resources such as documents and images that may be relocated over time.
OK, let's be more practical than that! Example: the SAMBA logo is used in a
number of cases on different websites (the one of Three and a half
rose, the one of Contraste, the one of UIKey, on
Quitus, on Lato Sensu Management, etc.). To get the SAMBA
logo, each website refers to a specific key defined in UIKey to know where the
logo is actually stored. The key is fixed, but the resource it references may
change location. Here, the SAMBA icon, PNG format, is identified with the
samba-favicon PNG" key, which points to
http://www.1ls.be/media/samba.png". If tomorrow we decide to use a
CDN to store the image instead of using "
1ls.be", we simply need to
change the target of the key in UIKey, and all of our websites would still refer
to the same key but now pointing to somewhere else. This is ideal. However, the
global mechanism has a drawback: there are 2 calls for any resource reached in
this way. The first call goes to UIKey, which responds by saying where the
resource is to be found, and the second call goes to the actual place where the
resource is to be found. That is 2 calls instead of 1 and it can have a
significant impact on some heavily requested websites.
This is where a programmatic call to UIKey can improve the global process by caching the target.
As UIKey features an XML interaction scheme  , we simply need to call it in this manner, get the result, cache it for a given period of time and serve the cache as long as it is reputed to be valid (which is basically a decision of the caller). We're done!
This is exactly what's done on SAMBA's website (with a 1-day cache). This combined with a few performance tuning leads to pages that can be served in less than half a second, for the benefit of our users. In a nutshell, we benefit from the intrinsic capability of UIKey to point to the proper resource and we still offer a nice user experience to our users!