Open mmehr2 opened 6 years ago
The hugely expanded message usage on Friday does not seem to have recurred. I'm left wondering what was going on, either with my code or theirs (no TLS yet, people!). More to learn here, I presume. No replies from Pubnub, since Vladamir doesn't wish to comment on billing issues. I'll try to get through tho. It would be good to know the library's behavior this way.
Actual messages used however through this test phase:
3/15(F) - 35,773 total, of which 15,368 were pubs, 20,408 subs [Test day, 2 IPs] 3/16(Sa) - 3943 total, of which 1284 were pubs, 2659 subs [Dev day, 1 IP] 3/19(M) - 5530 total, of which 1978 were pubs, 3352 subs [Test day, 2 IPs]
This is still quite a bit more than I thought. I have added callback counters to PubnubCallback.cpp to keep our own track, per machine. This should eventually be logged (perhaps to the Profile? Win Event Log? Another file?).
I believe this shows up the difference between Pubnub Messages and Transactions. I'm counting the latter, and PN is counting the former until you are billed on the Enterprise Model. There must be some variable amount of messages between MSW and the cloud to implement each Transaction call (pub or sub). But it all gets factored into one await call equivalent (callback in our usage). I'm not sure why they don't respond when I ask them to try and pin this down to a number.
I believe the Friday/Saturday usage split was due to the accounting periods lasting to/from midnight UTC. This occurs at 5pm PDT, which was in the middle of our testing session Friday, I think. So any residual use that day would have shown up as Saturday usage. And typically, our tests (Eric and me) usually happen about that time of day. On Monday 3/19 however, we tried earlier around 1pm PDT and avoided this effect. Usage stats confirm this.
I looked at usage statistics for our short test Friday 3/16/2018. Not too much scrolling was done (and I believe he turned his app off afterwards), but still 35k messages were sent, about 40% publishes. And there were 7.3k TLS messages sent, a feature I have not yet implemented (using which certs, etc?).
So either the code does a lot of this under the hood, begging the question of how to control it, or my code is doing a lot more than I think it is. At least I've got TRACEs on everything I am calling, I believe, and I don't see anywhere near that amount.
Subscribe loop DOES keep messages going, as it returns on the average every 200 seconds or so (during my overnight study Sat night 3/17-18). This is neither the default SUBSCRIBE_TRANSACTION_TIMEOUT value (supposedly 310 sec), nor the value I am setting (INT_MAX, which should be about 22 days).
I will attempt to get an answer or two out of Pubnub support after the weekend is over. We'll see what they say.