You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by Rafael Schloming <rh...@alum.mit.edu> on 2012/10/01 18:39:10 UTC

Re: proton port to windows using Visual Studio 2010 tools

Hi Mary,

Welcome to the list! I'm looking forward to seeing the issues you've hit.
It would be great to have proton working with the Visual Studio toolset. If
you have patches ready to go already our main tools for collaboration are
JIRA[1] and reviewboard[2]. Please feel free to ask questions about either
if you're unfamiliar with apache infrastructure.

[1] https://issues.apache.org/jira/browse/PROTON
[2] https://reviews.apache.org/groups/qpid/

--Rafael

On Fri, Sep 28, 2012 at 1:12 PM, Mary Hinton <m....@nc.rr.com> wrote:

> Hi all,
>
> I am new to proton and will be helping out with a Windows port of proton-C
> using the Visual Studio 2010 toolset.
>
>
>
> With a first pass through the code, I have a list of porting issues that
> need to be addressed by the proton group.
>
> These will be introduced shortly for your review and comments.
>
>
>
> Thanks,
>
> Mary Hinton
>
>

RE: proton port to windows using Visual Studio 2010 tools

Posted by Mary Hinton <m....@nc.rr.com>.
Hi Cliff,

Your socket pair looks like  a good substitute for the pipe. 

I was getting "send: No error" back when I tested it, but I also got the
"send: No error" when I used theCreatePipe(). The difference is I don't see
POLLNVAL being returned.

Not sure what the pipe is accomplishing yet.

As far as the VLA issue, I was testing some various methods outside of
proton to check their performance. I'll set up a Jira for it as soon as I
can.
 
-----Original Message-----
From: Cliff Jansen [mailto:cliffjansen@gmail.com] 
Sent: Monday, October 01, 2012 2:28 PM
To: proton@qpid.apache.org
Subject: Re: proton port to windows using Visual Studio 2010 tools

Hi Mary,

Welcome to proton development!

Regarding your pipe issue, please see the pn_socket_pair function in the
QPID-4181 patch.

I think you can use that with WSAPoll, but if the implementation in driver.c
with select() is easier to just copy, you might as well use that.  Use of
WSAPoll or select will be temporary anyway and be mostly useful to bootstrap
the serious porting work until IO completion ports can be implemented.
QPID-4181 is certainly stale, but it ran the proton-test suite on Windows.

If you wish to discuss approaches to the VLA issue, feel free to post some
pseudo-code in the context of a JIRA.  If shouldn't be necessary to wait
until you have a whole patch to get some feedback on the course you are
taking.

Cliff


