You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Aidan Skinner <ai...@apache.org> on 2009/01/23 17:34:24 UTC

IKVMing the Java client for .Net

I'm about to head off for a week, and thought I'd give this topic a
bit of a poke with a stick before I did so there's a bit of discussion
on the topic before we're deep into M5 territory.

Traditionally, the approach to writing the .Net client has been to
transliterate the Java client by hand and slap a random API on top of
that. That seems like a bit of a waste of effort to me. I was thinking
about using IKVM to load the Java client as a library for the
AMQP-level bits and write a native C# implementations of WCF etc. that
used that.

This has the benefit of using an existing, tested client
implementation, reducing the amount of work that needs done and would
help us seperate the AMQP specific bits of the Java client out from
the JMS specific bits. It also means that the whole client is running
in managed code, which is good.

What do people think?

- Aidan

-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Aidan Skinner <ai...@gmail.com>.
On Wed, Jan 28, 2009 at 8:01 PM, Robert Greig <ro...@gmail.com> wrote:

> 2009/1/23 Aidan Skinner <ai...@apache.org>:
>
>> Traditionally, the approach to writing the .Net client has been to
>> transliterate the Java client by hand and slap a random API on top of
>> that. That seems like a bit of a waste of effort to me. I was thinking
>> about using IKVM to load the Java client as a library for the
>> AMQP-level bits and write a native C# implementations of WCF etc. that
>> used that.
>>
>> This has the benefit of using an existing, tested client
>> implementation, reducing the amount of work that needs done and would
>> help us seperate the AMQP specific bits of the Java client out from
>> the JMS specific bits. It also means that the whole client is running
>> in managed code, which is good.
>>
>> What do people think?
>
> This is something we considered a while ago when pondering the very
> first .NET client. At the time it was scuppered because IKVM did not
> support NIO.
>
> I definitely think it's worth looking at again if IKVM now supports
> enough API to make it feasible.

IKVM should support all of the JDK 6 API now, it uses OpenJDK (nee GNU
Classpath), and ships java.nio in it's core package, so we might be
able to get away without too many extra bits and pieces.

> I tend to agree that we'd need to build .NET stuff by hand on top
> since in a raw Java API there will be things that are not idiomatic in
> .NET - e.g. no use of events, or capitalisation of method names etc.

Totally. Having something which feels natural is really important.

- Aidan
-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
Dave,

that sounds like a great list to start on.

Carl.


David Ingham wrote:
> Hi all,
>
> Just a quick intro for the list since I've been quiet to date. I work on messaging technologies in the Connected Systems Division at Microsoft. I've been tracking AMQP since early 2005 when John Davies first announced its existence at the Web Services on Wall Street Conference. In a previous life I architected HP's JMS implementation and chunks of transaction processing and messaging middleware for HP, Arjuna and Bluestone.
>
> Carl's right, we have been investigating the idea of layering a WCF channel implementation on top of the C++ client library. That is, the managed code channel implementation would pinvoke down to the native C++ code. This is the approach that we used for the MSMQ channel that ships in the .NET framework today and it works pretty well. We're drawn to this approach primarily because of the maturity of the C++ code base. The pure .NET approach clearly has merit too; one of the key advantages being that it offers the potential to factor the code in a way that's more in line with WCF best practice, i.e., as a set of layered channels rather than as a monolithic block.
>
> We're planning on putting in some effort in on this task but I think there are a few more pressing tasks on the Windows side of the house that we'll try to help out with first. Cliff has already commented on the build system issues; I think it'd be great if we could get the equivalent of the make/make check functionality that exists today on Linux up and running on Windows. As people have already mentioned, it would be a big improvement if we can get the builds running of the same input files so that we can avoid these sync issues that have been causing problems recently. Then there's the packaging work that folks have been discussing, adding DLL support and building some form of installer to make the end-user experience as slick as possible. Does this sound like a reasonable set of things?
>
> Anyway, it's great to be here and I look forward to working with you all.
>
> Cheers,
>
> Dave.
>
> -----Original Message-----
> From: Carl Trieloff [mailto:cctrieloff@redhat.com]
> Sent: Wednesday, January 28, 2009 12:25 PM
> To: dev@qpid.apache.org
> Subject: Re: IKVMing the Java client for .Net
>
> Joshua Kramer wrote:
>   
>>> I tend to agree that we'd need to build .NET stuff by hand on top
>>> since in a raw Java API there will be things that are not idiomatic in
>>> .NET - e.g. no use of events, or capitalisation of method names etc.
>>>       
>> Has anybody investigated the possibility of creating a .NET assembly
>> from the C++ client, instead of trying to use IKVM and the Java client?
>>
>>     
>
> When speaking to the Microsoft guys that had mentioned trying this
> approach with me. Cliff, any comments on the topic?
>
> Carl.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
>
>  
> On the Java broker side, we currently have no-one (unless I missed it) 
> declaring that they're working on 0-10 for M5. Is someone planning to 
> do this, firmly ? I think this has bearing on my (and other Java-ers) 
> views here of the short-term/medium-term requirements.

