You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Steve Huston (JIRA)" <qp...@incubator.apache.org> on 2008/10/30 23:48:44 UTC

[jira] Resolved: (QPID-1338) Allow multiple platforms differences in C++ broker, client code

     [ https://issues.apache.org/jira/browse/QPID-1338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Huston resolved QPID-1338.
--------------------------------

       Resolution: Fixed
    Fix Version/s: M4

The Windows-specific upper-level broker pieces are now in the svn repo; svn revision 709271

> Allow multiple platforms differences in C++ broker, client code
> ---------------------------------------------------------------
>
>                 Key: QPID-1338
>                 URL: https://issues.apache.org/jira/browse/QPID-1338
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker, C++ Client
>    Affects Versions: M4
>            Reporter: Steve Huston
>            Priority: Minor
>             Fix For: M4
>
>         Attachments: broker.diff
>
>
> This is in the context of adding Windows support to the C++ broker and client. There are currently 3 places where platform differences may arise:
> 1. Broker code (cpp/src/qpid/broker)
> 2. Client code (cpp/src/qpid/client)
> 3. Supporting code which may be common to both (cpp/src/qpid/sys)
> The current general approach as I've been advised and encouraged by Andrew Stitcher, primarily while working on the supporting (cpp/src/qpid/sys) level code such as the I/O system is to define a common interface in a header file (such as in cpp/src/qpid/sys) and then implement the class(es) differently in platform-specific sources which reside in cpp/src/qpid/sys/posix, cpp/src/qpid/sys/windows. This has been working well.
> The other two places, however, cpp/src/qpid/broker and cpp/src/qpid/client, don't current have platform-specific subdirectories since to this point, all the platform differences have successfully been pushed down to cpp/src/qpid/sys. However, adding a platform quite different from Linux has forced this issue up a level and we now need to come up with a way to handle platform differences at the broker and client level. This is arising in 2 different types of situations:
> 1. Areas such as logging classes, where the options and capabilities are not the same across platforms. For example, syslog doesn't make sense on Windows, where logging to the event log would. Simply equating the two doesn't work since there are different related options. Many options are common. Broker authentication is another area - Windows doesn't provide Cyrus sasl - it uses other functions.
> 2. Situations where the features are the same, but in order to bring in platform different code at the I/O layer, a source file is copied and edited slightly to bring in a different lower layer. This is the situation in the client where the Connector.cpp is copied to WinConnector.cpp to bring in the Windows asynch I/O code.
> Up to now the approach has been this:
> - When doing something platform-dependent in cpp/src/qpid/sys, add platform diffs in cpp/src/qpid/sys/<platform>
> - When doing something platform-dependent in cpp/src/qpid/log, add platform diffs in cpp/src/qpid/log/<platform>
> - When doing something platform-dependent in cpp/src/qpid/broker, or cpp/src/qpid/client, use a file name of the form <platform>File.cpp
> Would it be more appropriate to create platform-specific directories under cpp/src/qpid/broker and .../client? Or stick with the current method? I favor the new directories, but am open to ideas.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.