incubator-etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Grandy <Holger.Gra...@bmw-carit.de>
Subject RE: [jira] [Created] (ETCH-157) UDP implementation for Java, C# and C binding
Date Thu, 28 Apr 2011 08:43:31 GMT
Hi Armin, 

thanks for the patches. I suggest we discuss them in multiple 
steps, just as you packaged the patch files. 

0001: is already committed, this was just a minor change. 
0002: same, already committed.

0005: 
provides UDPConnection for Java. We have seen that you skipped the Packetizer for this.
This is certainly reasonable for UDP, since you don't have multiple Packets for
one message. On the other hand this also means you change the wire format (the
packetizer also adds the signature and the package length at the beginning). I 
would suggest to keep the Packetizer in the chain even for UDP, still adding
signature and length fields. I would furthermore suggest to use the Packetizer 
to check, whether the length of the serialized message fits into one UDP datagram 
packet. The Message should be discarded with an error, if this is not the case.

Could you provide an update with the Packetizer and length checks enabled?

This is how far we got with looking into the patches in detail until now. 

But I have already applied the other patches for Java (Signals, singlesession) 
just for testing, too. I would like to start a discussion regarding 
singlesession in that context. You added this due to the fact that you don't 
want to build up the entire etch stack for every udp peer. This is (in my 
opinion) mainly due to resource usage reasons (no multi threading). The same 
could be achieved in an implementation similar to Non-Blocking IO (implemented for 
TCP/Java in util...nio, TCP2Connection). Did you have a look at this? The problem 
is that UDPConnection also extends Connection, which is a Runner, which is basically a Thread

(for every Connection).  Wouldn't it be nicer to have a single thread which handles all 
the UDP peers, but still having multiple Etch Stacks (stubs+remotes) 
for every peer? That would enable Callbacks as far as I can see until now.
Wouldn't this be a nicer way of doing the same thing for UDP? Could you explain 
your rationale on implementing singlesession a little bit more?

Furthermore we tried Signals for Java. They establish a kind of an implicit connection on

top of UDP (subscribe, unsubscribe). Of course you don't recognize if your peer looses connection
(cable disconnect...). To fix this we adopted the KeepAlive Filter which is already implemented
for
Etch to use the Who-Object as the receiver of the KeepAlive answers (just as you did for regular
calls). 
This makes it possible to observe the "connection state" on UDP and close the socket in case
of peer 
"disconnect". Usage of KeepAlive is optional (enabled by URL Parameters).
http://incubator.apache.org/etch/howto-keepalive-filter.html

Could you provide a little more detail on single session? I have a good feeling regarding
UDPConnection 
in general, so I would suppose to integrate this into trunk (when the Packetizer is added),
but I would 
like to discuss the single session mechanism a bit more.

Cheers, 
Holger & Michael

> -----Original Message-----
> From: Armin Müller (JIRA) [mailto:jira@apache.org]
> Sent: Mittwoch, 20. April 2011 10:48
> To: etch-dev@incubator.apache.org
> Subject: [jira] [Created] (ETCH-157) UDP implementation for Java, C#
> and C binding
> 
> UDP implementation for Java, C# and C binding
> ---------------------------------------------
> 
>                  Key: ETCH-157
>                  URL: https://issues.apache.org/jira/browse/ETCH-157
>              Project: Etch
>           Issue Type: New Feature
>           Components: build, c-binding, compiler, csharp-binding,
> examples, java-binding, webpage
>     Affects Versions: 1.2
>             Reporter: Armin Müller
> 
> 
> Hi,
> 
> attached are a series of patches, which add UDP support to Etch for the
> Java, C# and C bindings. It can be used in place of TCP by replacing
> the url scheme with UDP. The UDP transport support has been extended
> with a configurable single session mode, which can be used to run
> leightweight servers. Please see the attached file
> "Leightweight_Etch_Server.txt" for a more detailed description of this
> mode. It has been written in the confluence wiki style syntax and
> together with the attached images it's suitable for creating a new etch
> documentation page. The single session mode has been extended further
> with a support for one-way method calls from the server to multiple
> clients. For more information, please look at the "Signals" section and
> the attached patch files.
> 
> The UDP implementation for the C binding is limited to single session
> mode. It limits the ability of etch servers to call methods of more
> than one remote client. The signal extension can be used to avoid this
> limitation.
> 
> Below a short description of the attached patches is listed. They can
> be applied using the following GIT command: "git am -k --keep-cr --
> whitespace=nowarn <path>/*.patch" or can be applied to a clean SVN
> checkout:  "patch -p1 -i <path>/*.patch".
> 
> * Add property to skip building of the examples:
> 0001-build-add-skip.examples-property.patch
> 
> * Bump dependency to .NET 4.0 and NUnit 2.5.9. The C# UDP
> implementation is based on features available in .NET 4.0.
> 0002-binding-csharp-bump-dependencies-to-.NET-4.0-and-NUn.patch
> 
> * Add runtime and build support for the Mono framework (Mono >= 2.10.1,
> C#).
> 0003-binding-csharp-add-mono-support.patch
> 
> * Make UDP and TCP protocols seamlessly interchangable in Etch (UDP
> support for C# and Java).
> 0004-binding-csharp-add-udp-transport-support.patch
> 0005-binding-java-add-udp-transport-support.patch
> 
> * Add configurable server single session mode. URL parameter:
> UdpConnection.singleSession=true
> 0006-binding-csharp-add-udp-single-session-support.patch
> 0007-binding-java-add-udp-single-session-support.patch
> 
> * Add inet_who object to track remote etch clients. Required by the C
> UDP implementation.
> 0008-binding-c-add-inet_who-object.patch
> 
> * Add UDP transport support to the C binding (single session only). The
> "UdpConnection.singleSession" url parameter is not supported and
> ignored. A patched version of APR (test with version 1.4.2) is required
> to send broadcast messages under Linux. The patch has been submitted,
> but is currently not integrated (see
> https://issues.apache.org/bugzilla/show_bug.cgi?id=46389).
> 0009-binding-c-add-UDP-single-session-transport.patch
> 
> * Add signal support for single session mode. See the attached
> "Leightweight_Etch_Server.txt" document.
> 0010-compiler-add-Signal-annotation-support.patch
> 0011-binding-csharp-add-Signal-support.patch
> 0012-binding-java-add-Signal-support.patch
> 0013-binding-c-extend-send-sendex-for-etch_who.patch
> 0014-binding-c-add-Signal-support.patch
> 
> * Add signal examples for the C#, Java and C binding.
> 0015-examples-add-signals-example-for-csharp-java-and-c.patch
> 
> Authors:
> Armin Müller <mueller@itestra.com> (itestra GmbH by order of BMW Group
> Research and Technology)
> Aleksandar Kanchev <kanchev@itestra.com> (itestra GmbH by order of BMW
> Group Research and Technology)
> 
> 
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
Mime
View raw message