Marnie,

 From the thread earlier, I believe it was discussed to keep the Java 
broker stable for M5 and do larger changes for M6.  I think that 
discussing has headed off work on M5 for 0-10.  If this has changed, I 
am sure enough people will pile in to get it to 0-10 for M5.

So, to open that topic again -- those working on Java, want to have that 
amount of change for M5?
Carl.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Marnie McCormack <ma...@googlemail.com>.
I think a key point in our decision making here, one we have not always
given enough importance to, is the needs of our existing users. A few of
them bend my ear, so here goes ....

Qpid has been going for quite a while now, and we have many existing users
who have deployed a Java Broker and are using the .Net/Java/C++ (old)
clients to talk to it. We need to avoid creating situations where these
users are forced to upgrade their broker to use our clients going forward.

Interoperability is really important, and will remain so for the next 12
months. Not all implementors of AMQP will be at the same version as quickly
as others. Backwards compability remains a significant advantage for our
users. and one we should strive to keep.

On the Java broker side, we currently have no-one (unless I missed it)
declaring that they're working on 0-10 for M5. Is someone planning to do
this, firmly ? I think this has bearing on my (and other Java-ers) views
here of the short-term/medium-term requirements.

Marnie
On Mon, Feb 2, 2009 at 4:37 PM, Carl Trieloff <cc...@redhat.com> wrote:

> Aidan Skinner wrote:
>
>> On Mon, Feb 2, 2009 at 2:00 PM, Carl Trieloff <cc...@redhat.com>
>> wrote:
>>
>>
>>
>>> Only supporting 0-10 means it won't talk to the current Java broker or
>>>> any of the other AMQP implementations such as OpenAMQ or RabbitMQ.
>>>>
>>>>
>>>>
>>> Does that really matter, we already have an 0-8 client for .NET and
>>> others
>>> exist. We need to look
>>>
>>>
>>
>> I think having a client which can interoperate with 3 of the 4 AMQP
>> brokers I know of is quite important. The existing 0-8 .Net client is
>> somewhat suboptimal and doesn't support any standard API.
>>
>
> I believe that should drive our technology selection. That is something
> that will change with the
> political landscape. What does not change is that we will need to maintain
> the client for many years. I
> think we should work out the optimal solution for .NET (Windows) as the top
> criteria for technology
> selection.
>
> Carl.
>

Re: mailing lists are not showing on the mod_mbox site listing

Posted by Carl Trieloff <cc...@redhat.com>.
Infra has fixed it for us.

Carl.


Robbie Gemmell wrote:
> The Qpid mailing lists have disappeared from the mod_mbox site listing at
> http://mail-archives.apache.org/mod_mbox/
>
> For a while both the incubator lists and the new top level lists were
> present on the page, but now neither set are present, although the current
> archives are still working ok if you follow the direct links from the qpid
> pages.
>
>
> Robbie
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: mailing lists are not showing on the mod_mbox site listing

