Mono hírek, események

Jackson Harper: Using EC2 and ApacheBench to load test your web server

Mono Monologue - 2010, július 29 - 14:24

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.

Yo Dawg

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));

And here is the full sample.

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:

  1. http://httpd.apache.org/docs/2.0/programs/ab.html
  2. http://www.petefreitag.com/item/689.cfm

For more info on MCloud:

  1. MCloud getting started guide.

Unity Technologies: Unity 3 Preview ? ?Unity Bootcamp? Demo

Mono Monologue - 2010, július 29 - 02:38
Aquiris has been hard at work finishing up the new demo for Unity 3. Recently they posted a video of one of the playable levels of the demo and I thought people here would enjoy getting a longer look at it then the 20-30 second clips we’ve shown before.

Ruben Vermeersch: Summer of Code Lightning Talks at GUADEC

Mono Monologue - 2010, július 28 - 16:10

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

Joe Audette: mojoPortal and jQueryUI ThemeRoller

Mono Monologue - 2010, július 28 - 15:58

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.

mojoportal with jquery ui eggplant theme

mojoportal with jquery ui excite bike theme

mojoportal with jquery ui dark hive theme

mojoportal with jquery ui humanity theme

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

follow us on twitter become a fan on facebook


Joe Audette  ...

Alexandre Gomes: Disabling multitasking on iOS 4 apps

Mono Monologue - 2010, július 27 - 19:58
If you’re using the iOS 4 SDK then by default your app will be assumed to support multitasking even though you actually need to add support for it and you might not have done that (e.g. updating an old application). While multitasking seems nice it isn’t always the best scenario for your app, specially when [...]

Jeroen Frijters: IKVM.NET 0.44 Release Candidate 2

Mono Monologue - 2010, július 27 - 08:59

A new release candidate with two bug fixes.

Changes:

  • Changed version to 0.44.0.2
  • Fixed Field.set() bug #3033769.
  • When a protected or public member is accessed in a non-public base class in another assembly that is simultaneously compiled, we need to add an InternalsVisibleTo to the callee assembly for the caller assembly.

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.

Jeroen Frijters: IKVM.NET Security Update

Mono Monologue - 2010, július 27 - 08:57

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:

  • Having an assembly in the GAC that has the AllowPartiallyTrustedCallerAttribute and exposes Field.set() functionality to partially trusted callers and uses a security assert to stop the stack walk.
  • If you load partially trusted code in your application and your code uses Field.set() on values controlled by the partially trusted code, without any partially trusted code being directly on the stack.
  • If you process data or a (lightweight) scripting language that somehow exposes Field.set() functionality to untrusted data/code.

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:

  • Updated version to 0.42.0.7.
  • Fixed Field.set() bug #3033769.

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.

Jackson Harper: Squeezing some extra performance out of System.Net.Sockets.Socket.Send

Mono Monologue - 2010, július 27 - 04:21

I had never noticed it before but System.Net.Sockets.Socket.Send contains a couple of pretty useful overloads:

Send(IList<ArraySegment<Byte)

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:

  1. Wikipedia Article on Vectored I/O
  2. sendmsg Documentation
  3. WSASend Documentation 

Códice Software: Xmerge to merge refactored code

Mono Monologue - 2010, július 26 - 20:40
It's been a funny week. We first announced 3.0, then announced Xdiff, later crunched Subversion and now we're finally explaining a little bit about what Xmerge is about.

Merging moved code
If you need to know what we're doing with diff and merge stuff, I'd strongly recommend you to read the post about Xdiff first. There's even a short screencast if you don't feel like reading :P.

