In order to improve performance and scalability, sometimes it makes sense to turn html (embedded with some tag library or Xquery code) into real XQuery code. It can then be put in the Modules database making it immediately available for use. This is just like what Java Server Pages does!
Transactions in MarkLogic can sometimes be challenging to work with due to restrictions such as inter-transaction visibility, transaction control, single update limitations, and non-transactional file system updates. Isolating code that updates portions of documents that may be called multiple times during a transaction can be complicated. Check out a simple transaction helper framework that addresses these difficulties.
The demo is a link to a presentation given at the 2011 MarkLogic Conference in San Francisco.
Beyond standard query optimization in MarkLogic, scalability and performance can often be dramatically improved by using strategies or patterns that avoiding making database queries.
The demo is the presentation given at the 2011 MarkLogic Conference.