Posted by Joe Schaefer <jo...@yahoo.com>.
Should be fixed now.



----- Original Message ----
> From: Carl Trieloff <cc...@redhat.com>
> To: dev@qpid.apache.org; Apache Infrastructure <in...@apache.org>
> Sent: Monday, February 2, 2009 3:44:40 PM
> Subject: mailing lists are not showing on the mod_mbox site listing
> 
> 
> Infra,
> 
> Is some one able to take a look at this, do we need to file a ticket?
> 
> Carl.
> 
> 
> Robbie Gemmell wrote:
> > The Qpid mailing lists have disappeared from the mod_mbox site listing at
> > http://mail-archives.apache.org/mod_mbox/
> >
> > For a while both the incubator lists and the new top level lists were
> > present on the page, but now neither set are present, although the current
> > archives are still working ok if you follow the direct links from the qpid
> > pages.
> >
> >
> > Robbie
> >
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:dev-subscribe@qpid.apache.org
> >
> >  



      

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: mailing lists are not showing on the mod_mbox site listing

Posted by Yegor Kozlov <ye...@apache.org>.
Hi Infra,

POI lists are not showing on mod_mbox. Would you please check what's the matter.

http://mail-archives.apache.org/mod_mbox/poi-user/
http://mail-archives.apache.org/mod_mbox/poi-dev/

Strange, but for some projects mod_mbox works just fine, for example, I can see 
http://mail-archives.apache.org/mod_mbox/lucene-java-dev/

Thanks,
Yegor

> 
> Infra,
> 
> Is some one able to take a look at this, do we need to file a ticket?
> 
> Carl.
> 
> 
> Robbie Gemmell wrote:
>> The Qpid mailing lists have disappeared from the mod_mbox site listing at
>> http://mail-archives.apache.org/mod_mbox/
>>
>> For a while both the incubator lists and the new top level lists were
>> present on the page, but now neither set are present, although the 
>> current
>> archives are still working ok if you follow the direct links from the 
>> qpid
>> pages.
>>
>>
>> Robbie
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>>
>>   
> 
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


mailing lists are not showing on the mod_mbox site listing

Posted by Carl Trieloff <cc...@redhat.com>.
Infra,

Is some one able to take a look at this, do we need to file a ticket?

Carl.


Robbie Gemmell wrote:
> The Qpid mailing lists have disappeared from the mod_mbox site listing at
> http://mail-archives.apache.org/mod_mbox/
>
> For a while both the incubator lists and the new top level lists were
> present on the page, but now neither set are present, although the current
> archives are still working ok if you follow the direct links from the qpid
> pages.
>
>
> Robbie
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


mailing lists are not showing on the mod_mbox site listing

Posted by Robbie Gemmell <ge...@dcs.gla.ac.uk>.
The Qpid mailing lists have disappeared from the mod_mbox site listing at
http://mail-archives.apache.org/mod_mbox/

For a while both the incubator lists and the new top level lists were
present on the page, but now neither set are present, although the current
archives are still working ok if you follow the direct links from the qpid
pages.


Robbie


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
Carl Trieloff wrote:
> Aidan Skinner wrote:
>> On Mon, Feb 2, 2009 at 2:00 PM, Carl Trieloff <cc...@redhat.com> 
>> wrote:
>>
>>  
>>>> Only supporting 0-10 means it won't talk to the current Java broker or
>>>> any of the other AMQP implementations such as OpenAMQ or RabbitMQ.
>>>>
>>>>       
>>> Does that really matter, we already have an 0-8 client for .NET and 
>>> others
>>> exist. We need to look
>>>     
>>
>> I think having a client which can interoperate with 3 of the 4 AMQP
>> brokers I know of is quite important. The existing 0-8 .Net client is
>> somewhat suboptimal and doesn't support any standard API.
>
Correction...

