Category Archives: development

The Java crisis and what it means for developers

What is happening with the Java language and runtime? Since Java passed into the hands of Oracle, following its acquisition of Sun, there has been a succession of bad news. To recap:

  • The JavaOne conference in September 2010 was held in the shadow of Oracle OpenWorld making it a less significant event than in previous years.
  • Oracle is suing Google, claiming that Java as used in the Android SDK breaches its copyright.
  • IBM has abandoned the Apache open source Harmony project and is committing to the Oracle-supported Open JDK. Although IBM’s Sutor claims that this move will “help unify open source Java efforts”, it seems to have been done without consultation with Apache and is as much divisive as unifying.
  • Apple is deprecating Java and ceasing to develop a Mac-specific JVM. This should be seen in context. Apple is averse to runtimes of any kind – note its war against Adobe Flash – and seems to look forward to a day when all or most applications delivered to Apple devices come via the Apple-curated and taxed app store. In mitigation, Apple is cooperating with the OpenJDK and OpenJDK for Mac OS X has been announced.
  • Apache has written a strongly-worded blog post claiming that Oracle is “violating their contractual obligation as set forth under the rules of the JCP”, where JCP is the Java Community Process, a multi-vendor group responsible for the Java specification but in which Oracle/Sun has special powers of veto. Apache’s complaint is that Oracle stymies the progress of Harmony by refusing to supply the test kit for Java (TCK) under a free software license. Without the test kit, Harmony’s Java conformance cannot be officially verified.
  • The JCP has been unhappy with Oracle’s handling of Java for some time. Many members disagree with the Google litigation and feel that Oracle has not communicated well with the JCP. JCP member Doug Lea stood down, claiming that “the JCP is no longer a credible specification and standards body”. Another member, Stephen Colebourne, has a series of blog posts in which he discusses the great war of Java and what he calls the “unravelling of the JCP”, and recently  expressed his view that Oracle was trying to manipulate the recent JCP elections.

To set this bad news in context, Java was not really in a good way even before the acquisition. While Sun was more friendly towards open source and collaboration, the JCP has long been perceived as too slow to evolve Java, and unrepresentative of the wider Java community. Further, Java’s pre-eminence as a pervasive cross-platform runtime has been reduced. As a browser plug-in it has fallen behind Adobe Flash, the JavaFX initiative failed to win wide developer support, and on mobile it has also lost ground. Java’s advance as a language has been too slow to keep up with Microsoft’s C#.

There are a couple of ways to look at this.

One is to argue that bad news followed by more bad news means Java will become a kind of COBOL, widely used forever but not at the cutting edge of anything.

The other is to argue that since Java was already falling behind, radical change to the way it is managed may actually improve matters.

Mike Milinkovich at the Eclipse Foundation takes a pragmatic view in a recent post. He concedes that Oracle has no idea how to communicate with the Java community, and that the JCP is not vendor-neutral, but says that Java can nevertheless flourish:

I believe that many people are confusing the JCP’s vendor neutrality with its effectiveness as a specifications organization. The JCP has never and will never be a vendor-neutral organization (a la Apache and Eclipse), and anyone who thought it so was fooling themselves. But it has been effective, and I believe that it will be effective again.

It seems to me Java will be managed differently after it emerges from its crisis, and that on the scale between “open” and “proprietary” it will have moved towards proprietary but not in a way that destroys the basic Java proposition of a free development kit and runtime. It is also possible, even likely, that Java language and technology will advance more rapidly than before.

For developers wondering what will happen to Java at a technical level, the best guide currently is still the JDK Roadmap, published in September. Some of its key points:

  • The open source Open JDK is the basis for the Oracle JDK.
  • The Oracle JDK and Java Runtime Environment (JRE) will continue to be available as free downloads, with no changes to the existing licensing models.
  • New features proposed for JDK 7 include better support for dynamic languages and concurrent programming. JDK 8 will get Lambda expression.

While I cannot predict the outcome of Oracle vs Google or even Apache vs Oracle, my guess is that there will be a settlement and that Android’s momentum will not be disrupted.

That said, there is little evidence that Oracle has the vision that Sun once had, to make Java truly pervasive and a defence against lock-in to proprietary operating systems. Microsoft seems to have lost that vision for .NET and Silverlight as well – though the Mono folk have it. Adobe still has it for Flash, though like Oracle it seems if anything to be retreating from open source.

