Skip to main content

SIP RA, sending messages from SLEE event handlers, low latency and rollback

2 replies [Last post]
baranowb
Offline
Joined: 2006-01-09
Points: 0

Hi Guys.
Some time ago I had chat with Eduardo,Francesco and Louis from PTI on similar subject that this thread has.

Problem is that when we embed some stack (like sipra) we send messages/packets from SLEE event handlers. This introduces few problems that can complicate applications if they have to be fail safe on highest level ( or even not highest ) or RA/SLEE code:

* when we send reqeust we can receive response before SLEE tx that sent reqeust ends. This can cause concurrent acces to some resources, rollbacks, illegal state or race condition. For instance we send request, (stack has sent it), (stack received response), after send ra updates something/slee updates some state, but in the same time another tx does read that state - for response. Bad things can happen now.

* rollbacks of tx in wchich reqeust/packet was sent. what should happen in case then reqeust is disspatched and in next few lines of code runtimem exception is thrown and goes up to event router? Message was already sent, but state of service propably was not updated.

Idea is would be to move send invocations to after commit actions, propably along with object that should handle "send time" exceptions.
But thats a hack that possibly can double fire back into programmers face.

Any thoughts on that? Sollutions or experience?

Bartek

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardomartins
Offline
Joined: 2005-10-10
Points: 0

About moving invocations to commit time, that doesn't make sense to me, code order in the event handler is important so you either move all code or no code, and all actions curently done after the handler method is invoked are really needed. It can be improved, yes for sure, and that's the way to go I think.

Anyway, that's still a issue after last patches??? It's hard for the ra slee endpoint post an event and event router starts delivering it before the "old" tx ends, isn't it??

baranowb
Offline
Joined: 2006-01-09
Points: 0

Just disscussion. But in case triggering event and response are delivered on different activities? thats a pain.
And I heard that it still fails sometimes.