> I believe that  should -- not -- drive our technology selection. That 
> is something that will change with the
> political landscape. What does not change is that we will need to 
> maintain the client for many years. I
> think we should work out the optimal solution for .NET (Windows) as 
> the top criteria for technology
> selection.
>
> Carl.
>


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
Aidan Skinner wrote:
> On Mon, Feb 2, 2009 at 2:00 PM, Carl Trieloff <cc...@redhat.com> wrote:
>
>   
>>> Only supporting 0-10 means it won't talk to the current Java broker or
>>> any of the other AMQP implementations such as OpenAMQ or RabbitMQ.
>>>
>>>       
>> Does that really matter, we already have an 0-8 client for .NET and others
>> exist. We need to look
>>     
>
> I think having a client which can interoperate with 3 of the 4 AMQP
> brokers I know of is quite important. The existing 0-8 .Net client is
> somewhat suboptimal and doesn't support any standard API.

I believe that should drive our technology selection. That is something 
that will change with the
political landscape. What does not change is that we will need to 
maintain the client for many years. I
think we should work out the optimal solution for .NET (Windows) as the 
top criteria for technology
selection.

Carl.

Re: IKVMing the Java client for .Net

Posted by Aidan Skinner <ai...@apache.org>.
On Mon, Feb 2, 2009 at 2:00 PM, Carl Trieloff <cc...@redhat.com> wrote:

>> Only supporting 0-10 means it won't talk to the current Java broker or
>> any of the other AMQP implementations such as OpenAMQ or RabbitMQ.
>>
>
> Does that really matter, we already have an 0-8 client for .NET and others
> exist. We need to look

I think having a client which can interoperate with 3 of the 4 AMQP
brokers I know of is quite important. The existing 0-8 .Net client is
somewhat suboptimal and doesn't support any standard API.

- Aidan
-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
> Only supporting 0-10 means it won't talk to the current Java broker or
> any of the other AMQP implementations such as OpenAMQ or RabbitMQ.
>   

Does that really matter, we already have an 0-8 client for .NET and 
others exist. We need to look
forward. I would say the target is Windows where dll's will work fine & 
Mono for which I have no
idea the limitations.

Carl.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Aidan Skinner <ai...@apache.org>.
On Fri, Jan 30, 2009 at 6:11 AM, David Ingham
<Da...@microsoft.com> wrote:

> Carl's right, we have been investigating the idea of layering a WCF channel implementation on top of the C++ client library. That is, the managed code channel implementation would pinvoke down to the native C++ code. This is the approach that we used for the MSMQ channel that ships in the .NET framework today and it works pretty well. We're drawn to this approach primarily because of the maturity of the C++ code base. The pure .NET approach clearly has merit too; one of the key advantages being that it offers the potential to factor the code in a way that's more in line with WCF best practice, i.e., as a set of layered channels rather than as a monolithic block.

Doing it on top of the C++ client has two current disadvantages over
the Java client that I can see:

not 100% managed code
only supports 0-10

Not having all managed code reduces portability (since you're now
limited to the platforms that the C++ client supports) and limits the
security profiles that the client will run under.

Only supporting 0-10 means it won't talk to the current Java broker or
any of the other AMQP implementations such as OpenAMQ or RabbitMQ.

Related to this, it seems likely that the Java client will support
AMQP 1-0 before the C++ client does, if only because the Java client
already supports multiple protocols.

On an unrelated note, what do you mean by the "the maturity of the C++
code base"? What about that client made it a better choice from your
PoV than the Java client?

- Aidan
-- 
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by John O'Hara <jo...@gmail.com>.
I think if the C++ Broker on Windows becomes a truly first class citizen,
the WCF calling down to that would be fine and work very well.
Of course C++ can also be compiled to the CLR, but that would require the
C++ be quite extensively annotated for the purpose, so probably not a flyer.

IKVM is very credible.  We've had success with it else where, and aside from
the size of the support library, its fine.

