One of the key features of GigaSpaces XAP/XAP.NET is the seamless interoperability of .NET Java and C++, This can happen because that the product core is developed in Java and entries are saved inside the space in a generic, language free, form, allowing each specific programming language to interact with the entries in the space as if they were written in the same programming language. Another advantage by developing the core in Java is that it allows deployment of spaces on Unix machines that interact with entries that originally arrived from a Windows .NET client. One may find himself wondering how using XAP.NET, which is a pure .NET product, can work with a Java based core? Moreover, the .NET user doesn’t need to know about it or configure anything to make it work. How does this magic occur? The answer is simple, GigaSpaces Jet infrastructure.
The Jet infrastructure (Or as we call it Provider), is a light fast and smart infrastructure that allows in process invocation from .NET to Java and vice versa. Up until 6.6 the .NET core and Java core communicated with each other using a third party product named Codemesh to do this trick, however, since it’s a third party product it addresses a more generic scenario, and couldn’t be as light and fast as our optimized Jet provider.
How does it work?
Jet provider is a thin layer written in C++/CLI that harnesses the power of mixed unmanaged/managed libraries to bridge between .NET and Java. What happens behinds the scene is that one process holds both a Jvm and a CLR, those are created on demand when the .NET core needs to talk to the Java core or the other way around. Obviously there are a lot of challenges developing such invocation framework which will be very efficient, for instance how do you transfer in memory data from the CLR heap to the Jvm heap? How do you make sure the garbage collection doesn’t break everything? How can CLR thread run Java code in the Jvm or the other way around? What’s between .NET AppDomain and Java Classloader and many more. Fortunately, using XAP.NET all of these is transparent and done for you very efficiently behind the scenes.
Why do I say efficiently? You can see a dramatic performance boost which ranges from 50% to 250% on some operations from 6.0 to 6.5, Even though the Jet Provider was fully implemented only at 6.6, many of its optimization component were already a part of the Hybrid provider in 6.5. Adding to that is the huge improvement of initial load time that was reported by some of our customers, in extreme scenarios it reduced initial load to 5% of the original time.
“The junior …”