There is therefore some sense in which the problems facing Java (and Silverlight) are good for .NET, for Mono and for Adobe. Nevertheless, 2010 has been a bad year for write once – run anywhere.

Update: Oracle has posted a statement saying:

The recently released statement by the ASF Board with regard to their participation in the JCP calling for EC members to vote against SE7 is a call for continued delay and stagnation of the past several years. We would encourage Apache to reconsider their position and work together with Oracle and the community at large to collectively move Java forward.  Oracle provides TCK licenses under fair, reasonable, and non-discriminatory terms consistent with its obligations under the JSPA.   Oracle believes that with EC approval to initiate the SE7 and SE8 JSRs, the Java community can get on with the important work of driving forward Java SE and other standards in open, transparent, consensus-driven expert groups.   This is the priority.   Now is the time for positive action.  Now is the time to move Java forward.

to which Apache replies succinctly:

The ball is in your court. Honor the agreement.

Understanding the Silverlight controversy

There has been much discussion of the future of Microsoft’s Silverlight plugin since Server and Tools President Bob Muglia’s statement in a PDC interview that “Our strategy with Silverlight has shifted”, and spoke of HTML as the “only true cross platform solution”.

The debate was even reported on the BBC’s web site under the headline Coders decry Silverlight change.

It is unfortunate that headlines tend to think in binary; alive or dead. In other words, if Microsoft is repositioning Silverlight then it must be killing it.

That is not the case. Muglia did not say that Silverlight has no future, nor that it was unimportant. He affirmed that there will be another version of Silverlight for Windows and Mac, as well as highlighting that it is the development platform for Windows Phone.

Speaking personally for a moment, I have reviewed Silverlight favourably in the past and still regard it as a great achievement by Microsoft: the power of the .NET runtime, the elegance of C#, the flexible layout capabilities of XAML, integrated with a capable multimedia player, and wrapped in a lightweight package that in my experience installs quickly and easily.

Silverlight forms an excellent client for cloud services such as those delivered by the Azure platform which we heard about at PDC.

Perhaps it is the case that IE9 maestro Dean Hachamovitch tended towards the gleeful as he demonstrated features in HTML and JavaScript that previously would have required Silverlight or Flash. At the same time, IE9 is not yet released, and even when it is, will not match the capabilities or the tooling and libraries available for Silverlight.

The Silverlight press generated by PDC must have been disappointing and frustrating for Microsoft’s Silverlight team. I am reading reports of Developer VP Scott Guthrie’s remarks at the DevConnections conference this week.

The reports of my death are greatly exaggerated … I have more people working on Silverlight now than any time in Silverlight history … don’t believe everything you read on the internet.

I have great respect for Guthrie; you need only see the speed and manner with which he reacted to the recent ASP.NET security scare – not trying to diminish its importance, delivering practical advice, answering comments, and working with his team to come up with workarounds and a proper solution as quickly as possible – to appreciate his commitment and that he understands the needs of developers.

So were posts like my own Silverlight dream is over unfair and inaccurate? Well, there is always a risk of being misunderstood; but the problem, as I perceive it, is not primarily about Silverlight’s progress on Windows and Mac. The problem is that those two desktop platforms no longer have sufficient reach; or rather, even if they have sufficient reach today, they will not tomorrow. We have the rise of iOS and Android; an explosion of non-Windows tablets in the wings; we have a man like James Gardner, CTO at the UK’s Department for Work and Pensions, writing of Windows 7 that:

Personally, I think it likely this is  the last version of Windows anyone ever widely deploys

See also Cliff Saran’s comments at Computer Weekly.

In other words, Guthrie’s team can do a cracking job with Silverlight 5 for Windows and Mac – it could even merge Silverlight with WPF and make it the primary application platform for Windows – but that would still not address the concerns raised by what happened at PDC. If Silverlight remains imprisoned in Windows and Mac, it cannot deliver on its original promise.