So, we will end up with C++ and Java wire drivers that are both callable
from .NET.  Ironically, the Java one can be 100% CLR.  It will be
interesting to see how that plays out.

Since the JVM (and CLR) are also used for more and more languages, it makes
sense to maintain both C++/Java as first class citizens, imho.

What we don't want to do, it wastes effort, since multi-platform support can
become very expensive and poor implementations in some part of the API will
put people off.

So it looks like investing in "pluggable" C++ and Java lowlevel API's makes
a lot of sense.

John

2009/1/30 Robert Greig <ro...@gmail.com>

> 2009/1/30 David Ingham <Da...@microsoft.com>:
>
> > We're planning on putting in some effort in on this task but I think
> there are a few more pressing tasks on the Windows side of the house that
> we'll try to help out with first. Cliff has already commented on the build
> system issues; I think it'd be great if we could get the equivalent of the
> make/make check functionality that exists today on Linux up and running on
> Windows. As people have already mentioned, it would be a big improvement if
> we can get the builds running of the same input files so that we can avoid
> these sync issues that have been causing problems recently. Then there's the
> packaging work that folks have been discussing, adding DLL support and
> building some form of installer to make the end-user experience as slick as
> possible. Does this sound like a reasonable set of things?
> >
> > Anyway, it's great to be here and I look forward to working with you all.
>
> Dave, welcome aboard. It's great to have focus on the Windows platform.
>
> I agree that improving the end user Windows experience with the C++
> broker is the most important thing right now.
>
> RG
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>

Re: IKVMing the Java client for .Net

Posted by Robert Greig <ro...@gmail.com>.
2009/1/30 David Ingham <Da...@microsoft.com>:

> We're planning on putting in some effort in on this task but I think there are a few more pressing tasks on the Windows side of the house that we'll try to help out with first. Cliff has already commented on the build system issues; I think it'd be great if we could get the equivalent of the make/make check functionality that exists today on Linux up and running on Windows. As people have already mentioned, it would be a big improvement if we can get the builds running of the same input files so that we can avoid these sync issues that have been causing problems recently. Then there's the packaging work that folks have been discussing, adding DLL support and building some form of installer to make the end-user experience as slick as possible. Does this sound like a reasonable set of things?
>
> Anyway, it's great to be here and I look forward to working with you all.

Dave, welcome aboard. It's great to have focus on the Windows platform.

I agree that improving the end user Windows experience with the C++
broker is the most important thing right now.

RG

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


RE: IKVMing the Java client for .Net

Posted by David Ingham <Da...@microsoft.com>.
Hi all,

Just a quick intro for the list since I've been quiet to date. I work on messaging technologies in the Connected Systems Division at Microsoft. I've been tracking AMQP since early 2005 when John Davies first announced its existence at the Web Services on Wall Street Conference. In a previous life I architected HP's JMS implementation and chunks of transaction processing and messaging middleware for HP, Arjuna and Bluestone.

Carl's right, we have been investigating the idea of layering a WCF channel implementation on top of the C++ client library. That is, the managed code channel implementation would pinvoke down to the native C++ code. This is the approach that we used for the MSMQ channel that ships in the .NET framework today and it works pretty well. We're drawn to this approach primarily because of the maturity of the C++ code base. The pure .NET approach clearly has merit too; one of the key advantages being that it offers the potential to factor the code in a way that's more in line with WCF best practice, i.e., as a set of layered channels rather than as a monolithic block.

We're planning on putting in some effort in on this task but I think there are a few more pressing tasks on the Windows side of the house that we'll try to help out with first. Cliff has already commented on the build system issues; I think it'd be great if we could get the equivalent of the make/make check functionality that exists today on Linux up and running on Windows. As people have already mentioned, it would be a big improvement if we can get the builds running of the same input files so that we can avoid these sync issues that have been causing problems recently. Then there's the packaging work that folks have been discussing, adding DLL support and building some form of installer to make the end-user experience as slick as possible. Does this sound like a reasonable set of things?