On Mon, Oct 1, 2012 at 10:49 AM, Mary Hinton <m....@nc.rr.com> wrote:
> Thanks,
> I downloaded the latest code on Saturday and merged what I had.
>
> I changed code in 26 files. Some of the changes will be easy to 
> incorporate into the current codebase, others will need decisions from 
> the group as to the best way to add the Windows changes (e.g. #ifdef 
> (s) and/or separate files, etc...).
>
> I have a list of most  of the changes I made in the code.
>
> A major problem is the pipe() and poll() support. I can use the 
> Windows functions, but the windows WSAPoll() works on sockets, not file
descriptors.
> I think the windows version will need to use the Windows IOCompletion 
> ports model for scalability, but I was hoping to substitute the 
> windows functions for poll() and pipe() just to get something up and
running.
>
> I rebuilt proton and it runs as a server and/or client, but cannot do 
> the
> poll() correctly. It seems to be getting POLLNVAL using WSAPoll() 
> because the pipe is an invalid socket. The pipe is a file descriptor 
> in Linux,  but Windows is expecting a socket in its WSAPOLLFD structure.
>
> I was wondering what the pipe() is for?  Will this be in the final 
> product or is this a temporary fix for something?
>
> Visual Studio doesn't use VLA (variable length arrays), but there are 
> various workarounds for this. I only implemented the simplest change 
> for now, but plan to change it to a better model soon.
>
> I am unfamiliar with the apache infrastructure, so I'll need some 
> guidance to present my code for review.
>
> There are other incompatibilities with  the current codebase and the 
> Visual Studio toolset, since Visual Studio doesn't support C99, but 
> the two above are probably the most serious.
>
> Thanks,
> Mary
>
> -----Original Message-----
> From: Rafael Schloming [mailto:rhs@alum.mit.edu]
> Sent: Monday, October 01, 2012 12:39 PM
> To: proton@qpid.apache.org
> Subject: Re: proton port to windows using Visual Studio 2010 tools
>
> Hi Mary,
>
> Welcome to the list! I'm looking forward to seeing the issues you've hit.
> It would be great to have proton working with the Visual Studio 
> toolset. If you have patches ready to go already our main tools for 
> collaboration are JIRA[1] and reviewboard[2]. Please feel free to ask 
> questions about either if you're unfamiliar with apache infrastructure.
>
> [1] https://issues.apache.org/jira/browse/PROTON
> [2] https://reviews.apache.org/groups/qpid/
>
> --Rafael
>
> On Fri, Sep 28, 2012 at 1:12 PM, Mary Hinton <m....@nc.rr.com> wrote:
>
>> Hi all,
>>
>> I am new to proton and will be helping out with a Windows port of 
>> proton-C using the Visual Studio 2010 toolset.
>>
>>
>>
>> With a first pass through the code, I have a list of porting issues 
>> that need to be addressed by the proton group.
>>
>> These will be introduced shortly for your review and comments.
>>
>>
>>
>> Thanks,
>>
>> Mary Hinton
>>
>>
>
>



Re: proton port to windows using Visual Studio 2010 tools

Posted by Cliff Jansen <cl...@gmail.com>.
Hi Mary,

Welcome to proton development!

Regarding your pipe issue, please see the pn_socket_pair function in
the QPID-4181 patch.

I think you can use that with WSAPoll, but if the implementation in
driver.c with select() is easier to just copy, you might as well use
that.  Use of WSAPoll or select will be temporary anyway and be mostly
useful to bootstrap the serious porting work until IO completion ports
can be implemented.  QPID-4181 is certainly stale, but it ran the
proton-test suite on Windows.

If you wish to discuss approaches to the VLA issue, feel free to post
some pseudo-code in the context of a JIRA.  If shouldn't be necessary
to wait until you have a whole patch to get some feedback on the
course you are taking.

Cliff


On Mon, Oct 1, 2012 at 10:49 AM, Mary Hinton <m....@nc.rr.com> wrote:
> Thanks,
> I downloaded the latest code on Saturday and merged what I had.
>
> I changed code in 26 files. Some of the changes will be easy to incorporate
> into the current codebase, others will need decisions from the group as to
> the best way to add the Windows changes (e.g. #ifdef (s) and/or separate
> files, etc...).
>
> I have a list of most  of the changes I made in the code.
>
> A major problem is the pipe() and poll() support. I can use the Windows
> functions, but the windows WSAPoll() works on sockets, not file descriptors.
> I think the windows version will need to use the Windows IOCompletion ports
> model for scalability, but I was hoping to substitute the windows functions
> for poll() and pipe() just to get something up and running.
>
> I rebuilt proton and it runs as a server and/or client, but cannot do the
> poll() correctly. It seems to be getting POLLNVAL using WSAPoll() because
> the pipe is an invalid socket. The pipe is a file descriptor in Linux,  but
> Windows is expecting a socket in its WSAPOLLFD structure.
>
> I was wondering what the pipe() is for?  Will this be in the final product
> or is this a temporary fix for something?
>
> Visual Studio doesn't use VLA (variable length arrays), but there are
> various workarounds for this. I only implemented the simplest change for
> now, but plan to change it to a better model soon.
>
> I am unfamiliar with the apache infrastructure, so I'll need some guidance
> to present my code for review.
>
> There are other incompatibilities with  the current codebase and the Visual
> Studio toolset, since Visual Studio doesn't support C99, but the two above
> are probably the most serious.
>
> Thanks,
> Mary
>
> -----Original Message-----
> From: Rafael Schloming [mailto:rhs@alum.mit.edu]
> Sent: Monday, October 01, 2012 12:39 PM
> To: proton@qpid.apache.org
> Subject: Re: proton port to windows using Visual Studio 2010 tools
>
> Hi Mary,
>
> Welcome to the list! I'm looking forward to seeing the issues you've hit.
> It would be great to have proton working with the Visual Studio toolset. If
> you have patches ready to go already our main tools for collaboration are
> JIRA[1] and reviewboard[2]. Please feel free to ask questions about either
> if you're unfamiliar with apache infrastructure.
>
> [1] https://issues.apache.org/jira/browse/PROTON
> [2] https://reviews.apache.org/groups/qpid/
>
> --Rafael
>
> On Fri, Sep 28, 2012 at 1:12 PM, Mary Hinton <m....@nc.rr.com> wrote:
>
>> Hi all,
>>
>> I am new to proton and will be helping out with a Windows port of
>> proton-C using the Visual Studio 2010 toolset.
>>
>>
>>
>> With a first pass through the code, I have a list of porting issues
>> that need to be addressed by the proton group.
>>
>> These will be introduced shortly for your review and comments.
>>
>>
>>
>> Thanks,
>>
>> Mary Hinton
>>
>>
>
>