What could Microsoft do to restore confidence in Silverlight? Something along these lines would make me change my mind:

  1. Announce Silverlight for Android.
  2. Nurture Silverlight for Symbian.
  3. Follow through on commitments for Silverlight on Moblin/MeeGo.
  4. Either implement Silverlight for Linux, or enter a deeper partnership with Novell’s Mono so that Microsoft-certified Silverlight runtimes appear on Linux in a timely manner alongside Microsoft’s releases.
  5. Come up with a solution for Silverlight on iOS. One idea is to follow Adobe with a native code compiler from Silverlight to iOS. Another would be a way of compiling XAML and C# to SVG and JavaScript. Neither would be perfect; but as it is, every company that starts deploying iPads or their successors is a customer that cannot use Silverlight.

Do I think Microsoft will implement the above? I doubt it. My interpretation of Muglia’s remarks is that Microsoft has decided not to go down that path, but to reserve Silverlight for Windows, Mac, and Windows Phone, and to invest in HTML for broad-reach applications.

That may well be the right decision; it is one that makes sense, though Microsoft was perhaps unwise to highlight it before IE9 is released. Further, cross-platform is not in Microsoft’s blood, and the path that Silverlight has taken is in line which what you would expect from a company built on Windows.

Silverlight is not dead, and for developers targeting Windows, Mac and Windows Phone it is as good as ever, and no doubt will be even better in its next version. But failing another change of heart, it will never now be WPF Everywhere; and PDC 2010 was when that truth sank home.

Update: this is pretty much what Guthrie says in his latest post:

Where our strategy has shifted since we first started working on Silverlight is that the number of Internet connected devices out there in the world has increased significantly in the last 2 years (not just with phones, but also with embedded devices like TVs), and trying to get a single implementation of a runtime across all of them is no longer really practical (many of the devices are closed platforms that do not allow extensibility).  This is true for any single runtime implementation – whether it is Silverlight, Flash, Java, Cocoa, a specific HTML5 implementation, or something else.  If people want to have maximum reach across *all* devices then HTML will provide the broadest reach (this is true with HTML4 today – and will eventually be true with HTML5 in the future).  One of the things we as a company are working hard on is making sure we have the best browser and HTML5 implementation on Windows devices through the great work we are doing with IE9.

Adobe MAX 2010 – it’s all about the partners

Last week was all conferences – Adobe MAX 2010 followed by Microsoft PDC – which left me with plenty of input but too little time to write it up. It is not too late though; and one advantage of attending these two events back-to-back was to highlight the tale of two runtimes, Adobe Flash and Microsoft Silverlight. MAX was a good event for Flash, and PDC a bad one for Silverlight, though the tale has a long way yet to run.

The key difference at this point is not technical, but all about partners. At MAX we saw how the Flash runtime is integral to the Blackberry PlayBook, with RIM founder Mike Lazaridis coming on stage to tell us so. Flash is also built into Google TV, and Andres Ferrate and Daniels Lee from Google Developer Relations presented a session on creating web apps for the platform – worth watching as it brings out the difference between developing for a TV “lean back” environment and traditional mouse or touch user interfaces -  and we also heard from Samsung about its Flash-enabled TVs coming in 2011. In each case, it is not just Flash but AIR, for applications that run outside the browser, which is supported. Google TV runs Android; and AIR for Android in general drew attention at MAX, encouraged by free Motorola Droid 2 smartphones handed out to attendees.

If the task was to convince Flash developers – and those on the fence – that the platform has a future, MAX delivered in spades; and Adobe can only benefit from the uncertainty surrounding the most obvious runtime rivals to Flash, Java and Silverlight.

But what about that other platform, HTML? Well, Adobe made a bit of noise about projects like EDGE, which exports animations and transitions to SVG and JavaScript using an extended JQuery library, as well as showing a “sneak peek” of a tool to export a Flash animation (but not application) to  HTML. Outside the Adobe fan club there is still considerable aversion to Flash, stoked by Apple; in one of the sessions at MAX we were told that Steve Jobs’ open memo Thoughts on Flash has done real damage.

My impression though is that Adobe still has a Flash-first philosophy. The Solution Accelerators announced for LiveCycle 2.5, for example, all seem to be based on Flash clients, which could prove difficult if Apple’s iPad continues to take off in the enterprise. Adobe could do more to provide JavaScript libraries for LiveCycle clients, and tools for creating HTML applications. If you came to MAX looking for evidence that Adobe is moving towards web standard HTML clients, you would have been largely disappointed; though seeing JQuery guy John Resig in the day two keynote would give you some comfort.