Anyway, it's great to be here and I look forward to working with you all.

Cheers,

Dave.

-----Original Message-----
From: Carl Trieloff [mailto:cctrieloff@redhat.com]
Sent: Wednesday, January 28, 2009 12:25 PM
To: dev@qpid.apache.org
Subject: Re: IKVMing the Java client for .Net

Joshua Kramer wrote:
>
>> I tend to agree that we'd need to build .NET stuff by hand on top
>> since in a raw Java API there will be things that are not idiomatic in
>> .NET - e.g. no use of events, or capitalisation of method names etc.
>
> Has anybody investigated the possibility of creating a .NET assembly
> from the C++ client, instead of trying to use IKVM and the Java client?
>

When speaking to the Microsoft guys that had mentioned trying this
approach with me. Cliff, any comments on the topic?

Carl.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
Joshua Kramer wrote:
>
>> I tend to agree that we'd need to build .NET stuff by hand on top
>> since in a raw Java API there will be things that are not idiomatic in
>> .NET - e.g. no use of events, or capitalisation of method names etc.
>
> Has anybody investigated the possibility of creating a .NET assembly 
> from the C++ client, instead of trying to use IKVM and the Java client?
>

When speaking to the Microsoft guys that had mentioned trying this 
approach with me. Cliff, any comments on the topic?

Carl.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Joshua Kramer <jo...@globalherald.net>.
> I tend to agree that we'd need to build .NET stuff by hand on top
> since in a raw Java API there will be things that are not idiomatic in
> .NET - e.g. no use of events, or capitalisation of method names etc.

Has anybody investigated the possibility of creating a .NET assembly from 
the C++ client, instead of trying to use IKVM and the Java client?

-- 

-----
http://www.globalherald.net/jb01
GlobalHerald.NET, the Smarter Social Network! (tm)

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Robert Greig <ro...@gmail.com>.
2009/1/23 Aidan Skinner <ai...@apache.org>:

> Traditionally, the approach to writing the .Net client has been to
> transliterate the Java client by hand and slap a random API on top of
> that. That seems like a bit of a waste of effort to me. I was thinking
> about using IKVM to load the Java client as a library for the
> AMQP-level bits and write a native C# implementations of WCF etc. that
> used that.
>
> This has the benefit of using an existing, tested client
> implementation, reducing the amount of work that needs done and would
> help us seperate the AMQP specific bits of the Java client out from
> the JMS specific bits. It also means that the whole client is running
> in managed code, which is good.
>
> What do people think?

This is something we considered a while ago when pondering the very
first .NET client. At the time it was scuppered because IKVM did not
support NIO.

I definitely think it's worth looking at again if IKVM now supports
enough API to make it feasible.

I tend to agree that we'd need to build .NET stuff by hand on top
since in a raw Java API there will be things that are not idiomatic in
.NET - e.g. no use of events, or capitalisation of method names etc.

RG

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


RE: IKVMing the Java client for .Net

Posted by "Cliff Jansen (Interop Systems Inc)" <v-...@microsoft.com>.
Robert Greig wrote:
> Finally, there are performance issue with managed/non-managed heap
> copies in Java that makes JNI unattractive (I don't know if this
> applies to .NET too - although I did ask the question on this mailing
> list some time ago without receiving any answer).

I'll take a stab at it now.

This can be mitigated somewhat by asking the garbage collector to pin
a managed memory location for a brief amount of time, but there are
housekeeping costs associated with that too.

In the current WCF implementation, there is a single copy between the
binary message content in managed space and the individual AMQP
message body frames in native space.  A purely native Visual C++
application would have to make that same copy.  But it would be spared
the costs of the pinning and the numerous managed to native
transitions used to monitor and control the Qpid objects that control
connections, sessions, subscriptions etc.  For very large messages,
the overhead is small.  For 100 byte sized ones it is certainly
significant.

Cliff

