Usually when we think about EC2 we think about using its elasticity to create highly scalable sites. One other cool way we can take advantage of EC2?s elasticity is to create instances for load testing our site, regardless of where it is hosted.
EC2s pricing model can be fairly expensive for full time hosting. If you don?t have huge demands I?d recommend something like Linode. However, EC2s instance hour billing model is perfect for load testing your site. For just a few bucks you create 100 nodes and wreak havoc on your server for an hour.
Apache comes with a nice tool for havoc wreaking called ApacheBench. You give ApacheBench a url and a number of connections to make and it measures how long each of those connections takes.
A typical session looks something like this:
ab2 -n 1000 http://google.com/This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Benchmarking google.com (be patient)?..done
Server Software: gws
Server Hostname: google.com
Server Port: 80
Document Path: /
Document Length: 219 bytes
Concurrency Level: 1
Time taken for tests: 0.060 seconds
Complete requests: 1
Failed requests: 0
Write errors: 0
Non-2xx responses: 1
Total transferred: 511 bytes
HTML transferred: 219 bytes
Requests per second: 16.59 [#/sec] (mean)
Time per request: 60.274 [ms] (mean)
Time per request: 60.274 [ms] (mean, across all concurrent requests)
Transfer rate: 8.28 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 21 21 0.0 21 21
Processing: 39 39 0.0 39 39
Waiting: 39 39 0.0 39 39
Total: 60 60 0.0 60 60
If you want to make things a little more difficult you can set the concurrency level for ApacheBench:
ab2 -n 1000 -c 10 http://www.google.com/
This will create 1000 connections, 10 at a time.
ApacheBench is a pretty nice way of testing, but your hardware quickly becomes a limiting factor. As hard as I try, my 3 year old laptop really can?t do much damage to a lean mean web serving machine.
So to beef up my server assault I?ve been using EC2. Luckily I happen to be the author of The Worlds Greatest Managed Library for Interacting with Cloud Providers.

Using MCloud I can easily create a bunch of nodes, install ApacheBench on them and then have each node run ApacheBench. The meat and potatoes of the code looks like this:
var deployment = new RunCommand (?zypper -n ?no-gpg-checks in apache2-utils?);
for (int i = 0; i < num_nodes; i++) {
Node n = driver.CreateNode (?test-? + i, size, image, location, auth_create);
n.Deploy (deployment, auth_deploy);
nodes.Add (n);
}
var run_deployment = new RunCommand (?ab2 -n {0} -c {1} {2}?, num_requests, num_concurrent, url);
nodes.AsParallel ().ForAll (n => n.Deploy (run_deployment, auth_deploy));
This is not meant to be a generic testing tool, its just a sample app showing you what can be done with ApacheBench and MCloud.
For more info on Apache Bench:
For more info on MCloud:
Tomorrow at GUADEC there will be a session on Google Summer of Code. It will be structured as a lightning talk session where the students will do the talking and present their projects. Attend the session if you want to see the cool stuff that is coming up. It starts at 11:15 in the Paris room. Be there!
Each student maintains a wiki page with information about their projects. You can find these on the GNOME wiki.

The main hall at GUADEC 2010
I was recently reading the documentation for The jQuery UI CSS Framework, and it got me thinking about making it possible to style mojoPortal content instances using it. Then a user asked in the forums about being able to skin mojoPortal using jQueryUI ThemeRoller, and that got me thinking further, what if I could create a mojoPortal skin where the whole site is a jQuery UI widget and could be styled by jQuery UI themes? That would be kind of cool wouldn't it?
It doesn't take much to make a feature instance style as a jQuery Widget, skeleton markup like this will do the trick since the jQuery UI CSS is already included in the page:
<div class="ui-helper-reset ui-widget ">
<h2 class="ui-widget-header ui-corner-top">Heading goes here</h2>
<div class="ui-widget-content ui-corner-bottom">
<p>
This is styled with jQuery UI!
</p>
</div>
</div>
So I just needed a way to make mojoPortal features render that kind of skeleton and it wasn't difficult to achieve given that I had already implemented a solution for rendering the special markup needed for Artisteer designs. I just added some more options to the rendering that can be configured from the theme.skin file in a mojoPortal skin. It took me maybe 10 minutes and I had it working for proof of concept. It was much easier than implementing support for Artisteer because we already had the needed markup structure, all we really needed was an option to render the CSS class names for jQueryUI. So I made a new skin and modified the layout.master to use the same widget skeleton for the site as whole so that the jQuery UI theme pretty much controls the look of the site. There isn't yet any themeable menu for jQuery UI, so I used the jQuery Superfish menu that we already had in a few other skins and used neautral colors and color inheritance to make it look reasonably well with all of the jQueryUI themes, though it looks better with some than others. It would be easy for users to copy this skin and change the menu colors to match better with a specific theme. The jQuery UI CSS framework doesn't have style for all purposes and features though, so additional CSS is needed for some features, and again I tried to make it use neutral colors so it would not clash with any of the jQuery UI themes.
I'm a ThemeRoller baby, bound to roll all over you...ThemeRoller makes me think of James Taylor singing with a lisp! :-D
Once I had the new skin basically working it begged for a theme switcher so I could see the magic instantly of changing the jQuery UI theme. There are about 25 or so standard jQuery UI themes that can be loaded from the Google CDN (Content Delivery Network) which is where we load jQuery and jQuery UI javascript and CSS from by default. You can also make your own custom jQuery UI themes with ThemeRoller, but if you do that then you need to host the jQuery and jQuery UI files locally as documented here.
You can control the list of available themes in the theme switcher from a config setting, that you can override in user.config, and you can set the default theme in the layout.master file of the skin like this:
<portal:StyleSheetCombiner id="StyleSheetCombiner" runat="server" JQueryUIThemeName="eggplant" UseIconsForAdminLinks="false" />
The theme switcher can be removed from the layout.master or disabled or limited by roles if you don't want user to be able to change the theme. It is basically setting a cookie based on the dropdown choice, and then setting the jQuery UI theme based on the cookie.
Maybe it is too widgety looking for most sites, but it might be useful for some kinds of sites or web applications built on mojoPortal. You could easily add a div above and/or below the menu to make room for a banner ad or some other additional content.
Anyway, it was easy and fun to implement. It is in the source code repository now, but requires a build of the latest source code to work. It will be included in the next release. You can try it now on demo.mojoportal.com by going to Administration > Site Settings and choose the jqueryui-1 skin.
So basically the new skin jqueryui-1 is like many skins in one since there are many jQueryUI themes available and you can roll your own with ThemeRoller.
Here are a few screen shots showing a few of the jQueryUI themes.




So, look for this in the next release or if you are a developer you can get the latest code from the repository. I think this gives us one more useful approach to skinning mojoPortal and hope you find it useful.
Follow us on twitter or become a fan on Facebook
A new release candidate with two bug fixes.
Changes:
Binary available here: ikvmbin-0.44.0.2.zip
Sources: ikvmsrc-0.44.0.2.zip, openjdk6-b18-stripped.zip
The sources zip no longer contains any binaries.
Potential Security Vulnerability
There is a bug IKVM's implementation of java.lang.reflect.Field.set(). The dynamic method that is generated doesn't properly cast the value to the type of the field. This is obviously a bug, but it could also lead to a type safety vulnerability. It is not directly exploitable, because the unverifiable dynamic method will do a full trust security demand and when there is partially trusted code on the stack, that will fail.
However, if you have any code that indirectly exposes Field.set() to untrusted code, it may be exploitable. In particular, the following scenarios warrant careful attention:
Affected Versions
IKVM.NET version 0.38, 0.40, 0.42 and 0.44 are affected. Version 0.36 and earlier are not affected.
Update
There is an update of IKVM.NET 0.42, earlier versions will not be updated and there will be a new 0.44 release candidate later today.
IKVM.NET 0.42 Update 2
Changes:
Binaries available here: ikvmbin-0.42.0.7.zip
Sources: ikvm-0.42.0.7.zip, openjdk6-b16-stripped.zip
Credits
Thanks to Dawid Weiss for reporting this issue.
I had never noticed it before but System.Net.Sockets.Socket.Send contains a couple of pretty useful overloads:
Send(IList<ArraySegment<Byte, SocketFlags)
Send(IList<ArraySegment<Byte, SocketFlags, SocketError)
Looking at those methods you are probably thinking: ?Wow, thats disgusting, why do that when you could just use a big array? A list of arrays? That sounds incredibly slow.? You are probably imagining the implementation looks something like this:
foreach (ArraySegment seg in segments) {
Send (seg);
}
But what this method actually does is take advantage of the underlying OS sendmsg () function on Unix and WSASend on windows. These functions take advantage of a feature known as scatter/gather or vectored IO. sendmsg () takes a message structure that represents a list of buffers, just like the Socket.Send method. To me, the term vectored IO describes this process a little better.
Using vectored IO has a number of benefits. Obviously making one big write instead of lots of little writes is faster, but the real benefit for .NET developers is it means we don?t have to put all our data in a contiguous array. This means a lot less buffering and moving around of data is needed.
At a higher level, we might change our code from this:
MemoryStream stream = new MemoryStream ();
public void Buffer (byte [] data)
{
stream.Write (data);
}
to something like this:
List
public void Buffer (byte [] data)
{
buf.Append (data);
}
Obviously the second case is going to be a lot more efficient with big chunks of data and the first case will probably be better with little chunks. So you might want to mix the two, depending on your application.
The other nice thing about vectored IO is its handled at a kernel level, so a lot of runtime overhead is cut out of the picture.
The one gotcha here is when that send doesn?t guarantee to send all of your data. In a single array scenario this is pretty easy to handle. You just update your index by the amount of data that has been sent. When you have a list of bytes, things get a little trickier. Its nothing special, but you can see how I?ve done this in the UpdateSegments method found here: IOStream.cs.
You can read more about Vectored I/O here:







This is just a quick post in follow up to my previous post SQL Server Compact 4.0 and mojoPortal, to provide some updated information. We recently released mojoPortal 2.3.4.8, and I've updated the package for SQL CE recently to contain migration scripts so that it is easy to migrate to SQL Server.
I've also created some new documentation.

WebMatrix includes IIS Express web server which is much easier to use on your local machine than IIS but has all the features of IIS. Once you install WebMatrix, you can right click a folder in Windows Explorer and choose "Open as a Web Site with Microsoft WebMatrix". So you can just unzip the mojoPortal package and right click the wwwroot folder to launch a mojoPortal site on your local machine. If using SQL CE you don't need to even need to configure a database, it just works, but for other mojoPortal packages you would have to set the connection string for the database.
One could also use WebMatrix for light mojoPortal feature development, perhaps at some point I will make an article showing how to use the mojoPortal Hello World examples with WebMatrix. While WebMatrix is not designed to scratch the same itch as Visual Studio, it is a useful tool even for folks like me who really live in Visual Studio all day long. I encourage you to check it out, especially if you are interested in working with the SQL CE version of mojoPortal.
Follow us on twitter or become a fan on Facebook

Here we have gbrainy 1.50, six months after the previous major version. gbrainy is a game that challenges your logic, verbal, calculation and memory abilities.

What is new in version 1.50 from the NEWS file:
Version 1.50
* 11 new logic games, 4 new calculation trainers, 13 verbal analogies
* Usability enhancements from Alexandre Laplante and Jeff Stewart, students from University of Ottawa
* Unit testing for the gbrainy.Core
* Ability to define external logic puzzles using an xml file (games.xml)
* Command line support
* 7 bug fixes
gbrainy 1.50 is available for download in source code from:
* http://gent.softcatala.org/jmas/gbrainy/gbrainy-1.50.tar.gz
(md5sum 97be38b87b5396a5d1996257e45ec69e)
Additionally, gbrainy is available for all major Linux distributions.
Usability enhancements
Alexandre Laplante and Jeff Stewart, students from University of Ottawa, did a usability study on gbrainy as part of their university studies. They built a list of suggestions that I have been implementing during the 1.50 development cycle. This includes clarifying some English texts, changes on some user workflows and user interface modifications.
Ability to define external games using an xml file
Starting this version gbrainy is more extensible. Users can use an external file to the define their own games, something that was already possible for verbal analogies. There is an external file called games.xml that contains the game definitions and that users can modify or extend as they wish. This file is interpreted at run-time, then there is no need to do any compilation task. This allows to author games without the need of any having coding skills. There is already some initial documentation for this new feature that I will be extending during the next days.
Command line support
A few users have requested command line support for gbrainy to be able to automate custom game lists as part of training exercises in their classrooms. gbrainy now supports custom game list execution from the command line, list the games available and other options to automate game executions in environments.
Unit testing for the gbrainy
I had finally time to build some unit testing around the core components of gbrainy. This is not has been proved good for enhancing the quality and stability in each commit also helped to identify areas that need some work to be decoupled.
OpenSuse 11.3 inclusion as default game
gbrainy has been included in OpenSuse starting in 11.3 as default game. It was already part of OpenSuse Edu (for education). This is the second Linux distribution (first was Ubuntu) to my knowledge to include gbrainy as default game.
How to help
This is a common question that I get. Let me point out some areas where you can help:
If you like gbrainy, blog about it and tell your friends!
Agile Retrospectives: making good teams great
Esther Derby & Diana Larsen


Please remember all the hard work here has been done by the original authors. All credit goes to them. Any bugs in the MonoTouch code are mine... let me know if you find any.

We're very proud to announce the release of Banshee 1.7.3, which brings some much anticipated WebKit goodness: the Amazon MP3 Store and the Miro Podcast Directory integration. Amazon MP3 downloading is fully supported, separate from the integrated store itself. There are also a handful of other smaller new features and enhancements, and a good deal of bug fixing as well.
This new extension provides a source from which users can browse, search, preview, purchase, and download music from the Amazon MP3 store in all countries where it is offered: United States, United Kingdom, France, Germany, Austria, Switzerland, and Japan.

Watch the Banshee Amazon MP3 Store Screencast!
Music that is purchased through the new integrated Amazon MP3 store will automatically begin downloading and importing into the Banshee music library.
When previewing music on the Amazon MP3 store in Banshee, the previews will play through Banshee, showing up in the header, and not through Flash.
Amazon MP3 DownloaderThe support for Amazon MP3 is not limited just to the store. If you decide to purchase music through your regular web browser, Amazon MP3 will provide a .amz file, a sort of playlist that indicates how the MP3s can be downloaded.
Banshee now associates itself with these .amz files and will download and import the MP3s referenced in them.

The Amazon MP3 Store and Downloader extensions are entirely separate. This allows you to pick your preferred user experience for purchasing music through Amazon MP3. The Amazon MP3 Store extension can be disabled if desired and the downloader will still work with an external web browser.
Other ways to download .amz files include opening manually with your operating system's file manager, the Import Media dialog available through the Media → Import menu, or the command line client distributed with Banshee: $ bamz foo.amz. Bamz will download the .amz contents in the current directory, and will not import the MP3s into the Banshee library automatically.
For more information on the Amazon MP3 integration in Banshee 1.7.3, read my previous blog posts on the two separate extensions:
Miro Podcast DirectoryBuilding on the same new WebKit integration in Banshee 1.7.3 as the Amazon MP3 Store, a new Miro Podcast Directory extension has been implemented. The source integrates with miroguide.com, allowing users to discover, stream, and subscribe to podcasts in a way never before possible in Banshee.
Much more work for tighter integration with the Miro Podcast Directory will come in future releases.
Bulk Metadata Fixup ExtensionA new tool is available from the Tools → Fix Music Metadata menu item that allows for bulk metadata fixing. This feature proposes to merge artists and albums that vary only by case, & vs and, etc.
Other EnhancementsI'm happy to announce the availability of new packages of Form Wizard Pro and Event Calendar Pro, that include support for SQL CE. Existing customers can download the latest package from their order history under the My Account link after signing in to the site.
I've also updated the SQL CE package for mojoPortal on Codeplex to fix a couple of bugs reported recently, and I've created documentation about using SQL CE with mojoPortal. In the near future I will also create documentation to explain how to migrate a mojoPortal installation from SQL CE to SQL Server using WebMatrix.
Follow us on twitter or become a fan on Facebook
We have now migrated all of Mono's source code from the Subversion at our Cambridge office over to GitHub.
We are going to be maintaining a migration FAQ and providing help to developers on irc.gnome.org channel #mono for the new setup.
The web site has not been updated yet and we still reference Subversion urls, but this will be fixed in the next few days.