RE: proton port to windows using Visual Studio 2010 tools

Posted by Mary Hinton <m....@nc.rr.com>.
Thanks,
I downloaded the latest code on Saturday and merged what I had.

I changed code in 26 files. Some of the changes will be easy to incorporate
into the current codebase, others will need decisions from the group as to
the best way to add the Windows changes (e.g. #ifdef (s) and/or separate
files, etc...).

I have a list of most  of the changes I made in the code.

A major problem is the pipe() and poll() support. I can use the Windows
functions, but the windows WSAPoll() works on sockets, not file descriptors.
I think the windows version will need to use the Windows IOCompletion ports
model for scalability, but I was hoping to substitute the windows functions
for poll() and pipe() just to get something up and running.

I rebuilt proton and it runs as a server and/or client, but cannot do the
poll() correctly. It seems to be getting POLLNVAL using WSAPoll() because
the pipe is an invalid socket. The pipe is a file descriptor in Linux,  but
Windows is expecting a socket in its WSAPOLLFD structure.  

I was wondering what the pipe() is for?  Will this be in the final product
or is this a temporary fix for something?

Visual Studio doesn't use VLA (variable length arrays), but there are
various workarounds for this. I only implemented the simplest change for
now, but plan to change it to a better model soon.

I am unfamiliar with the apache infrastructure, so I'll need some guidance
to present my code for review.
    
There are other incompatibilities with  the current codebase and the Visual
Studio toolset, since Visual Studio doesn't support C99, but the two above
are probably the most serious.

Thanks, 
Mary

-----Original Message-----
From: Rafael Schloming [mailto:rhs@alum.mit.edu] 
Sent: Monday, October 01, 2012 12:39 PM
To: proton@qpid.apache.org
Subject: Re: proton port to windows using Visual Studio 2010 tools

Hi Mary,

Welcome to the list! I'm looking forward to seeing the issues you've hit.
It would be great to have proton working with the Visual Studio toolset. If
you have patches ready to go already our main tools for collaboration are
JIRA[1] and reviewboard[2]. Please feel free to ask questions about either
if you're unfamiliar with apache infrastructure.

[1] https://issues.apache.org/jira/browse/PROTON
[2] https://reviews.apache.org/groups/qpid/

--Rafael

On Fri, Sep 28, 2012 at 1:12 PM, Mary Hinton <m....@nc.rr.com> wrote:

> Hi all,
>
> I am new to proton and will be helping out with a Windows port of 
> proton-C using the Visual Studio 2010 toolset.
>
>
>
> With a first pass through the code, I have a list of porting issues 
> that need to be addressed by the proton group.
>
> These will be introduced shortly for your review and comments.
>
>
>
> Thanks,
>
> Mary Hinton
>
>