IDCC is a community organized conference scheduled to take place in Herzeliya on September 14th. The event is organized by Ken Egozi, Ohad Israeli,  Avishay Lavie, Avi Pinto and Ori Peleg. More than 40 people have suggested more than 80 sessions for this event ( I proposed two sessions one on SOA patterns and one on the SPAMMED architecture framework). Anyway one interesting aspect of this event is that once the call for session ended the decision on presentation is passed to the community so prospective attendees are now invited to vote which sessions will actually be presented.

I saw that a lot of people blogged about the event promoting the session they submitted. I thought that instead, I’d take this opportunity to promote the sessions I’d like to see:

  • Building a Testing Eco-system - Not Just UnitTests - Ariel Raunstein  So UnitTests are important. You have to write them. Let's move on. But ask yourself, even if you have your code coverage at 100% - do YOU feel confident about your application's customer readiness? We'll talk a little about how to approach creating a sustainable test eco-system for your project, using regression tests; database tests; random tests; UI tests; integration tests; feature or behavior tests; deployment tests; CI basics; and how to use the QA to your advantage, and not just make them your punching bag.

  • Debugging .NET and Native Applications in the Field – Gadi Meir - Customer sites, testing & QA labs do not acquire the presence of Visual Studio, Single-stepping though the application code is not a practical approach to catch an elusive bug at production sites, sites which are being consumed by live users. Saying that, many bugs only reveal themselves in such environments. What can be one do ?By using the freely available Debugging Tools for Windows package, the SOS extension, and some other useful tools, it is possible, without installation, to collect and analyze debug information. Over this session we will overview what one needs to know in order to utilize these valuable tools and techniques straight away. The session is loaded with practical information, demos, and includes guidelines based on field experience.

  • Building Scalable Systems – Oren Eini (aka Ayende) -We aren't building single user systems anymore. If fact, we are building systems that needs to handle hundreds of thousands or millions of users. The methods that we used to build low scalability applications are not applicable when we want our applications to scale. In this session, we will talk about scalability hindrances, designing for scalability and look into some of the constraints that building scalable systems place on us.

  • Beautiful teams and code leaders – Roy Osherov -  In this talk we'll explore some techniques, tactics and strategies for building, maintaining and driving a better software team and the people behind it. what does it take to lead people, to drive them? what does it mean to be in a constant state of productivity? how do you create a super effective and creative team,even if you don't have an all-star team to begin with? what tools, best practices and techniques can and should a team use to deliver great software? from automated builds to managing people - we'll try to cover some hard lessons, in a fun way.

  • IronRuby - The Development Booster Machine – Shay Friedman - IronRuby V1.0 is just around the corner and it's a great time to get your hands dirty! In this session you will get familiar with the main concepts of IronRuby and see how this exciting new .Net language will help you boost your everyday work. From testing to polishing your software, you will be astonished about this new developer best friend!

  • Reliability, Availability, and Scalability – How to have your cake, and eat it too – Udi Dahan - Architects love the word “scalability”. We talk about transactions per second and page views per day and on and on.Of course, none of that scalability means anything if the system is down or if data gets lost or corrupted. Finding the right balance between reliability, availability, and scalability for the various parts of a system is critical to avoid unnecessarily costly solutions. This presentation will show a set of patterns that strikes this balance, their connection to supporting technologies, and their applicability across many enterprise domains. You can have it all.