Some other MAX highlights:

  • Round-tripping between Catalyst and Flash Builder at last. This makes Catalyst more useful, though I still find myself thinking that the Catalyst features could be rolled into one of the other products, either as a designer personality for Flash Builder, or maybe in Flash Professional. The former would be easier as both Catalyst and Flash Builder are built on Eclipse.
  • Enhancements in the Flash Player – I am writing a separate piece on this, but it is great to see the 3D extensions codenamed Molehill, which together with game controller support lay the foundations for Flash games that compete more closely with console games.
  • Analytics – Adobe’s acquisition of Omniture a year ago was a far-sighted move, and the company talked about analytics in the context of applications as well as web sites. Despite unsettling privacy implications, the ability for developers to drill down into exactly how an application is used, and which parts are hardly used, has great potential for improving usability.
  • Digital publishing – it was fascinating to hear from publisher Condé Nast about its plans for digital publishing, using Adobe’s Digital Publishing Suite to create files targeting Adobe’s content viewer on iOS and eventually AIR. As a web enthusiast I have mixed feelings, and there was some foot-shuffling when I asked about SEO (Search Engine Optimisation); but as someone with a professional interest in a flourishing media industry I also hope this becomes a solid and profitable platform.

Disappointments? I was sorry to hear that Adobe is closing down contributions and reducing transparency in the open source Flex SDK, though it is said to be temporary. It also seems that plans to enhance ActionScript are not well advanced; Silverlight remains well ahead in this respect with its C# and .NET support.

What about Adobe’s enterprise ambitions? Klint Finley’s post on the Adobe Stack and what it means for Enterprise Development is a good read. The pieces are almost in place, but the focus on document processing at the back end, and Flash and Acrobat on the front end, makes this a specialist rather than a generic application platform.

Overall though it was a strong MAX. I appreciate Adobe for not being Google or Apple or Microsoft or IBM, and hope that takeover rumours remain as rumours.

See also my earlier post Adobe aims to fill mobile vacuum with AIR.

Rethinking Developers Developers Developers

I’m waiting for Microsoft CEO Steve Ballmer to speak at the London School of Economics, which seems a good moment to reflect on his well-known war cry “Developers Developers Developers”.

Behind the phrase is a theory about how to make your platform succeed. The logic is something like this. Successful platforms have lots of applications, and applications are created by developers. If you make your platform appealing to developers, they will build applications which users will want to run, therefore your platform will win in the market.

Today though we have an interesting case study – Apple’s iPhone. The iPhone has lots of apps and is winning in the market, but not because Apple made it appealing to developers. In fact, Apple put down some roadblocks for developers. The official SDK has one programming language, Objective C, which is not particularly easy to use, and unlikely to be known other than by existing Apple platform developers. Apps can only be distributed through Apple’s store, and you have to pay a fee as well as submit to an uncertain approval process to get your apps out there. Some aspects of iPhone (and iPad) development have improved since its first launch. A clause in the developer agreement forbidding use of languages other than Objective C was introduced and then removed, and the criteria for approval have been clearly stated. Nevertheless, the platform was already successful. It is hard to argue that the iPhone has prospered thanks to Apple’s developer-friendly policies.

Rather, the iPhone succeeded because its design made it appealing to users and customers. Developers went there because Apple created a ready market for their applications. If Apple CEO Steve Jobs were prone to shouting words in triplicate, they might be “Design Design Design” or “Usability usability usability”. And as for developers, what they want is “Customers customers customers.”

Well, there are vicious and virtuous circles here. Clearly it pays, in general, to make it easy for developers to target your platform. Equally, it is not enough.

Microsoft’s own behaviour shows a shift in focus towards winning customers through usability, thanks no doubt to Apple’s influence and competition. Windows 7 and Windows Phone 7 demonstrate that. Windows Phone 7 is relatively developer-friendly, particularly for .NET developers, since applications are built on Silverlight, XNA and the .NET Framework. If it succeeds though, it will be more because of its appeal to users than to developers.

What do developers want? Customers customers customers.

RIM’s new BlackBerry tablet, WebWorks developer platform – but who wants small tablets?

