On Aug 28, 2008, at 6:44 AM, Whitby, Rob, CMG wrote:
I looked at writing web apps in pure XQuery, but found some big
limitations. ML's web server is lacking in some key features like
caching.
With MarkMail we use a pair of Squid Cache servers as a reverse proxy
and they do page caching for us.
http://markmail.blogspot.com/2008/02/squid-cache-searching-our-own-dog-food.html
In my opinion it would be fiscally irresponsible to put page caching
on your MarkLogic box. That's a task that can easily be done by a
cheap front-end server running open source software. Let your
MarkLogic box(es) focus on MarkLogic related tasks. Give MarkLogic
all the memory you can for its expanded tree cache, compressed tree
cache, list cache, range indexes, and so on. Offload the page cache.
XQY is not great at transforming XML into XHTML (why no XSLT
engine?!). The single-tier architecture may be ok for rapid
development
of demos, but doesn't suit larger applications.
The choice today depends on what matters to you. For us on MarkMail,
speed matters most. We want users to see the site as instantly
responsive, even while we have Google pulling 8 pages per second from
the site and poorly written bots pulling even faster. Things need to
move!
Lucky for us, XQuery can be extremely fast at transforming XML into
HTML. That's because all the work is done on the optimized internal
document representation.
You may or may not like recursive descent as a style. Our point of
view on the MarkMail team is that XQuery with recursive descent lets
us do everything XSLT would, and it gets the job done really fast.
For example a lot of
"non content" data is best stored in a relational database (eg user
data) but ML can't connect to anything other than by http (afaik?).
You may be interested in MLSQL, a way to access relational databases
from XQuery. We used it on a project where XQuery had to fetch user
data from a relational database.
http://developer.marklogic.com/howto/tutorials/2006-04-mlsql.xqy
I decided on using providing REST Web Services from ML, and connecting
to them by XCC.
That's a fine architecture too! :)
-jh-
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general