You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Peter Hall <pe...@algomi.com> on 2016/02/25 17:00:17 UTC
Blaze DS issue
Hi,
We have found a performance issue which we tracked down to what we think is
a bug in Blaze DS. I have made a PR for a possible fix here:
https://github.com/apache/flex-blazeds/pull/2, however we are not very
familiar with the codebase and we'd appreciate some feedback on if we have
the right approach.
The issue we found occurred when a single client has multiple subscriptions
(multiple *mx.messaging.Consumer*s on the Flex side), using the same
polling channel, which is configured like this:
<channel id="my-secure-polling-amf"
type="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://foo.bar:443/appName/messagebroker/amfpollingSecure"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>1</polling-interval-seconds>
</properties>
</channel>
When a poll hits the server, it ends up calling
FlexClientOutboundQueueProcessor.flush() on the server. It doesn't pass a
MessageClient as an argument, which (according to the javadoc on that file)
should mean that it will flush messages for all clients. But instead it
finds the first message in the queue and flushes all messages that have the
same MessageClient as that one. If a user has 10 consumers with queued
messages, it will have to poll once per consumer, which means 10 polls and
10 seconds to clear the queue. The change in my PR will cause it to flush
the entire queue each time, so you will get all your data in a single poll.
--
Peter Hall
Platform Architect
[image: logo] <http://www.algomi.com/>
ALGOMI LIMITED
One America Square
17 Crosswall
London EC3N 2LB
Tel: +44 207 954 4543
Mob: +44 779 109 6899
www.algomi.com
This email and its contents, including all accompanying communications and
attachments, is strictly confidential and only for the intended
recipient(s). If you have received this email by mistake, please notify the
sender immediately and do not disclose its contents. Any retention, use or
disclosure not expressly authorised by Algomi Limited is prohibited.
Algomi Limited is registered in England and Wales under Company No.
08111389 with its registered office at One America Square, 17 Crosswall,
London EC3N 2LB, United Kingdom. Algomi Limited is not regulated, nor is
it registered as a broker-dealer or investment advisor in any jurisdiction.
Please visit http://www.algomi.com/#contacts for the contact information of
our offices worldwide.
Re: Blaze DS issue
Posted by "Schwarz, Robert" <Ro...@westernasset.com>.
There's a property called Piggyback mode. I don't know if that is applicable to your case, but it has to do with grouping of messages. Worth a look. It wasn't working properly for me.
Sent from my iPhone
On Feb 25, 2016, at 8:00 AM, Peter Hall <pe...@algomi.com>> wrote:
Hi,
We have found a performance issue which we tracked down to what we think is a bug in Blaze DS. I have made a PR for a possible fix here: https://github.com/apache/flex-blazeds/pull/2, however we are not very familiar with the codebase and we'd appreciate some feedback on if we have the right approach.
The issue we found occurred when a single client has multiple subscriptions (multiple mx.messaging.Consumers on the Flex side), using the same polling channel, which is configured like this:
<channel id="my-secure-polling-amf"
type="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://foo.bar:443/appName/messagebroker/amfpollingSecure"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>1</polling-interval-seconds>
</properties>
</channel>
When a poll hits the server, it ends up calling FlexClientOutboundQueueProcessor.flush() on the server. It doesn't pass a MessageClient as an argument, which (according to the javadoc on that file) should mean that it will flush messages for all clients. But instead it finds the first message in the queue and flushes all messages that have the same MessageClient as that one. If a user has 10 consumers with queued messages, it will have to poll once per consumer, which means 10 polls and 10 seconds to clear the queue. The change in my PR will cause it to flush the entire queue each time, so you will get all your data in a single poll.
--
Peter Hall
Platform Architect
[logo]<http://www.algomi.com/>
ALGOMI LIMITED
One America Square
17 Crosswall
London EC3N 2LB
Tel: +44 207 954 4543
Mob: +44 779 109 6899
www.algomi.com<http://www.algomi.com/>
[http://www.algomi.com/img/apps/fintech2015.png]
This email and its contents, including all accompanying communications and attachments, is strictly confidential and only for the intended recipient(s). If you have received this email by mistake, please notify the sender immediately and do not disclose its contents. Any retention, use or disclosure not expressly authorised by Algomi Limited is prohibited.
Algomi Limited is registered in England and Wales under Company No. 08111389 with its registered office at One America Square, 17 Crosswall, London EC3N 2LB, United Kingdom. Algomi Limited is not regulated, nor is it registered as a broker-dealer or investment advisor in any jurisdiction.
Please visit http://www.algomi.com/#contacts for the contact information of our offices worldwide.
**********************************************************************
E-mail sent through the Internet is not secure. Western Asset therefore recommends that you do not send any confidential or sensitive information to us via electronic mail, including social security numbers, account numbers, or personal identification numbers. Delivery, and or timely delivery of Internet mail is not guaranteed. Western Asset therefore recommends that you do not send time sensitive or action-oriented messages to us via electronic mail. **********************************************************************
AW: Blaze DS issue
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Peter,
But thank you for your contribution. I'll look into this ... hopefully I'll find some time to do that tomorrow.
But as someone who knows the codebase, that there are probably several issues in the handling and cleanup of queues. Hopefully you found and fixed one of them.
Chris
________________________________
Von: Peter Hall <pe...@algomi.com>
Gesendet: Donnerstag, 25. Februar 2016 17:00
An: users@flex.apache.org
Betreff: Blaze DS issue
Hi,
We have found a performance issue which we tracked down to what we think is a bug in Blaze DS. I have made a PR for a possible fix here: https://github.com/apache/flex-blazeds/pull/2, however we are not very familiar with the codebase and we'd appreciate some feedback on if we have the right approach.
[https://avatars0.githubusercontent.com/u/150875?v=3&s=400]<https://github.com/apache/flex-blazeds/pull/2>
Fixed bug with flushing messages to polling client. by peterjoel · Pull Request #2 · apache/flex-blazeds<https://github.com/apache/flex-blazeds/pull/2>
github.com
When flushing the message queue on a poll, messageClient is null. (See JavaDoc). This should mean that all messages for the flexClient are flushed. Instead, only the messages that have the same mes...
The issue we found occurred when a single client has multiple subscriptions (multiple mx.messaging.Consumers on the Flex side), using the same polling channel, which is configured like this:
<channel id="my-secure-polling-amf"
type="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://foo.bar:443/appName/messagebroker/amfpollingSecure"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>1</polling-interval-seconds>
</properties>
</channel>
When a poll hits the server, it ends up calling FlexClientOutboundQueueProcessor.flush() on the server. It doesn't pass a MessageClient as an argument, which (according to the javadoc on that file) should mean that it will flush messages for all clients. But instead it finds the first message in the queue and flushes all messages that have the same MessageClient as that one. If a user has 10 consumers with queued messages, it will have to poll once per consumer, which means 10 polls and 10 seconds to clear the queue. The change in my PR will cause it to flush the entire queue each time, so you will get all your data in a single poll.
--
Peter Hall
Platform Architect
[logo]<http://www.algomi.com/>
ALGOMI LIMITED
One America Square
17 Crosswall
London EC3N 2LB
Tel: +44 207 954 4543
Mob: +44 779 109 6899
www.algomi.com<http://www.algomi.com/>
[http://www.algomi.com/img/apps/fintech2015.png]
This email and its contents, including all accompanying communications and attachments, is strictly confidential and only for the intended recipient(s). If you have received this email by mistake, please notify the sender immediately and do not disclose its contents. Any retention, use or disclosure not expressly authorised by Algomi Limited is prohibited.
Algomi Limited is registered in England and Wales under Company No. 08111389 with its registered office at One America Square, 17 Crosswall, London EC3N 2LB, United Kingdom. Algomi Limited is not regulated, nor is it registered as a broker-dealer or investment advisor in any jurisdiction.
Please visit http://www.algomi.com/#contacts for the contact information of our offices worldwide.