Blackberry has announced its pitch for the emerging tablet market, the 7” screen PlayBook. It has a new OS base on QNX Neutrino, a webkit-based web browser, Adobe Flash and AIR – offline Flash applications – front and rear cameras for video conferencing as well as taking snaps, and includes a USB port and HDMI out. There is wi-fi and Bluetooth but no 3G in the first release; you can connect to the Internet via your Blackberry. Storage is not yet specified as far as I can tell. There is no physical keyboard, which is surprising in some ways as the keyboard is the reason I hear most often for users choosing a BlackBerry smartphone over Apple’s iPhone.

image

Alongside the PlayBook RIM has announced a new developer platform. WebWorks is an HTML5 platform extended with access to local APIs, and targets both the Tablet OS and BlackBerry smartphones:

BlackBerry WebWorks applications can tap into the always-on, notification-based, push-enabled, contextual and social attributes of the BlackBerry smartphone. These applications can also access hardware features and integrate with other apps, and are powerful Super Apps that are fully integrated into the BlackBerry Application Platform.

In order to access local resources you need to package your app as a Blackberry application. Java and native C applications are also supported.

A winner? Well, there is a widespread industry presumption that we all want tablets; for example NVIDIA CEO Jen-Hsun Huang is planning on this basis, judging by what he said to the press last week. It is certainly a market in which every vendor wants a presence. There are a number of open questions though. The new tablet market is really defined by Apple’s iPad, and success for other operating systems and form factors is yet to be demonstrated. Personally I am not sure about the 7-inch screen, which is perhaps too large for a pocket and too small for the desktop-like web browsing you can do on an iPad. Here are the dimensions:

  • BlackBerry PlayBook:  7-inch 1024×600 screen,130mm x 193mm x 10mm
  • Apple iPad: 9.7-inch 1024×768 screen, 189.7mm x 242.8mm x 13.4mm

I doubt there will be much enthusiasm for carting around a phone, a small tablet, and a laptop, so in order to be viable as a portable device for work it has to be a laptop replacement. I do see this happening already with the iPad, though for me personally a netbook is both cheaper and more practical.

Apps are another key factor. It is smart of RIM to support Flash and AIR, which along with HTML 5 web applications are likely the best bet for supporting something like the PlayBook without a lot of device-specific work.

NVIDIA CEO on the spot: explains Fermi delays, CUDA vs OpenCL, rise of the tablet

NVIDIA CEO Jen-Hsung Huang spoke to the press at the GPU Technology Conference and I took the opportunity to ask some questions.

image

I asked for his views on the cloud as a supercomputer and whether that would impact the need for local supercomputers of the kind GPU computing enables.

Although we expect more and more to happen in the cloud, in the meantime we’re going to keep buying devices with more and more solid state memory. The way to think about it is, storage is simply a surrogate for bandwidth. If we had infinite bandwidth none of us would need storage. As bandwidth improves the requirement for storage should reduce. But there’s another trend which is that the amount of data we collect is growing incredibly fast … It’s going to be quite a long time before our need for storage will reduce.

But what about local computing power, Gigaflops as opposed to storage?

Wherever there is storage, there’s GigaFlops. Local storage, local computing.

Next, I brought up a subject which has been puzzling me here at GTC. You can do GPU programming with NVIDIA’s CUDA C, which only works on NVIDIA GPUs, or with OpenCL which works with other vendor’s GPUs as well. Why is there more focus here on CUDA, when on the face of it developers would be better off with the cross-GPU approach? (Of course I know part of the answer, that NVIDIA does not mind locking developers to its own products).

The reason we focus all our evangelism and energy on CUDA is because CUDA requires us to, OpenCL does not. OpenCL has the benefit of IBM, AMD, Intel, and ourselves. Now CUDA is a little difference in that its programming approach is different. Instead of an API it’s a language extension. You program in C, it’s a different model.

The reason why CUDA is more adopted than OpenCL is because it is simply more advanced. We’ve invested in CUDA much longer. The quality of the compiler is much better. The robustness of the programming environment is better. The tools around it are better, and there are more people programming it. The ecosystem is richer.