-----Original Message-----
From: Robert Greig [mailto:robert.j.greig@gmail.com] 
Sent: Wednesday, January 28, 2009 12:05 PM
To: dev@qpid.apache.org; cctrieloff@redhat.com
Subject: Re: IKVMing the Java client for .Net

2009/1/23 Carl Trieloff <cc...@redhat.com>:

> In a discussion with the Microsoft guys, I they where thinking of using the
> C++ client, with WCF on top of that. They seem to have thought about that
> quite a bit, so it would be good to get those comments onto the list also
> around this topic.

Is this not going to suffer the same performance issues that Java has
with JNI? (I ask that as a question, not an assertion, but I had
always assumed this would apply across both platforms).

In Java there is a non-trivial performance penalty copying data from
the C heap to the Java heap and vice versa. This is one reason why
some JDBC drivers built on top of native code perform and scale much
worse than pure Java drivers (the example often benchmarked is the
Oracle driver).

RG

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Robert Greig <ro...@gmail.com>.
2009/1/23 Carl Trieloff <cc...@redhat.com>:

> In a discussion with the Microsoft guys, I they where thinking of using the
> C++ client, with WCF on top of that. They seem to have thought about that
> quite a bit, so it would be good to get those comments onto the list also
> around this topic.

Is this not going to suffer the same performance issues that Java has
with JNI? (I ask that as a question, not an assertion, but I had
always assumed this would apply across both platforms).

In Java there is a non-trivial performance penalty copying data from
the C heap to the Java heap and vice versa. This is one reason why
some JDBC drivers built on top of native code perform and scale much
worse than pure Java drivers (the example often benchmarked is the
Oracle driver).

RG

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Carl Trieloff <cc...@redhat.com>.
Rafael Schloming wrote:
> Aidan Skinner wrote:
>> I'm about to head off for a week, and thought I'd give this topic a
>> bit of a poke with a stick before I did so there's a bit of discussion
>> on the topic before we're deep into M5 territory.
>>
>> Traditionally, the approach to writing the .Net client has been to
>> transliterate the Java client by hand and slap a random API on top of
>> that. That seems like a bit of a waste of effort to me. I was thinking
>> about using IKVM to load the Java client as a library for the
>> AMQP-level bits and write a native C# implementations of WCF etc. that
>> used that.
>>
>> This has the benefit of using an existing, tested client
>> implementation, reducing the amount of work that needs done and would
>> help us seperate the AMQP specific bits of the Java client out from
>> the JMS specific bits. It also means that the whole client is running
>> in managed code, which is good.
>>
>> What do people think?
>
> I definitely think this is worthy of investigation. I know nothing 
> about IKVM, but if it works, it would be a significantly preferable to 
> the current approach which is IMHO unsustainable.
>

In a discussion with the Microsoft guys, I they where thinking of using 
the C++ client, with WCF on top of that. They seem to have thought about 
that quite a bit, so it would be good to get those comments onto the 
list also around this topic.

Carl.




---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Re: IKVMing the Java client for .Net

Posted by Rafael Schloming <ra...@redhat.com>.
Aidan Skinner wrote:
> I'm about to head off for a week, and thought I'd give this topic a
> bit of a poke with a stick before I did so there's a bit of discussion
> on the topic before we're deep into M5 territory.
> 
> Traditionally, the approach to writing the .Net client has been to
> transliterate the Java client by hand and slap a random API on top of
> that. That seems like a bit of a waste of effort to me. I was thinking
> about using IKVM to load the Java client as a library for the
> AMQP-level bits and write a native C# implementations of WCF etc. that
> used that.
> 
> This has the benefit of using an existing, tested client
> implementation, reducing the amount of work that needs done and would
> help us seperate the AMQP specific bits of the Java client out from
> the JMS specific bits. It also means that the whole client is running
> in managed code, which is good.
> 
> What do people think?

I definitely think this is worthy of investigation. I know nothing about 
IKVM, but if it works, it would be a significantly preferable to the 
current approach which is IMHO unsustainable.

--Rafael


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org