From david.lloyd at redhat.com Mon Nov 24 10:32:26 2008 From: david.lloyd at redhat.com (David M. Lloyd) Date: Mon, 24 Nov 2008 12:32:26 -0600 Subject: [sctp-dev] Java API for SCTP In-Reply-To: <492AEF7D.6070802@sun.com> References: <492AEF7D.6070802@sun.com> Message-ID: <492AF33A.9020600@redhat.com> On 11/24/2008 12:16 PM, Christopher Hegarty - Sun Microsystems Ireland wrote: > Hi All, > > I know that there have been a few mails on this alias relating to SCTP > support in Java. An OpenJDK project has been sponsored and setup to > develop an API for SCTP [1] and a corresponding OpenJDK prototype. I > would encourage anyone interested to take a look and help with the API > design and implementation. OK, here's a couple first-glance comments... 1. The *Channel classes are missing scatter/gather support. This is important in scenarios where (for example) a message must be composed, but the complete message size is unknown until it has been fully assembled. One allocates additional buffers as needed, rather than allocating a larger buffer and copying data from the smaller buffer to the larger buffer each time space is exhausted. Admittedly not quite as important is scatter support, but maybe still useful in a similar scenario - allocate 10 buffers, read() only fills 4, so you pass the next 6 on to the next read() operation. 2. The notion of the Notification/NotificationHandler system being specific to SCTP seems a little weird. Are these notifications synchronous or asynchronous? - DML From Christopher.Hegarty at Sun.COM Mon Nov 24 14:13:50 2008 From: Christopher.Hegarty at Sun.COM (Christopher Hegarty - Sun Microsystems) Date: Mon, 24 Nov 2008 22:13:50 +0000 Subject: [sctp-dev] Java API for SCTP In-Reply-To: <492AF33A.9020600@redhat.com> References: <492AEF7D.6070802@sun.com> <492AF33A.9020600@redhat.com> Message-ID: <492B271E.3070706@sun.com> Hi David, Thanks for the comments, this is a great start. Comments inline. -Chris. David M. Lloyd wrote: > [snip] > > OK, here's a couple first-glance comments... > > 1. The *Channel classes are missing scatter/gather support. This is > important in scenarios where (for example) a message must be composed, > but the complete message size is unknown until it has been fully > assembled. One allocates additional buffers as needed, rather than > allocating a larger buffer and copying data from the smaller buffer to > the larger buffer each time space is exhausted. Admittedly not quite as > important is scatter support, but maybe still useful in a similar > scenario - allocate 10 buffers, read() only fills 4, so you pass the > next 6 on to the next read() operation. Yes, I agree. scattering/gathering support would be useful. Actually, at one point I did have scattering/gathering support but removed it for simplicity. If there is a genuine case for it, which you have outlined, then I can certainly re-introduce it. Of course, SCTPChannel and SCTPMultiChannel will not be able to implement java.nio.channels.ScatteringByteChannel or java.nio.channels.GatheringByteChannel. The scattering/gathering send/receive methods will need additional paramaters as with the current send/receive methods. > 2. The notion of the Notification/NotificationHandler system being > specific to SCTP seems a little weird. Are these notifications > synchronous or asynchronous? Notifications from the SCTP stack are synchronous, that is, an AssocChangeEvent.COMM_UP must be received before any other data can be received on a particular association. Similarly, no more data will be received from an association after a ShutdownNotification has been received. In case of SCTPChannel these notifications are useful, but not critical since this channel controls just a single association. For SctpMultiChannel these can be critical if the application needs to keep track of all its associations. -Chris. > > - DML From dennis.hjort at ericsson.com Fri Nov 28 01:53:11 2008 From: dennis.hjort at ericsson.com (Dennis Hjort) Date: Fri, 28 Nov 2008 10:53:11 +0100 Subject: [sctp-dev] Platform support for SCTP ? Message-ID: Hi, I've been following this list and have a question regarding platform support. Currently, SCTP is supported in libraries on linux and solaris, but what I know it has not yet support on windows. How does this impact the java SCTP package ? Our application is currently running on Linux, but it would be wonderful to be able to run basictests and such on our development plattform also, which is Windows Vista. With kind regards // Dennis > **************************************************** > This communication is confidential and intended solely for the > addressee(s). Any unauthorized review, use, disclosure or distribution > is prohibited. If you believe this message has been sent to you in > error, please notify the sender by replying to this transmission and > delete the message without disclosing it. Thank you. > > E-mail including attachments is susceptible to data corruption, > interception, unauthorized amendment, tampering and viruses, and we > only send and receive e-mails on the basis that we are not liable for > any such corruption, interception, amendment, tampering or viruses or > any consequences thereof. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20081128/f91faf25/attachment.html From Christopher.Hegarty at Sun.COM Fri Nov 28 02:32:03 2008 From: Christopher.Hegarty at Sun.COM (Christopher Hegarty - Sun Microsystems Ireland) Date: Fri, 28 Nov 2008 10:32:03 +0000 Subject: [sctp-dev] Platform support for SCTP ? In-Reply-To: References: Message-ID: <492FC8A3.5000303@sun.com> Hi Dennis, Solaris has included support for SCTP since Solaris 10. The Linux 2.6 kernel has SCTP support built in, but to you need an extra library to access user level SCTP socket extension functions. I have seen reference to a third party windows SCTP implementation, but have no experience with it and its name eludes me now. Within the scope of this SCTP OpenJDK project I plan to develop a prototype implementation for Solaris and Linux (using the lksctp implementation). Of course, if someone wants to contribute a Windows implementation then I am certainly not opposed to that. The proposed draft API defines three new channel types, SctpChannel, SctpServerChannel and SctpMutliChannel, all of which have static factory open methods. These methods are specified to throw UnsupportedOperationException if the SCTP protocol is not supported. I have a prototype implementation for both Solaris and Linux that I hope to be able to push the source soon. Would be be interested in using this? What SCTP implementation are you currently using? -Chris. Dennis Hjort wrote: > Hi, > > I've been following this list and have a question regarding platform > support. > > Currently, SCTP is supported in libraries on linux and solaris, but what > I know it has not yet support on windows. How does this impact the java > SCTP package ? Our application is currently running on Linux, but it > would be wonderful to be able to run basictests and such on our > development plattform also, which is Windows Vista. > > With kind regards > > // Dennis > > ****************************************************** > This communication is confidential and intended solely for the > addressee(s). Any unauthorized review, use, disclosure or > distribution is prohibited. If you believe this message has been > sent to you in error, please notify the sender by replying to this > transmission and delete the message without disclosing it. Thank you. > > E-mail including attachments is susceptible to data corruption, > interception, unauthorized amendment, tampering and viruses, and > we only send and receive e-mails on the basis that we are not > liable for any such corruption, interception, amendment, tampering > or viruses or any consequences thereof. > From dennis.hjort at ericsson.com Fri Nov 28 12:01:57 2008 From: dennis.hjort at ericsson.com (Dennis Hjort) Date: Fri, 28 Nov 2008 21:01:57 +0100 Subject: [sctp-dev] FW: Platform support for SCTP ? Message-ID: Hi Christopher, So my guess was correct, and I have followed the development on different platforms as well. The SCTP implementation we currently use is the JNI java implementation, using lksctp, available at [1], on linux. This implementations is not fully implemented, but so far we have, with help of the developer maintaining the site, been able to get SCTP working for our needs. The implementation only supports blocking channels, so we have had to make several modifications to be able to handle this as we'd rather prefer non-blocking implementation. The third party SCTP implementation you refer to might perhaps be [2] ? I haven't had time testing it yet, but will do some testing in near future just to see how robust it is at the current date. It has a repository location at [3], and it seems as they keep working on it, as the latest entry in the repository was 11/21/08 ! :-) The prototype you mention is of great interest to us, and it would be great to begin using it. I have taken on me to be in charge of replace the current implementation with the "native" java one when available, and if that helps you it's just great. As I mentioned in my previous mail, we do use Linux primarly, but if I get the windows implementation of SCTP working, perhaps I also could help with contributing with windows support also. // Dennis [1] http://i1.dk/JavaSCTP/ [2] http://www.co-conv.jp/en/product/sctpDrv/20080313/ [3] http://trac.sctp.jp/sctpDrv/trac.cgi/log/ -----Original Message----- From: Christopher.Hegarty at Sun.COM [mailto:Christopher.Hegarty at Sun.COM] Sent: den 28 november 2008 11:32 To: Dennis Hjort Cc: sctp-dev at openjdk.java.net Subject: Re: [sctp-dev] Platform support for SCTP ? Hi Dennis, Solaris has included support for SCTP since Solaris 10. The Linux 2.6 kernel has SCTP support built in, but to you need an extra library to access user level SCTP socket extension functions. I have seen reference to a third party windows SCTP implementation, but have no experience with it and its name eludes me now. Within the scope of this SCTP OpenJDK project I plan to develop a prototype implementation for Solaris and Linux (using the lksctp implementation). Of course, if someone wants to contribute a Windows implementation then I am certainly not opposed to that. The proposed draft API defines three new channel types, SctpChannel, SctpServerChannel and SctpMutliChannel, all of which have static factory open methods. These methods are specified to throw UnsupportedOperationException if the SCTP protocol is not supported. I have a prototype implementation for both Solaris and Linux that I hope to be able to push the source soon. Would be be interested in using this? What SCTP implementation are you currently using? -Chris. Dennis Hjort wrote: > Hi, > > I've been following this list and have a question regarding platform > support. > > Currently, SCTP is supported in libraries on linux and solaris, but > what I know it has not yet support on windows. How does this impact > the java SCTP package ? Our application is currently running on Linux, > but it would be wonderful to be able to run basictests and such on our > development plattform also, which is Windows Vista. > > With kind regards > > // Dennis > > ****************************************************** > This communication is confidential and intended solely for the > addressee(s). Any unauthorized review, use, disclosure or > distribution is prohibited. If you believe this message has been > sent to you in error, please notify the sender by replying to this > transmission and delete the message without disclosing it. Thank you. > > E-mail including attachments is susceptible to data corruption, > interception, unauthorized amendment, tampering and viruses, and > we only send and receive e-mails on the basis that we are not > liable for any such corruption, interception, amendment, tampering > or viruses or any consequences thereof. >