People ask me how do we feel about the fact that it is proprietary. There’s two ways to think about it. There’s CUDA and there’s Tesla. Tesla’s not proprietary at all, Tesla supports OpenCL and CUDA. If you bought a server with Tesla in it, you’re not getting anything less, you’re getting CUDA more. That’s the reason Tesla has been adopted by all the OEMs. If you want a GPU cluster, would you want one that only does OpenCL? Or does OpenCL and CUDA? 80% of GPU computing today is CUDA, 20% is OpenCL. If you want to reach 100% of it, you’re better off using Tesla. Over time, if more people use OpenCL that’s fine with us. The most important thing is GPU computing, the next most important thing to us is NVIDIA’s GPUs, and the next is CUDA. It’s way down the list.

Next, a hot topic. Jen-Hsun Huang explained why he announced a roadmap for future graphics chip architectures – Kepler in 2011, Maxwell in 2013 – so that software developers engaged in GPU programming can plan their projects. I asked him why Fermi, the current chip architecture, had been so delayed, and whether there was good reason to have confidence in the newly announced dates.

He answered by explaining the Fermi delay in both technical and management terms.

The technical answer is that there’s a piece of functionality that is between the shared symmetric multiprocessors (SMs), 236 processors, that need to communicate with each other, and with memory of all different types. So there’s SMs up here, and underneath the memories. In between there is a very complicated inter-connecting system that is very fast. It’s nearly all wires, dense metal with very little logic … we call that the fabric.

When you have wires that are next to each other that closely they couple, they interfere … it’s a solid mesh of metal. We found a major breakdown between the models, the tools, and reality. We got the first Fermi back. That piece of fabric – imagine we are all processors. All of us seem to be working. But we can’t talk to each other. We found out it’s because the connection between us is completely broken. We re-engineered the whole thing and made it work.

Your question was deeper than that. Your question wasn’t just what broke with Fermi – it was the fabric – but the question is how would you not let it happen again? It won’t be fabric next time, it will be something else.

The reason why the fabric failed isn’t because it was hard, but because it sat between the responsibility of two groups. The fabric is complicated because there’s an architectural component, a logic design component, and there’s a physics component. My engineers who know physics and my engineers who know architecture are in two different organisations. We let it sit right in the middle. So the management lesson learned – there should always be a pilot in charge.

Huang spent some time discussing changes in the industry. He identifies mobile computing “superphones” and tablets as the focus of a major shift happening now. Someone asked “What does that mean for your Geforce business?”

I don’t think like that. The way I think is, “what is my personal computer business”. The personal computer business is Geforce plus Tegra. If you start a business, don’t think about the product you make. Think about the customer you’re making it for. I want to give them the best possible personal computing experience.

Tegra is NVIDIA’s complete system on a chip, including ARM processor and of course NVIDIA graphics, aimed at mobile devices. NVIDIA’s challenge is that its success with Geforce does not guarantee success with Tegra, for which it is early days.

The further implication is that the immediate future may not be easy, as traditional PC and laptop sales decline.

The mainstream business for the personal computer industry will be rocky for some time. The reason is not because of the economy but because of mobile computing. The PC … will be under disruption from tablets. The difference between a tablet and a PC is going to become very small. Over the next few years we’re going to see that more and more people use their mobile device as their primary computer.

[Holds up Blackberry] There’s no question right now that this is my primary computer.

The rise of mobile devices is a topic Huang has returned to on several occasions here. “ARM is the most important CPU architecture, instruction set architecture, of the future” he told the keynote audience.

Clearly NVIDIA’s business plans are not without risk; but you cannot fault Huang for enthusiasm or awareness of coming changes. It is clear to me that NVIDIA has the attention of the scientific and academic community for GPU computing, and workstation OEMs are scrambling to built Tesla GPU computing cards into their systems, but transitions in the market for its mass-market graphics cards will be tricky for the company.

Update: Huang’s comments about the reasons for Fermi’s delay raised considerable interest as apparently he had not spoken about this on record before. Journalist Nico Ernst captured the moment on video:

Is the triumph of the GPU the failure of the CPU?

I’m at NVIDIA’s GPU tech conference in San Jose. The central theme of the conference is that the capabilities of modern GPUs enable substantial performance gains for general computing, not just for graphics, though most of the examples we have seen involve some element of graphical processing. The reason you should care about this is that the gains are huge.

Take Matlab for example, a popular language and IDE for algorithm development, data analysis and mathematical computation. We were told in the keynote here yesterday that Matlab is offering a parallel computing toolkit based on NVIDIA’s CUDA, with speed-ups from 10 to 40 times. Dramatic performance improvements opens up new possibilities in computing.