Well, basically Xmerge applies the tech. we developed for Xdiff into the merge process. The scenario is simple:

  • You've a file with some code
  • You go and move a method from the top to the bottom of the file.
  • While you're doing this, on my own task branch, I go and change the method on its "original" location.
  • Then we go and merge! Result? Nightmare unless you've Xmerge! :-P

    Original code
    Let's start with a very simple piece of code like the one below



    Someone moves the multiply method down
    The "multiply" method is private and I do like to see privates at the bottom, so I just go and move it down.

    Then I check the differences with Plastic:



    And meanwhile someone refactors the method
    The multiply method is not exactly the best code ever written, right? :) Let's just change a few things.



    Branching structure before merging
    Here's the branching structure as Plastic renders it just before merging.



    Running xmerge
    When you merge both branches back into /main (well, the first one you choose won't complain, it will be a direct merge) you'll get a nice conflict like the one below.

    The extremely nice thing about xmerge is that it will show a Xmerge button telling you there's an option to help you solving your problems. Just click it! (click on the image below to enlarge).



    So, what's going on here?

    Xmerge detects the code-block you're trying to merge has been moved. So it will detect where it is and will launch a "submerge" with just the right contributors (the ancestor and contributors plus the result). You can easily resolve the conflict there and when done, the result will be pasted back into the original merge window. Cool?



    The cross-merged result
    Here it goes:



    And now the movie
    Some of you will prefer to watch the movie than reading the book, so here it goes :P

    Make it full screen! It was recorded at 1024x768 so you should be able to see all the details.



    Conclusion
    Well, it is not the easiest thing to explain, so feel free to ask!!!

    This is our second step on Xmerge technology, the first generation (since Plastic 2.8) was able to run the "submerge" but you had to find the moved code yourself. Now with all the Xdiff technology we're able to perform the detection ourselves.

    Hope you like it! And be sure there's more to come!
  • Joe Audette: mojoPortal SQL CE and WebMatrix

    Mono Monologue - 2010, július 26 - 16:38

    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.

    Using WebMatrix with mojoPortal

    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

    follow us on twitter become a fan on facebook


    Joe Audette  ...

    Jackson Harper: Internet Everywhere!

    Mono Monologue - 2010, július 26 - 00:30
    I recently switched from AT&T to T-Mobile. On top of having better coverage, more features and being cheaper than AT&T, they are also pretty fuzzy about the topic of tethering. While tethering isn't officially supported its also not banned. Not only that but they even gave me some support in getting my tethering setup working.

    Tethering my laptop is kinda neat, but I've got some other devices I wanted to connect, and I can only do that with WIFI. I know Android has a cool feature where you can turn your phone into a Wireless Access Point and I wanted to do the same thing with my blackberry.
    After some research on crackberry.com I found a pretty cool product that would do this for me.

    The Cradlepoint PHS 300 is a personal WIFI hotspot. It connects to my phone via USB, and lets me create a wifi network. From there I can connect my laptop, tablet, iphone, ect.  It supports WEP security and it also has its own built in DNS redirect + device password system so you can still get some security without WEP.  It can also remember mac addresses, so I don't need to retype a password every time you connect.  This is especially nice with the tablet where typing is a little cumbersome.

    Its worked pretty well for me so far and done exactly what its supposed to do.  So if you don't have an Android phone and still want to get some red hot personal wifi hotspot action, I'd definitely recommend this guy.

    Jordi Mas: gbrainy 1.50

    Mono Monologue - 2010, július 24 - 20:11

    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:

    • Play the game and provide feedback about the application.
    • Translation to different languages. Check the current status of gbrainy translations.
    • Any development aid, including fixes or new Puzzles for the current system (see the development section)
    • Ideas for new logic puzzles, memory, calculation trainers or verbal analogies.

    If you like gbrainy, blog about it and tell your friends!

    Códice Software: Agile Retrospectives: how to improve the meetings and the results

    Mono Monologue - 2010, július 24 - 19:27
    I'll discuss in a couple of blogposts what I read recently in the book that I reference below, regarding how to improve the retrospective meetings.
    What is a retrospective meeting?In everyone's life, a retrospection is when someone stops and thinks about his/her life, evaluating good experiences, bad experiences and checking if he or she has learnt from that experiences in order to be a better person in the society.

    This, that most people do, in the agile methodologies of software development is called 'retrospective' and it is very useful in iterative development methods, to evaluate the progress done in every iteration. In this case we'll focus on SCRUM most of the time, but a retrospective can be applied to other Agile Methodologies.
    Steps of a retrospectiveA well-designed retrospective meeting should have the following steps:
    1. Set the stage.
    2. Gather data.
    3. Generate insights.
    4. Decide what to do.
    5. Close the retrospective meeting.
    These phases don't seem such a special or mystic thing and lots of teams try to commit with them, more or less. So, the question is, why they don't get good results anyway? Well, maybe the problem is how and not what.
    Who leads a retrospectiveA retospective meeting can be led by the manager or by any member of the team, or even this role can be assumed by a different person each time the meeting takes place. The person who leads the meeting mustn't participate in the discussions that will arise during the meeting, because his/her position biases the rest of the people's opinion.

    In addition to this, it is very important to analize which parameters must be taken into account in a retrospective meeting. Some examples are:
    • · Find ways to improve the practices.
    • · Discover what we were doing well.
    • · Understand reasons behind missed targets.
    • · Find ways to improve our responsiveness to customers.
    • · Rebuild damaged relationships.
    To finish this section, two important statements that should be observed in every retrospective meeting.
    1. Avoid to blame someone for an objective that wasn't achieved.
    2. Try to make that everyone participates in the meeting.
    How long should it takeIt depends.

    It depends on the length of the iteration, on the complexity of the technology used in that iteration, on the team's size, and the level of conflict that arise during the meeting. As a footprint: one week of iteration equals one hour of retrospective meeting. Anyway, there is no point in shortening or extending the meeting more than necessary.

    On the other hand, the retrospective meeting must be prepared previously. The team must enter the meeting room with something prepared, at least some draft notes, and must be well informed about the issues to discuss.
    How to prepare the retrospectivesThe responsible of the meeting must answer the following questions:
    • · What is the goal?
    • · Who will attend?
    • · How long?
    • · Where it will take place?
    • · How will be the room set up?
    How to convince the people to prepare the meetingThe leader can send a short quiz by mail to every person that will assist to the retrospective meeting. Thus everyone will have to take a couple of minutes to think about the last iteration. After receiving everyone's answers, that will be keeped anonymously, the results may be read aloud during the meeting, so that those results may be interpreted as a summary of the teams's insights.
    What to do after the meetingTry to assign every action that has been decided during the meeting to a responsible. Lots of retrospectives fail because, despite of giving good insights and making good decisions, everything is missed because nobody takes care of those decisions. So, assign responsibles and make commitments about those actions to do.
    And in the next article...... I opportunely made a workaround to avoid explaining in detail the steps of a retrospective meeting. I wanted to set the ideas and give some advice. In the next article I'll explain each phase.

    Furthermore, I'll explain a list of activities that can be done in a retrospective meeting to promote the participation of every member of the team. This is the first objective of a retrospective meeting and the most important one.


    Bibliography:

    Agile Retrospectives: making good teams great

    Esther Derby & Diana Larsen

    Craig Dunn: Drawing on Maps with MonoTouch

    Mono Monologue - 2010, július 24 - 07:46
    iOS4 introduced new features like MKOverlay to help draw lines/routes and shapes/polygons on the MKMapView control, however it has always been possible to add these features to maps in iOS3.

    Two (Objective-C) examples of displaying geometric shapes on MKMapView in iOS3 are:
    ...it is these examples that I've ported to MonoTouch (as a Universal app: iPhone and iPad). You can grab the code from github project MapStuff and see some screenshots below:

    I put together a class diagram to try and explain how they work (the classes shown are from the 2nd example, which allows you to draw your own shape).

    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.

    iOS4 examples to follow...

    Códice Software: Version control scalability shoot-out!

    Mono Monologue - 2010, július 23 - 23:31
    Let's go straight to the point: we took 2 of the biggest mainstream version control systems and put them to work under really heavy load: 1 single server and 100 concurrent clients. And then we compared them with Plastic SCM 3.0.

    Test environment
    A mainstream QuadCore 64bits server with 4GB Ram. Nothing fancy at all, just what you can purchase with about $500.

    100 desktop computers like the ones your team can use, all of them running Linux. They're quite heterogeneous: from single core 5 years old machines to newer 4 cores, from 1.5 Gb RAM to 4Gb.

    Server and clients are connected by a simple 100Mbps network.

    Sample repository
    We tested with a variety of different repositories, from really small ones to larger ones.

    The one I'm describing today is just a small one (and I can tell you results only get worse for the slow SCMs with more data...):

  • 1376 files
  • 66 folders
  • 22,4 Mb when downloaded to a workspace

    Test automation
    In order to automate all the client machines we used PNUnit, you know, the extension we made to NUnit for "parallel" testing. Quite useful for load testing.

    Test scenario 1 - working on trunk
    A really simple scenario every developer is familiar with: just commit changes to the main branch.

    Every client will do the following:
  • Modify 100 files
  • Checkin
  • Repeat 5 times.

    Test scenario 1 - working on trunk - results
    Ok, how our beautiful friends behave under really heavy load? Considering we tested with Subversion and Perforce, 2 of the most used version controls on the market, we expected high scalability... :)

    We used SVN 1.5.7, Perforce 2009.2 64bits and Plastic SCM 3.0.

    All results are using a Windows server and Linux clients, except for Subversion: we run the SVN server on Linux (dual boot server machine) because on Windows it couldn't handle more than 30 concurrent clients without consistently crashing (out of memory, 4Gb!!! and gone).

    We run the same test described above with 1 client, 10, 20, 50 and 100. Check the results here:



    Surprised????

    The two old irons doesn't scale that well at all, uh? ;-)

    Plastic is using a SQL Server backend and it seems it can handle the load much better than the others, even doing trunk development.

    Test scenario 2 - working on branches
    The second scenario tries to reproduce a "branch per task" pattern, something we strongly recommend with Plastic.

    The scenario is as follows:

  • Update to trunk
  • Create a branch from trunk
  • Switch to it
  • Perform changes on the branch (about 50 modified files)
  • Checkin changes
  • Go to step number 2 (5 times)

    Test scenario 2 - working on branches - results
    We always say most of the version control systems out there are not ready to handle branching, and we always hear people asking why.

    Ok, a picture is worth a thousand words.



    If you miss some data point in one of the version control systems compared is not because of a mistake, the reason is that the server simply starts locking too much, rejecting clients and making the test fail (even considering that the test is able to handle retries if it gets rejection errors).

    More data
    I'll be sharing the data regarding the Plastic server running on Linux in the coming weeks. We used MySQL on Linux and while it is slightly slower, it still consistently beats all competitors.
  • Aaron Bockover: Announcing Banshee 1.7.3

    Mono Monologue - 2010, július 23 - 18:29

    The Banshee logo 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.

    Download Now

    Amazon MP3 Store

    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.

    Amazon MP3 Store in Banshee
    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 Downloader

    The 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.

    Banshee Amazon MP3 support

    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 Directory

    Miro Guide Screenshot

    Building 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 Extension

    A 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 Enhancements
    • Visual separators were added in the source view between categories of sources: special (Now Playing, Play Queue), local media, and online services.
    • Item counts in the status bar are now culturally formatted (e.g. in en_US show 1,000 instead of 1000).
    • Improved downloading and visual refreshing of new cover art.
    • Visual tweaks to the grid view album artwork hover effect.
    • Developers:new Banshee.WebBrowser API for creating embedded WebKit web browsers and sources. Currently used by the new Amazon MP3 store, Miro Guide, and the Wikipedia context pane.
    • Developers:new Hyena.Downloader API for performing downloads and easy HTTP operations: HttpFileDownloader, HttpStringDownloader, etc.
    • Distributors:the webkit-sharp dependency was dropped, and instead we now take a dependency directly on libwebkit 1.2.2+ for the new Banshee.WebBrowser API.

    Joe Audette: SQL CE Support for Form Wizard Pro and Event Calendar Pro

    Mono Monologue - 2010, július 23 - 15:55

    I'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.

    Event Calendar Pro

    Form Wizard Pro

    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

    follow us on twitter become a fan on facebook


    Joe Audette  ...

    Sanjoy Das: Generating SIGILL and Performance Improvements

    Mono Monologue - 2010, július 23 - 14:15
    This post is about two weeks late. I'll come to what I did in that period in a later post.

    Until now the patching phase involved replacing the instruction to be patched with an instruction which generated a SIGTRAP. This is neither desirable nor practical for three reasons:
    • The entire mono code-base essentially becomes un-debuggable; a user generated SIGTRAP completely throws GDB off the guard, even when not explicitly using breakpoints.
    • The soft-debugger will (probably) be switching to generating a SIGTRAP instead of a SIGSEGV soon. This will become very difficult if safe points continue to use SIGTRAP.
    • The current solution is a gross, ugly hack.
    A better idea was, as Kumpera pointed out, to insert code that generates a SIGILL. This can be done with the two byte instruction sequence 0x0F 0x04 (or any of the other possible invalid byte sequences).

    A few trivial details, like inserting a NOP after single byte instructions which may be a safe point (which, on AMD64, is only RET) had to be taken care of.

    Independently of changing the SIGTRAP to a SIGILL, I made some basic improvements in my code, the result being a small (~ 3 %) improvement in Pystones.

    I've forked the mono repository on GitHub (http://github.com/sanjoy/mono) which now hosts most of my (stable) work. - I should be able to get my work done at a much faster pace now. Hopefully this will get me some public review too.

    Miguel de Icaza: Mono has migrated to GitHub

    Mono Monologue - 2010, július 23 - 03:19

    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.

    Tartalom átvétel