So go vote :)


     
    Tags:

    I am currently implementing Reservation (a pattern for  “partial temporary commitment” when using Sagas).The  implementation calls for calling a few of the saga members asking them to reserve an asset. Since network calls can take some time I wanted to make each call on its own thread, collect any errors (failures to reserve or communication exceptions) and then have all the threads reconverge to the initiating thread  where any problems will be sorted out (e.g. by retrying the reservation). It basically looks something like the figure below:

    image

    As you can probably guess this type of synchronization is called Rendezvous (as the threads “meet”). It is also actually fairly easy to implement in .NET I usually do something along the lines of the code snippet below and things like Parallel.For in C# 4.0  will give a similar effect

    1.       private void DispatchThreads(List<Thread> threads, List<SharedContext> sharedContexts, ParameterizedThreadStart threadFunction)
    2.         {
    3.             //initiate threads
    4.             foreach (var context in sharedContexts)
    5.             {
    6.                 var dispatchThread = new Thread(threadFunction);
    7.                 threads.Add(dispatchThread);
    8.                 dispatchThread.Start(context);
    9.             }
    10.             //Rendezvous
    11.             foreach (var dispatchThread in threads)
    12.                 dispatchThread.Join();
    13.         \

    However, that’s not why I am writing this post. It turns out I have a more complicated situation. In my setup the code of “Main Thread” (in the figure above) can be run by multiple different threads which are initiated by external events (i.e. I don’t control when they run) – What I needed to to is to make sure that if there are several threads that run in parallel they need to wait for the last of them to finish one section of the code before they can all move on. To explain this better consider the figure below:imageThread 1 starts, sometime after that Thread 2 starts and then Thread 3 starts as well – Thread 1 and Thread 2 have to hold and wait until Thread 3 finished. Thread 4 starts beyond the Rendezvous so none of the other threads care about it. Had it started just before Thread 3 finished all the threads would have had to wait for it as well. Basically I need a similar effect to chords in polyphonic C#

    I couldn’t find anything that .NET 3.5 for this - It is kind of what ManualResetEvent – however, it not quite that, since we need to wait for the event only when we’re done. Also we need to let other threads “know” we are running so that they’d wait for us. So indeed I wrapped a ManualResetEvent with a few methods to do just that and ended up with the following.

    1. public class Rendezvous
    2.     {
    3.         private readonly ManualResetEvent Synch = new ManualResetEvent(true);
    4.         private readonly object Locker = new object();
    5.         private int Counter = 0;
    6.         /// <summary>
    7.         /// Join the Rendezvous - Mark that a thread is active and it should finish before the others can continue
    8.         /// </summary>
    9.         public void MarkStart()
    10.         {
    11.             lock (Locker)
    12.             {
    13.                 if (Counter < 0) Counter = 0;
    14.                 Counter++;
    15.                 Synch.Reset();
    16.             }
    17.         }
    18.         /// <summary>
    19.         /// Allows a thread to wait for others without having the others wait for it
    20.         /// </summary>
    21.         public void Wait()
    22.         {
    23.             Synch.WaitOne();
    24.         }
    25.         /// <summary>
    26.         ///
    27.         /// </summary>
    28.         public void MarkFinishAndWait()
    29.         {
    30.             lock (Locker)
    31.             {
    32.                 if (--Counter <= 0) Synch.Set();
    33.             }
    34.             //it is ok if we context switch and lock since we want to synchronize the end times
    35.             Wait();
    36.         }
    37.     \

    As long as all the threads have access to the same instance of the Rendezvous class they can synchronize their end times.

    Rendezvous is a common pattern for workflow systems (also known as Join-And). It is the first time I had to do that in C# with uncontrolled/uncoordinated thread starts so I don’t know how useful it would be to you. However I thought it is also interesting reading so I published it anyway :)


     
    Tags: .NET | Design

    August 1, 2009
    @ 02:59 PM

    Reacting to a comment left by Frans Bauma, Ayende recently wrote about “Maintainability”

    Maintainable is a value that can only be applied by someone who is familiar with the codebase. If that someone find it hard to work on the codebase, it is hard to maintain. If someone with no knowledge of a codebase find it hard to work with it, tough luck, but that doesn’t say anything about the maintainability of a code base.

    I usually agree with what Ayende has to say, but not this time. First I hope that by “someone who is familiar with the codebase” he doesn’t refer to the person that actually wrote the code – since if the person who wrote the code can’t understand what he/she wrote than the code base is doomed anyway.

    In the wider-sense “someone who is familiar with the codebase” is just part of the picture – a code base is only maintainable is a reasonably professional developer can get to a point where she is familiar enough with the code to be able to maintain it. This doesn’t imply that the time it takes to be productive with the code base is zero – but the lower the time it takes to get up to speed means the more maintainable is the code.

    In any event, for a codebase to be maintainable, it has to show several quality attributes .For the most part I agree withthe definition of Maintainability in ISO 9126:2001 Software Engineering Product Quality*

    6.5 Maintainability
    The capability of the software product to be modified.  Modifications may include corrections, improvements or adaptation of the software to changes in environment, and in requirements and functional specifications.

    • 6.5.1 Analysability - The capability of the software product to be diagnosed for deficiencies or causes of failures in the software, or for the parts to be modified to be identified.
    • 6.5.2 Changeability - The capability of the software product to enable a specified modification to be implemented.
      NOTE 1 Implementation includes coding, designing and documenting changes.
      NOTE 2 If the software is to be modified by the end user, changeability may affect operability.
    • 6.5.3 Stability - The capability of the software product to avoid unexpected effects from modifications of the software
    • 6.5.4 Testability - The capability of the software product to enable modified software to be validated.
    • 6.5.5 Maintainability compliance -The capability of the software product to adhere to standards or conventions relating to maintainability.

    Naturally, being a standard it has the “compliance” thingy which is usually only relevant for large organizations and project but for the most part the different aspects mentioned above are the parts you need to take care of when you want someone besides yourself to make changes to the software.

    The view of Maintainability Ayende uses is problematic esp. when we consider that (successful) software will spend most its life in maintenance and not in development (you can read Robert L. Glass’s excellent “Software Maintenance is a Solution, Not a Problem” paper in this regard). Assuming someone maintaining the code will always be familiar with it is expecting the same developer(s) to stay at the same project for as long as the project will live (which is not likely) and/or assuming the project will have a short life (not something I’d want from my projects)

    So don’t forget that other people will have to maintain your code and they probably won’t live the code-base as you do or as they say in “Code for the maintainer” in the C2 wiki

    “Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live. “ :)


    * ISO 9126 is a multi-part standard for QA. I think ISO9126:2001 is good quick reference for quality attributes ( i.e. something you can look at when you try to elicit quality attributes for an architecture). I, personally think the other parts of the standard are pretty useless but that's another story :)
     
    Tags: Agile | Project Management