Why has GPU performance advanced so rapidly, whereas CPU performance has levelled off? The reason is that they use different computing models. CPUs are general-purpose. The focus is on fast serial computation, executing a single thread as rapidly as possible. Since many applications are largely single-thread, this is what we need, but there are technical barriers to increasing clock speed. Of course multi-core and multi-processor systems are now standard, so we have dual-core or quad-core machines, with big performance gains for multi-threaded applications.

By contrast, GPUs are designed to be massively parallel. A Tesla C1060 has not 2 or 4 or 8 cores, but 240; the C2050 has 448. These are not the same as CPU cores, but nevertheless do execute in parallel. The clock speed is only 1.3Ghz, whereas an Intel Core i7 Extreme is 3.3Ghz, but the Intel CPU has a mere 6 cores.  An Intel Xeon 7560 runs at 2.266 Ghz and has 8 cores.The lower clock speed in the GPU is one reason it is more power-efficient.

NVIDIA’s CUDA initiative is about making this capability available to any application. NVIDIA made changes to its hardware to make it more amenable to standard C code, and delivered CUDA C with extensions to support it. In essence it is pretty simple. The extensions let you specify functions to execute on the GPU, allocate memory for pointers on the GPU, and copy memory between the GPU (called the device) and the main memory on the PC (called the host). You can also synchronize threads and use shared memory between threads.

The reward is great performance, but there are several disadvantages. One is the challenge of concurrent programming and the subtle bugs it can introduce.

Another is the hassle of copying memory between host and device. The device is in effect a computer within a computer. Shifting data between the two is relatively show.

A third is that CUDA is proprietary to NVIDIA. If you want your code to work with ATI’s equivalent, called Streams, then you should use the OpenCL library, though I’ve noticed that most people here seem to use CUDA; I presume they are able to specify the hardware and would rather avoid the compromises of a cross-GPU library. In the worst case, if you need to support both CUDA and non-CUDA systems, you might need to support different code paths depending on what is detected at runtime.

It is all a bit messy, though there are tools and libraries to simplify the task. For example, this morning we heard about GMAC, which makes host and device appear to use a single address space, though I imagine there are performance implications.

NVIDIA says it is democratizing supercomputing, bringing high performance computing within reach for almost anyone. There is something in that; but at the same time as a developer I would rather not think about whether my code will execute on the CPU or the GPU. Viewed at the highest level, I find it disappointing that to get great performance I need to bolster the capabilities of the CPU with a specialist add-on. The triumph of the GPU is in a sense the failure of the CPU. Convergence in some form or other strikes me as inevitable.

NVIDIA talks up GPU computing, presents roadmap

At the NVIDIA GPU Technology Conference in San Jose CEO Jen-Hsun Huang talked up the company’s progress in GPU computing, showed some example applications, and announced a high-level roadmap for future graphics chip architectures. NVIDIA has three areas of focus, he said: the Quadro line for visualisation, Tesla for parallel computing, and GeForce/Tegra for personal computing. Tegra is a system on a chip aimed at mobile devices. Mobile, says Huang, is “a completely disruptive force to all of computing.”

NVIDIA’s current chip architecture is called Fermi. The company is settling on a two-year product cycle and will deliver Kepler in 2011 with 3 to 4 times the performance (expressed as Gigaflops per watt) of Fermi. Maxwell in 2013 will have around 12 times the performance of Fermi. In between these architecture changes, NVIDIA will do “kicker” updates to refresh its products, with one for Fermi due soon.

The focus of the conference though is not on super-fast graphics cards in themselves, but rather on using the GPU for general purpose computing. GPUs are very, very good at doing mathematics fast and in parallel. If you have an application that does intensive calculations, then executing that part of the code on the GPU can offer impressive performance increases. NVIDIA’s CUDA library for C lets you do exactly that. Another option is OpenCL, a standard that works across GPUs from multiple vendors.

Adobe uses CUDA for the Mercury Playback engine in Creative Suite 5, greatly improving performance in After Effects, Premiere Pro and Photoshop, but with the annoyance that you have to use a compatible NVIDIA graphics card.

