April 2004 - Posts
With the delay to .NET 2,0 (H1 2005), it now appears that Java 1.5 will beat Microsoft with its Generic implementation. Dr Haddon's Tiger presentation gives an idea of what Microsoft .NET 2.0 has to complete with. In some respects Microsoft's .NET framework is ahead of the Java J2SE library - the CLR had a ThreadPool from 1.0, whereas Java 1.5 finally gets a ThreadPool in the java.util.concurrent library. In other respects .NET appears to be behind Java when looking at the breadth of the library - for example collections. Its nice to see that in Java 1.5 the enhanced loop appears to be close to the C# foreach. CacheRowSet appears to sounds like a DataSet. Java vs C# Generic is already well documented on the web, so I'm not going to follow in the comparison footsteps.
It’s also interesting to see the Java 1.6 is expected to be release during 2006, possibly around the Longhorn timeframe, when one assumes we should be getting another .NET release.
Now available on
MSDN. I get a mention in the external reviewers section.
There appear to be a few JMS libraries available that work with .NET; Softwired, Fiorano. Anybody used any of these libraries?
Genuine Channels offers a bi-directional .NET Remoting channel that has some performance advantages over Microsoft's .NET Remoting native channels. To compare TCP performance between Genuine and Microsoft's native channel, a simple C# client console applications and server was developed. The tests were run between two Window XP machines, on a 100Mbps. Each test was run four times, and each test comprised of 100 client-to-server method invocations, and 100 server-to-client callbacks. No parameters were passed for each method invocation, apart from the client object reference needed for the callback test. All values are displayed in milliseconds. This isn't an extensive test, but it does allow a basic comparison.
Note: Genuine Channels version 2.3.3 was used for the test. Version 2.4.2 is already available, and probably has performance advantages over 2.3.3
Microsoft native channel (TCP)
Client->Server 2.0029 1.0015 1.0015 1.0015
Callback 52.2275 51.5772 49.7746 54.081
Genuine Channel with compression (GTCP)
Client->Server 4.7067 4.8069 4.7067 4.907
Callback 10.8154 11.1159 10.9156 11.6166
Genuine Channel without compression (GTCP)
Client->Server 2.3033 2.2031 2.2031 2.3033
Callback 8.412 6.4092 6.4092 6.309
As can be seen, Genuine Channel appears to out perform Microsoft's native channel in callbacks, but is slightly slower in client->server method calls. Passing parameters would change the timing - the larger the payload, the slow the method call.
Investment banks have generally been slow in moving to .NET on there server side. This can probably be contributed to a few reasons:
- J2EE is already well entrenched on servers (Solaris, Linux, Windows) with investment banks
- Microsoft is still seen as having a 'security' issue - a few banks have outlawed the deployment of IIS
- There are multiple vendors offering J2EE application servers, whereas Microsoft is the only vendor offering a .NET application server today - COM+
- A few investment banks are trying to move towards Linux - in a similar way to IBM
Client side .NET development on the other hand appears to be happening at a much faster rate within banks.
Banks like CSFB however, have always had a decent Microsoft presence server-side, and now it appears barcap are partially moving to .NET on the server as well. Interesting times...
Its always interesting to keep an eye on multiple technologies. Within investment banks, we're using Java,C++, Python and Microsoft .NET. In the case of Java, the Sun HotSpot site provides some interesting documents and FAQ's that are worth a read. Tuning Garbage Collection with the 1.4.2 Java VM has a few useful 'rule of thumb' points for server applications.
The Sun site also contains some excellent slides on Java performance:
- Dr Cliff Click JavaOne 2003 'Performance Myths Exposed' slides. The 'Excepton' slide which talk about defeating JIT optimizations are interesting, and appear very similar to best practices on the CLR. The 'Looking Forward' slide also appear similar for CLR usage.
- John Coomes and Tony Printezis JavaOne 2003 'Garbage Collection in the Java HotSpot Virtual Machine' slides. No surprise that the CLR has generation as does Java. Finally, its interesting to note that object pooling can sometime damage application performance.
Anyone using
S# to develop a real application?
Over the last two days we've presented two .NET presentations to a mixed audience of developers and managers at two different locations in the world. The first presentation didn't go well initially, but by half time, things were turning around. The second presentation went a lot better, with a lot of good question at the end of the day. Overall, I'd have to say that these two days have been an education - up until this point we've really only presented to 'easy' audiences.
The first presentation generated the following interesting questions from the audience - primarily from managers. If you think you have a good answer, please post it in the feedback section of the blog, thanks.
- If a a company has a high percentage of J2EE applications servers already in production. What is the compelling technology reason to consider .NET on the server? What is the compelling business reason to consider .NET on the server?
- What major advantage does the C# language have over and above the Java language?
- Given that .NET today is really only run on the Microsoft CLR, and Java J2EE can essentially run on Windows, Solaris and Linux, why would a company lock itself into the Windows OS, and thus move from Java J2EE to .NET?
- Given that EMCA-335 only specified the semantics of System.MarshalByRefObject, and does not specify anything about how remoting is implemented, could Microsoft at some point in the future invalidate the Open Source Mono implementation of Remoting using patents or other means?
It's nice to see that Microsoft and Sun both play the End of Life game.
Tomorrow we start the .NET presentation circus I talked about before - we are actually doing two presentations this week, one tomorrow and one on Wednesday. Each presentation consists of an introduction to .NET in the morning, followed by an advanced session in the afternoon. We also have two demos that we'll be doing, one showing the interop between .NET and Java using WebServices, and another showing the interop with Microsoft Office. I'm hoping the presentations go well, although I think we need to improve the demos for subsequent presentations
Since I now have the Community Technical Preview (CTP) of Visual Studio 2005 installed on my Compaq, I thought I'd blog a few items on .NET 2.0
- Here the official VS 2005 news blog
- In NET 1.0/1.1, we had System.Threading.ThreadStart, now in NET 2.0, we also have ParameterizedThreadStart.
- Nice to see that System.Threading.Thread now has a few new constructors that take maxStackSize.
- EventArgs in 1.0/1.1 is Serializable, in 2.0 the Serializable attribute has been removed
- System.Console now has a ReadKey method - about time
- System.Diagnostics finally gets a StopWatch class
- System.GC has a new method, AddMemoryPressure, to help flag the urgency of collecting a particular object with regards to unmanaged resource.
- System.IO.Compression is a nice addition
More Posts
Next page »