Oyatel / CometD.NET

CometD.NET is a C# client library for the Bayeux protocol
44 stars 34 forks source link

Bug in Ack Extension? #15

Open chrisAbyi opened 12 years ago

chrisAbyi commented 12 years ago

Hi, we use Oyatel cometd.net for connecting a asp.net mvc backend to a jetty cometd server. Since we need reliable package transfer, i.e. we need packages to be redelivered if the backend fails for a few secs, we added the Acknowledge Extension both on the CometD Server and to the Oyatel client.

Everything seems to work fine, i.e. AckExtension.cs, the connect messages from the server with an ack id are received and a return message is sent back immediately. Nevertheless, there's a thing I don't get: ACK is supposed to work by detecting a gap between the last id the server sent and the last id the client received and from this, re-send all messages in between. Here, nevertheless, sendMeta() is called immediately after rcvMeta() got the message with the current ack id from the cometd server; and stored exactly this id in _ackId. In sendMeta, a message with _ackId is sent back. Hence my question: how should a gap ever emerge when sendMeta() always just replied the ack id it just received? Isn't it necessary to retrieve the id from a cache?

Is this extension also supposed to work when the whole ASP.NET MVC backend fails and not only the cometd connection?

Thanks very much! We really appreciate your work on CometD.NET.

Best, Christian

grEvenX commented 12 years ago

Hi Christian.

We haven't used or tested the AckExtension ourselves and it was just ported from the CometD Java project. So it's a bit though for me to comment on it at all, but you can read a pretty detailed outline on how it should work here:

http://docs.cometd.org/reference/#extensions_acknowledge