The performance gain from GPU programming is so great that it is unavoidable for applications in relevant areas, such as simulation or statistical analysis. Huang gave a compelling example during the keynote, bringing heart surgeon Dr Michael Black on stage to talk about his work. Operating on a beating heart is difficult because it presents a moving target. By combining robotic surgery with software that is able to predict the heart’s movement through simulation, he is researching how to operate on a heart almost as if it were stopped and with just a small incision.

Programming the GPU is compelling, but difficult. NVIDIA is keen to see it become part of mainstream programming, for obvious reasons, and there are new libraries and tools which help with this, like Parallel Nsight for Visual Studio 2010. Another interesting development, announced today, is CUDA for x86, being developed by PGI, which will let your CUDA code run even when an NVIDIA GPU is not present. Even if the performance gains are limited, it will mean developers who need to support diverse systems can run the same code, rather than having a different code path when no CUDA GPU is detected.

That said, GPU programming still has all the challenges of concurrent development, prone to race conditions and synchronization problems.

Stuffing a server full of GPUs is a cost-effective route to super-computing. I took a brief look at the exhibition, which includes this Colfax CXT8000 with 8 Tesla GPUs; it also has three 1200W power supplies. It may cost $25,000 but if you look at the performance you are getting for the price, machines like this are great value.

image

Delphi XE includes licenses for older versions back to Delphi 7

I’ve just picked up that Delphi XE, the latest RAD Windows development suite from Embarcadero, includes licenses for older versions going back to Delphi 7.

There’s an explanation and list of what’s on offer here. Delphi 7 was the last version to use the old fully native code IDE and is delightfully fast and lightweight by today’s standards. Delphi 2007 was the last version before big Unicode changes in Delphi 2009, which often broke code, so could be useful for older projects.

The FAQ includes a few points of interest. Embarcadero is dismissive of the old Delphi for .NET (before Prism) and will not supply it:

That is an old technology that was replaced by Delphi Prism and we don’t want to encourage use of that old product.

If you have purchased XE and want to take advantage of the offer, you must do so within 180 days.

The Salesforce.com platform: what’s new, what’s coming

I’m attending the Cloudforce conference in London to catch up on what’s new with the Salesforce.com platform. CEO Marc Benioff was on good form, with a fun slide in his keynote presentation saying “Beware of the false cloud” – this was a jab at private clouds which he considers lack the advantages of a multi-tenanted public cloud platform like, you know, Salesforce.com. He has some justification – operating your own cloud is clearly a significant IT burden to carry – but that is the price of freedom. His company continues to report impressive growth.  The theme this year is Salesforce.com Chatter, a Twitter-like service embedded into the platform, for which there are just-announced mobile clients (Apple iOS, Blackberry, Android coming) as well as integration with the web UI and programmable platform.

Chatter is reducing email usage for adopters, apparently; Benioff says by 40% in his own company. Another of its advantages (aside from general social media goodness) is that users cannot attach documents directly, but only links to documents – pass by reference not by value – which is a better approach to collaboration. Of course you can do this in emails as well, but people habitually do not. It makes you think – maybe the likes of Outlook should do this by default, saving no end of space in corporate mailboxes. Or perhaps we should just use Chatter instead.

But what about the developer angle, the Force.com platform that lets you build custom applications? I attended a session on the subject. There was a comment from partner Nimbus which caught my ear – the speaker said that they avoid writing custom Apex code wherever possible, and generally find ways to use the platform’s built-in features instead. His rationale: “You will have to live with that code for ever”. It is another angle on declarative programming, in which you declare your intentions and let some underlying engine transform them into actual code. The advantage is not only ease of development, but also that improvements in the engine can enhance the application without any need to rewrite code.

I asked what is new and what is coming in the Force.com platform. Chatter is one element; one of its key features is that applications can “chat” as well as individuals. Another theme is workflow tools, and integrating the technology acquired with Informavores, which is being rebuilt on the Salesforce.com platform as Visual Process Manager. In tune with the remarks from Nimbus, there is also an effort to reduce the need for Apex code and to offer guided steps that business users can apply without the need of a development specialist. Another focus is scalability – “people are starting to use the platform in ways that we didn’t think of” – which mean back end work to handle their demands. Finally, there is the joint development with VMWare called VMForce that lets you run Java with full access to the Force.com API.