BBC Home

Explore the BBC


16th January 2019
Accessibility help
Text only
default banner
BBC Homepage

DNA Hub
Knowledge Base
Feedback
Search
Who's Online

h2g2
360
iCan
collective
Book of the Future
Talk Buffy
Get Writing
WW2
Parent's Music Room

Contact Us


Like this page?
Send it to a friend!

 
New visitors: Create your membership
Returning members: Sign in


How DNA Works at the Server Level

The DNA system is based around a database server, a collection of web servers, and a number of application levels.


Server Specifications

The specifications for the database and web servers at the date of publication, 2005, were as follows:

  • Database - Quad Pentium IV Xeon 3GHz HT, 4Gb RAM, Windows Server 2003, SQL Server 2000

  • Web servers x 8 - Dual Pentium IV 3.2GHz HT, 2Gb RAM, Windows Server 2003


How DNA Serves Pages

Let's look at how each of the components works together to serve a DNA page to a visitor. It starts with a page request coming in to the BBC servers.

Proxy Passing and Cacheing

When a request comes in to the BBC for a DNA page (ie a URL that starts http://www.bbc.co.uk/dna/) the proxies send the request through to one of the four web servers. These web servers analyse the URL and check the local cache; if the page is cached then this version is served back to the outside world, but if it isn't it's passed through for creation and serving by the main DNA application.

Database Querying

The DNA application is written in C++. Its purpose is to create well-formed XML by querying the SQL database for the information that's required to build the requested page.

For example, if a request comes in for a non-cached article page, the DNA engine will have to query the database for things like the author's name and account number, the subject and contents of the article, the status of the article (ie Edited, Help Page etc), and so on. It might do this using an SQL query like the following:

SELECT u.UserName, u.UserID, g.EntrySubject,
       g.Text, g.Status
FROM GuideEntries g
INNER JOIN Users u ON g.Editor = u.UserID
WHERE g.EntryID=78703

Please note that this is only for illustrative purposes, and doesn't reflect reality - most pages require multiple queries, most of which are a lot more complicated than this simple example!

Construction of XML

Once all the SQL queries have been processed by the database, the DNA application then builds a well-formed XML tree containing all that data. For example, the XML fragment that describes the date when the article was created may look like this:

<DATECREATED>
  <DATE DAYNAME="Monday" SECONDS="48" MINUTES="18"
        HOURS="18" DAY="15" MONTH="07"
        MONTHNAME="July" YEAR="2002"
        RELATIVE="Last Week" />
</DATECREATED>

Similarly, if an article is written in GuideML, then the GuideML for the article will be pulled out of the database and wrapped up in an XML fragment like this:

<ARTICLE>
  <ARTICLEINFO>
    ...
  </ARTICLEINFO>
  <SUBJECT>
    How DNA Works at the Server Level
  </SUBJECT>
  <GUIDE>
    <BODY>
      <P>The DNA system is based around...</P>
      ...
    </BODY>
  </GUIDE>
</ARTICLE>

The part between the <GUIDE> and </GUIDE> is exactly what the author has written as their GuideML article, which is why DNA only accepts GuideML that is properly-formed according to the syntax rules of XML.

XSLT Stylesheets

Once the DNA application has created a valid XML tree containing all the required data, it passes this through to the next stage in the process, the XSLT stylesheet. Each different skin on each DNA site has a different stylesheet, though there is a base stylesheet that contains most of the functionality required by DNA sites which is cascaded by local stylesheets.

XSLT is a language that takes XML and transforms it into another form, in this case HTML. The actual transformation is done by the MSXML module, which takes the XML produced by the DNA application and the XSLT stylesheet for the relevant skin, and produces HTML.

Once the HTML is produced, it's cached where applicable, and is sent back to the outside world, via the BBC proxy servers. And that's it!


Implications

Because the DNA application produces XML that contains all the required information but doesn't care about layout or presentation, the XSLT stylesheets can easily be changed to produce completely different types of layout, in totally different languages. An obvious consequence of this is the ability to support multiple skins in each DNA site, which simply display the relevant information in different ways. As an example, consider the following ways of viewing h2g2's Front Page:

Similarly, the XSLT stylesheets don't need to output HTML; they could just as easily output WML, markup for interactive TV, or any other applicable markup language.

Indeed, browsers like Internet Explorer 6 can process XML and XSLT locally, so it won't be long before DNA could serve pure XML to the public, and their browsers would then download our XSLT stylesheets for local storage, and their local computer would apply the XSLT to the XML to come up with the final HTML. The upshot would be the opening up of DNA skins to the public to design and to circulate, meaning the BBC would only have to maintain a small number of functional skins plus an XML feed.

It's an exciting thought, but don't hold your breath!


Discuss this Article

People have been talking about this Article. Here are the most recent Conversations:
I really want that XML feed! (Last Posting: Oct 11, 2006)
Plain skin (Last Posting: May 20, 2003)
links don't work? (Last Posting: Aug 20, 2002)
Exciting Developments (Last Posting: Aug 20, 2002)






Article Data
Article ID: A787034 (Help Page)
Written and Researched by:
Mark Moxon

Edited by:
Peta

Date: 15   July   2002


Referenced Sites
h2g2 in the Alabaster skin
h2g2 in the Brunel skin
h2g2 in the Classic Goo skin

Please note that the BBC is not responsible for the content of any external sites listed.

Most of the content on this site is created by our Members, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the BBC. The BBC is not responsible for the content of any external sites referenced. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here to alert our Moderation Team. For any other comments, please start a Conversation below.