Archive for November, 2008|Monthly archive page

50 in 50 presentation at JAOO 2008

Extremely well made presentation about computer languages. I think there is nearly for everyone something he has not seen or heard until today, at least not in this way. What a shame not been in Aarhus this year!
BTW this is also a very interesting style of presentation of Guy L. Steele and Richard P. Gabriel.

QCon 2008 San Francisco Slides

The slides of this years QCon 2008 in San Francisco are available here in public.

How Kevin Bacon Cured Cancer

Found a well made documentation about small-world and scale-free networks produced by ABC Television. In addition to the popular books of Barabási and Watts/Strogatz this one gives a good start. At least it will be also more imaginable why the financial system can fail in days and why the “real” economy is also effected in very short time …

Microsoft CCR and DDS, Part 1

After presenting the Concurrency and Coordination Runtime (CCR) and Decentralized Software Services (DSS) Toolkit at the PDC08, Microsoft released it as commercially available product. Originally, the toolkit is part of the Robotics tool selection and frameworks. This week now the current version was released, Microsoft Robotics Developer Studio 2008, as free, downloadable, Express and normal Standard edition. Part of it is the CCR as well as the DSS library, also Microsoft Visual Programming Language is part of the package. The runtime libraries can not be redistributed, for this you have to by the seperate product bundle, but for playing around with the new toolkit this is more than sufficient.
The first interesting part is the CCR. There are three main components:
Ports which provide a type safe, atomic data interface. Arbiters on the other side are responsible for coordination and the execution of the user code. The last interesting piece are the Dispatcher and the DispatcherQueue, responsible to actually react on data posted at a port. Data can be posted to a port and either a Arbiter schedules the execution of a specific user code section provided by a delegate with the help of the Dispatcher. The important thing is, that all calls are atomic and is thread safe, so there is no need for locks. Basically it works conceptually like message passing. The CCR is very well documented and provides the basic structure for the DSS and most of the Robotics services. One interesting concept is how iterators are used to handle the asynchron program workflow. For this a small code example which uses them for reading a file can demonstrate this:

IEnumerator FileReadEnumerator(string filename)
{
    // this is the port which is responsible for handling the 
    // IAsyncResult structure
    var resultPort = new Port();

    // open the synchron file read stream, and this is important: inside
    // a dispose block
    using (FileStream fs = new FileStream(filename,
        FileMode.Open, FileAccess.Read, FileShare.Read, 8192,
            FileOptions.Asynchronous))
    {
        Byte[] data = new Byte[fs.Length];

        // start reading from the file, the port post function is used
        // as callback
        fs.BeginRead(data, 0, data.Length, resultPort.Post, null);

        // the second important thing: the iterator suspends until the port
        // gets data, meaning that asynchron processing has finished. A
        // empty delegate will be executed at this event
        yield return Arbiter.Receive(false, resultPort, delegate { });

        // get the actual asynchron result structure for closing the port
        var ar = (IAsyncResult) resultPort;
        try
        {
            Int32 bytesRead = fs.EndRead(ar);
        }
        catch
        {
            // handle I/O exception
        }
    }
    ProcessFileData(data);
}

This implicit iterator is now called by the following code snippet:

Dispatcher dispatcher = new Dispatcher();
DispatcherQueue taskQueue = new DispatcherQueue("Default", dispatcher);
Arbiter.Activate(taskQueue,
    Arbiter.FromIteratorHandler(() => FileReadEnumerator(@"C:\test.txt")));

The arbiter is using the handles the delegation to the actual file reading logic and works in non-blocking mode, the iterator is responsible for the actual program flow. The beauty of this code is that the program flow in in one, optical, sequential flow and has some important advantages
instead of using anonymous delegates. For one thing the using() ensures that the file stream actually gets correctly closed while not using delegates it is possible to use parameters and local variables which can lead to problems otherwise.

Microsoft BizSpark

Microsoft has launched it’s BizSpark program which allows Startup companies to use most available software free for 3 years, if they exit the program early they have to pay $100 or they by normal licences after the three years. With the coming launch of the Azule Cloud platform 2009 and the hype after the election of Obama, very good timing … although some will see the snake with the nice, big and juicy apple 😉

This years IRFS 2008

My former company arrange again this year a symposium, the first time with a, hopefully working, livestream. So if your are interested in Information Retrieval or patent knowledge take a look.

The presentations and videos of the conference can be found here.

Why Microsoft may be in the lead again

On this years PDC Microsoft has shown several interesting products and projects which maybe will give them a step or two in advance to the Java application stack:

  • The Microsoft Azure Platform: Microsoft finally gets into the cloud hype, after Amazon and Google. Azure is highly integrated with Windows, naturally, but I think for the first time in history the outside world is supported from the start. OpenID will be used as authentication service, also nearly all services are accessible by REST or native clients in Java and Ruby. Azure by itself could provide what BPEL and W3C Web-Services have promised but never provided, a easy to implement solution to collaborate between different process participants without investing into new middle ware systems.

  • The evolution of C# continuous: Not only that C# 4.0 will repair the generic type systems, finally Co- and Contravariance are supported, they also will introduce a very neat solution for handling dynamic data types. This will be a big advantage over Java where generics will not be corrected in near future, at least not with Java 7, and although Groovy and JRuby are extremely good replacements if it comes to dynamic languages, it hurts that the original language does not evolve (but Scala and Clojure are showing what could be possible). Backwards compatibility is already broken, so why not go after C#?

  • Concurrency in implementation and test: Besides the already existing Parallel Extensions for .Net FX, which are also part of the Visual Studio 2010 CTP, Microsoft goes a step further with the Concurrency and Coordination Runtime (CCR) and Decentralized Software Services (DSS) Toolkit. In my opinion this is the most interesting and workable solution for computational grids I have seen so far although the Java frameworks GridGain and TerraCotta are also very nice. But Microsoft has found and API which successfully abstracted away the nasty synchronization locks and gives a very RESTfull way to monitor ongoing activities. The second interesting project is CHESS which allows it for the first time to really test concurrency in implementations. Normally finding Heisenbugs is very tedious and you must always have a bit of luck. With CHESS, they can be found much faster and backtracked to their cause.

  • Oslo as Meta-DSL: Maybe this will not be the final solution, but Oslo is a nice looking Meta-DSL which allows it to define textually grammars for DSL or schemas. Mostly textual descriptions are a lot more maintainable as graphical descriptions and it is definitely easier to process them as XMI or MOF models.