A Valuable Lesson Learned

I really need to start actively blogging
again,, I’ve been doing so many other things it kinda took a back seat.
To start the process I’m going to admit to something that probably belongs
alongside all the stories from Bill and Pauls Worst Practices session at
Lotusphere…

One of the new features in BlogSphere
V3 Beta 9 was the integration of OpenLog to catch any errors that might
occur when the rendering agents ran. I also included the ability to output
different levels of debugging information so if anybody contacted me with
a problem I could get them to turn on the debug and they would be able
to send me logs that would help me trace the problem quickly. There are
a couple of different levels of debugging ranging from minimal to insane.
When set to ‘insane’ every stage of the agent produces a new debug document
in the database so just viewing your blogs homepage could result in about
200 new debugging documents.

While testing it out I turned on debugging
to the ‘insane’ level on this blog and then promptly forgot about it. I
went on vacation to Disney World for a week and came back to find my server
starting to run very low on disk space. In over just one week I had managed
to add over 7 million debug documents to my blog database increasing it’s
size to just over 26 Gb.

The Domino server was still ok and serving
pages from my blog but obviously I had to delete all these documents from
the database. I had a number of options, I could go into the view where
they were all stored and try select them all and delete them manually or
I could write an agent to delete all the documents.

Have you ever tried a ‘Select All’ on
over 7 million documents, it was still trying to select them after one
day. I had to drop my Domino server just to get the notes client to timeout
as even ctrl-break wasn’t working on the client.

So I decided to try the agent route,
it was working very slowly and would delete about 75,000 documents an hour.
My guess is that it had to keep recalculating the view’s index and it would
have taken about 4 days to get rid of the documents and I’d still have
to deal with the deletion stubs taking up space.

In the end I copied the .nsf from the
server to my client and then deleted the file from the server. I then created
a new replica of the database back onto the server and wrote in a replication
formula to exclude the debug document. It only took about 18 hours to complete
with most of the time taken up by the Notes client reading in the local
database to figure out what to replicate and then about 40 minutes for
it to actually create the new replica.

In the end I ended up with a new replica
of my blog minus the 7 million debug documents and no deletion stubs to
worry about.

And the lesson… ‘Insane’ means insane,
if you do turn on debugging in Blogsphere for any reason make sure you
remember to turn it off when finished and delete the debug documents.

Tagged with:
Posted in Uncategorized

Announcing BlogSphere V3.0.1 Beta 8

The next beta release of BlogSphere is
nearly ready and it has some exciting new features that I’d like to share
with you.

Star Ratings :

The old version of BlogSphere had a
feature where visitors to your site could rate a photo using a radio button
style interface so when coding this for V3 I decided to make it a little
more Web 2.0ish and I went for the very popular star ratings system where
you use hover the mouse over the rating you want and click the button.
The ratings are saved via AJAX and the stars on screen are updated without
refreshing the entire page.  I have also expanded the rating function
so that it can be used for blog entries, download and static pages. This
feature is easy to implement by adding the BS_Ratings tag to your page
template document where you want the stars to appear.

Drop Down Menu :

I’ve always wanted to implement a nice
dropdown menu so i could create a menu poiinting to different areas of
my weblog and so that’s exactly what i did.  The Notes UI for this
still needs a little work however you can now create simple and easy menu
for your blog just by adding the BS_Menu tag to the banner area of your
page template.

Move Up / Move Down :

Positioning data has been added to a
number of items like photos in an album or links in the Web Logs sideblock.
 The Notes UI has an UP/Down button to help you position these items
easily.

JavaScript Performance :

Different features in BlogSphere require
different bits of JavaScript however if your not using a feature then you
no longer have to load in the JavaScript for it.  In the Blog Configuration
you can now disable the loading of JavaScript for features you do not need
and if you disable all the Web 2.0 features then the base jQuery library
will not be loaded either.

Agent Logging & Debug :

OpenLog from OpenNTF has been implemented
in about 90% of the LotusScript used in BlogSphere ( the last 10% wil be
done by beta 9 ). Using OpenLog has opened up a new method for Agent Debuging
which will be handy for anybody who is using a hosted blog and does not
have access to the server console. The blog configuration document now
has a ‘Debugging Level’ option and when it’s set to anything but off then
as agents and the render engine run it will add debug output to a special
view in the database. Just don’t set it to ‘Insane’ unless you want to
create about 100 documents every time someone looks at your blog. Agent
errors are always recorded using OpenLog even if debugging is disabled.

Photo Albums :

A lot of work has been put into the
Photo Album features in Beta 8. Draft albums and Photos now work as expected
and photo import is now slightly faster.

BlogSphere CSS :

Just implemented a new CSS converted
from MovableType? Well if you have then your probably missing the special
CSS used by BlogSphere for it’s own specific features. To save time there
is now a button in the CSS document called ‘Set Defaults’ which will fill
in the BlogSphere specific CSS for you.

Quick Set Blog Skin :

From the page Skins view you can now
highlight a skin and click the ‘Set As Active Skin’ button to quickly apply
the skin to all areas of your site.

Side Blocks :

The HotBlogs sideblock is back and the
Top 5 Rated Pictures sideblock is now available. These were the last few
sideblocks from V2 that had yet to be implemented in V3.

HouseKeeping Agent :

The houseKeeping agent has been completed
and expanded. It will now purge old Log files from both the internal log
or external log if your blog is configured for one. It can automatcially
lock old blog entries from new comments after a specified number of days
and it even reduced the rating of older documents to give newly rated documents
a chance to bubble to the top of the list.

I’ve also taken a lot of the suggestions
and bug reports on OpenNTF and tried to implement/fix as many as I could.
You will also see some general performance increases within the template.
 You will be able to download the beta 8 release from OpenNTF by the
end of the week.

The last and final beta before Gold
Status will be next and this will finally see the introduction of the web
based management interface along with integration with ‘BlogSphere Manager’,
the enterprise blogging portal.

Tagged with:
Posted in Uncategorized

Cross Site Script Exploit fixed in V3.0.1 B7a

Download it now from OpenNTF.

Tagged with:
Posted in Uncategorized

Cross Site Script Exploit in BlogSphere V3.0.1 Beta 7 and lower

A XSS exploit has been brought to my attention
in BlogSphere V3.0.1 Beta 7 and earlier.  The exploit works by adding
javascript to one of the fields used for adding comments to a blogsphere
V3.0.1 based site.

I am working on a fix for the exploit
and should have it release very quickly however for the moment I would
suggest disabling comments in the master configuration.

Tagged with:
Posted in Uncategorized
Archives