You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ssozonoff <se...@sozonoff.com> on 2006/04/19 15:05:51 UTC

Long lasting transactions

Hi All,

We need to send Messages to HTTP based clients. We also need to know if the
HTTP client has dealt with the message or not.

One idea would be to expose transaction commit and rollback over REST and
the HTTP client would call commit once he had dealt with the message. In
essence we are building some sort of an HTTP gateway.

Due to the stateless nature of HTTP we also need to have a transaction
timeout so that if the HTTP client shuts down, after the timeout periond the
messages will be rolled back and placed in the queue again for redelivery.

My question is what impact does potentialy long lasting transactions have on
system resources. I guess this at least make pooling a little less
effective?

I have spent a little time looking at the large amount of different options
that ActiveMQ offers. Axis, REST, Stomp etc... but somehow non of them seem
to fit the build. For example we need to use selectors, one per HTTP client
etc ...

Thanks for any thoughts,
Serge

--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3987062
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by ssozonoff <se...@sozonoff.com>.

James.Strachan wrote:
> 
> Incidentally its worth remembering that the C# client is a set of
> interfaces that can be implemented however you like - so its not like
> you're tying your code to something ActiveMQ specific etc...
> 

Yes, I realise this. I have been playing with the c# client most of the
afternoon and do have it working with the tcp:// transport. I am now looking
at the transport section to figure out what all is going on.


--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3993022
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by James Strachan <ja...@gmail.com>.
On 4/19/06, ssozonoff <se...@sozonoff.com> wrote:
>
> Well,
>
> As you might have noticed by now, I am sort of running blind in all
> directions at the moment. I call this brainstorming ;-) ... or maybe
> learning the ropes

:)


> Hrrmm. With regards to the shortest distance between two points. You are
> probably right and I should be looking at the C# client a little closer.

Incidentally its worth remembering that the C# client is a set of
interfaces that can be implemented however you like - so its not like
you're tying your code to something ActiveMQ specific etc...

Unfortunately we've not got the .Net version of javadoc working
automatically yet, but take a little surf of the .Net code...

https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/NMS/

The 'NMS' defines the .Net Messaging System API - a .Net version of
JMS in pure interfaces.

You could then implement NMS via Stomp or via a HTTP transport etc.
It'd be cool to be able to switch at runtime between Stomp,
OpenWire-over-HTTP or OpenWire etc.



> When you mention the "existing HTTP server
> side transport" you are reffering to:
>
> HTTP    http://host:port        Client connects to the broker using HTTP tunnelling,
> with XML payloads suitable for going through firewalls

Yes

> Where can I find the serveside implementation of this?

Its in the activemq-web module. There's a bunch of test cases in the
WAR you could tinker with to see how HTTP is used; in essence we just
turn all the ActiveMQ command POJOs (in the activemq.command package)
into XML using XStream and send them over HTTP.

--

James
-------
http://radio.weblogs.com/0112098/

Re: Long lasting transactions

Posted by ssozonoff <se...@sozonoff.com>.
Well,

As you might have noticed by now, I am sort of running blind in all
directions at the moment. I call this brainstorming ;-) ... or maybe
learning the ropes

Hrrmm. With regards to the shortest distance between two points. You are
probably right and I should be looking at the C# client a little closer.
When you mention the "existing HTTP server
side transport" you are reffering to:

HTTP 	http://host:port 	Client connects to the broker using HTTP tunnelling,
with XML payloads suitable for going through firewalls

Where can I find the serveside implementation of this?

Thanks,
Serge

--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3987777
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by ssozonoff <se...@sozonoff.com>.
Not sure where this project is going..

http://hjb.tigris.org/

But I will make a note of it.
--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3994717
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by ssozonoff <se...@sozonoff.com>.
And, at this point I am probably way in over my head...

But I will keep digging around.

Serge
--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3994365
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by James Strachan <ja...@gmail.com>.
On 4/19/06, ssozonoff <se...@sozonoff.com> wrote:
>
> James,
>
> Are you guys using XStream on the server side for Serialization?

Yes

> I think
> there is a .NET implementation of XStream which could be used Client side as
> part of adding an HTTP transport to the AMQ C# client...
>
> http://www.jroller.com/page/CoBraLorD/20050427

Ah cool! Since we code generate the POJOs that are used with XStream,
there's a reasonable chance it should work without too much effort.

--

James
-------
http://radio.weblogs.com/0112098/

Re: Long lasting transactions

Posted by ssozonoff <se...@sozonoff.com>.
James,

Are you guys using XStream on the server side for Serialization? I think
there is a .NET implementation of XStream which could be used Client side as
part of adding an HTTP transport to the AMQ C# client...

http://www.jroller.com/page/CoBraLorD/20050427

I don't know how complete it is though.

Serge
--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3988555
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by James Strachan <ja...@gmail.com>.
On 4/19/06, ssozonoff <se...@sozonoff.com> wrote:
> Hi James,
>
> At the moment we are using a C# .net client for integration reasons into
> other 3rd party API's, but we would like to stay somewhat flexible here.

So let me get this right; you are gonna build a C# client to ActiveMQ
using HTTP as a transport (assuming we can extend the REST support to
do all the things you need like lockiing/timeouts, transactions and so
forth) - yet you don't want to use the C# client that already does
everything you need :)

In terms of shortest distance between two points, its probably gonna
be easier to write a HTTP transport for the existing C# client (which
already has pluggable transports) to talk to the existing HTTP server
side transport than it is to come up with a brand new REST API which
does everything that a real JMS client can do; though if you're
prepared to do most of the work and testing, the latter is fine with
me too :)


> BTW are you based in Europe or the US?

Mostly Europe (London) but tend to make frequent trips to the US

--

James
-------
http://radio.weblogs.com/0112098/

Re: Long lasting transactions

Posted by ssozonoff <se...@sozonoff.com>.
Hi James,

At the moment we are using a C# .net client for integration reasons into
other 3rd party API's, but we would like to stay somewhat flexible here.

BTW are you based in Europe or the US?

Thanks,
Serge
--
View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3987325
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Long lasting transactions

Posted by James Strachan <ja...@gmail.com>.
What are the clients BTW - since the HTTP transport for the JMS client
has full capability for JMS (transactions, acknowledgements and so
forth) yet is using HTTP for the transport.

On 4/19/06, ssozonoff <se...@sozonoff.com> wrote:
>
> Hi All,
>
> We need to send Messages to HTTP based clients. We also need to know if the
> HTTP client has dealt with the message or not.
>
> One idea would be to expose transaction commit and rollback over REST and
> the HTTP client would call commit once he had dealt with the message. In
> essence we are building some sort of an HTTP gateway.
>
> Due to the stateless nature of HTTP we also need to have a transaction
> timeout so that if the HTTP client shuts down, after the timeout periond the
> messages will be rolled back and placed in the queue again for redelivery.
>
> My question is what impact does potentialy long lasting transactions have on
> system resources. I guess this at least make pooling a little less
> effective?
>
> I have spent a little time looking at the large amount of different options
> that ActiveMQ offers. Axis, REST, Stomp etc... but somehow non of them seem
> to fit the build. For example we need to use selectors, one per HTTP client
> etc ...
>
> Thanks for any thoughts,
> Serge
>
> --
> View this message in context: http://www.nabble.com/Long-lasting-transactions-t1474194.html#a3987062
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/