adding rsockets support into JDK
Chris Hegarty
chris.hegarty at oracle.com
Tue Jan 29 14:20:53 UTC 2019
Lucy, Brian, Alan
The part of the spec that talks about the SelectorProvider is still
relevant, even though the provider is not directly accessible from the
RdmaSockets class.
The SelectorProvider is indirectly accessible from a Selector or
AbstractSelectableChannel, e.g.:
SelectorProvider sp = RdmaSockets.openSelector().provider();
SelectorProvider sp = RdmaSockets.openSocketChannel(INET).provider();
Upon which it can have its methods invoked, e.g.
sp.openPipe();
sp.openDatagramChannel();
---
Hmm... while looking into this I see that the RdmaPollSelectorProvider
actually throws UOE for all SelectorProvider methods. It then adds two
new methods ( not in the SelectorProvider API ) for creating the
protocol specific channels. These are:
public SocketChannel openSocketChannel(ProtocolFamily family)
public ServerSocketChannel openServerSocketChannel(ProtocolFamily family)
Clearly these are not part of the SelectorProvider, so are not easily
accessible to user code.
I think this may be ok, but the API/spec should make it clear that this
is the case ( the SelectorProvider throws UOE for all methods ... ), and
that the *only* way to create RDMA channels is through the factories.
Alan,
Are there any use-cases where channel creation *MUST* proceed through
the SelectorProvider API? I wanna ensure that it is ok to effectively
not support this type of channel creation, but direct developers to the
factory methods.
-Chris.
> On 29 Jan 2019, at 00:31, Lu, Yingqi <yingqi.lu at intel.com> wrote:
>
> Good point, Brian! The sentence is not necessary anymore.
>
> Thanks,
> Lucy
> <>
> <>From: Brian Burkhalter [mailto:brian.burkhalter at oracle.com]
> Sent: Monday, January 28, 2019 1:52 PM
> To: Lu, Yingqi <yingqi.lu at intel.com>
> Cc: Chris Hegarty <chris.hegarty at oracle.com>; nio-dev at openjdk.java.net; Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Aundhe, Shirish <shirish.aundhe at intel.com>; Kaczmarek, Eric <eric.kaczmarek at intel.com>
> Subject: Re: adding rsockets support into JDK
>
> Hi Lucy,
>
> In RdmaSockets there is this verbiage in the class description:
>
> "Its selector provider does not support datagram channels and pipes. TheopenDatagramChannel <file://///Users/bpb/Work/CoreLibs/bugs/jdk/rsockets-8195160/doc/api/patch.27/java.base/java/nio/channels/spi/SelectorProvider.html#openDatagramChannel()> and openPipe <file://///Users/bpb/Work/CoreLibs/bugs/jdk/rsockets-8195160/doc/api/patch.27/java.base/java/nio/channels/spi/SelectorProvider.html#openPipe()> methods throw UnsupportedOperationException <file://///Users/bpb/Work/CoreLibs/bugs/jdk/rsockets-8195160/doc/api/patch.27/java.base/java/lang/UnsupportedOperationException.html>.”
>
> Is this even necessary given that the RDMA SelectorProvider is apparently inaccessible via the API?
>
> Thanks,
>
> Brian
>
>
> On Jan 28, 2019, at 12:54 PM, Lu, Yingqi <yingqi.lu at intel.com <mailto:yingqi.lu at intel.com>> wrote:
>
> RdmaSocketOptions and RdmaSockets are the only two places that are exposed to JDK public APIs now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190129/57796c84/attachment.html>
More information about the nio-dev
mailing list