Alchemy….
// November 20th, 2008 // No Comments » // .net, RIA, c++
I have not really been a follower of Macromedia (now part of Adobe) or its products; specially Flash, but I just found out about one research project that does capture my attention: Alchemy.
From the press release:
Alchemy is a research project that allows users to compile C and C++ code that is targeted to run on the open source ActionScript Virtual Machine (AVM2). The purpose of this preview is to assess the level of community interest in reusing existing C and C++ libraries in Web applications that run on Adobe® Flash® Player and Adobe AIR®.
This project promises that C/C++ libraries that have no OS dependencies can be run on the Adobe AIR platform. This is HUGE. Just to think that at least 90% of my libraries can be used in Web Applications is awesome.
A not so direct competitor, Microsoft’s Silverlight, does provide a way to reuse C++ libraries via C++/CLI, and it works like a charm; I happend to have a lot of C++ libraries which have valuable code. Lately I have been reusing those libraries in Web Applications via C++/CLI and WebServices. It works, and it works fine.
I have not worked with Silverlight 2.0 yet; I have played around with it, but I have not done anything that is worth mentioning. In my tests, I see Ican also reuse those C++ libraries with C++/CLI and Webservices. The problem is that this approach will only work on Windows, since C++/CLI is not supported by Mono.
Another approach would be to make the WebServices in native C++, and call it from anywhere: Silverlight, Javascript and .Net. This would work anywhere.
This doesn’t take away the credit for Alchemy, which makes the C++ libraries natively accessible to Adobe AIR applications, in a way this is very close to what C++/CLI does.
The purpose of the Alchemy project is :
Alchemy is primarily intended to be used with C/C++ libraries that have few operating system dependencies. Ideally suited for computation-intensive use cases, such as audio/video transcoding, data manipulation, XML parsing, cryptographic functions or physics simulation, performance can be considerably faster than ActionScript 3.0 and anywhere from 2-10x slower than native C/C++ code. Alchemy is not intended for general development of SWF applications using C/C++.
Comparing it with C++/CLI, I do see an advatage from using C++/CLI to reuse C++ libraries in RIA applications over the Alchemy project: I can reuse .Net libraries with C++ native code, which gives me the best of both worlds.
I did some research on Alchemy, and it seems it doesn’t allow Flex code to be embedded with C++ native code. My research was not very comprehensive to say the least, so I could be wrong. It could also be too soon to tell since this is still in early stages of research and development.
In conclusion, this project seems very interesting, and I’m going to keep an eye out for it.
