Wondering if anyone has any info on what exactly the SmartApp issues have been this week?
I have a web app that I use to manage multiple hubs from one interface using a custom web services SmartApp. Previously we were able to send out X separate post requests to X number of hubs and all SmartApps would execute separately. That’s to be expected since each hub has their own smart app and separate account.
The issue we are experiencing now is that if we send off more than one request only one SmartApp will execute correctly. All the others will stop when it’s time for the hub to send commands to the lock.
In our case, all the hubs receive their instructions and all hubs get the right JSON object. They are then instructed to set and or delete user codes from their lock. Unfortunately right now only one out of the X number of hubs we send the requests to will actually go through. The others seem to just stop in their tracks and never execute (live logs). It’s as if the server gets locked up and can’t execute more than one at a time.
If I do one manually and wait about 30 seconds for each hub the requests go through without a problem.
Any ideas on if this is related to the smart app issues currently?
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
There are some very serious performance issues right now, so I’d say this is highly likely the cause of any sudden change in behavior.
What you described seems perfectly reasonable; however, multiple SmartApps instances do share the same JVMs (to the best of my knowledge) … and for good reason … and I think there is some effort underway to make this even more prevalent in order to optimize resource utilization.
Perhaps it is having unintended side effects like the wait/blocking you notice.
The JVM link is awesome. Thanks for referencing that. Sounds a lot like what may be happening. It’s locking up. Whats crazy is it won’t even do two at a time. There has to be something wrong… I can’t imagine not being able to run two smartapps on different hubs at the same time. How do community apps function at the large scale that SmartThings is at right now?
Unless I’m misunderstanding this, how do multiple Alexa SmartApps function? I would think there’s more than a few running at any given time.
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
4
There’s probably thousands running at the same time.
Whatever you are experiencing has got to be a platform overload or a bug, unless you’ve got some really, really weird code or corruption.
@tgauchat Agreed, It has to be able to support numerous instances of a smartapp. The platform I would think wouldn’t have a problem handling a couple hundred different instances of a SmartApp running at the same time for no more than the 20 second rate limit per method of course.
Literally all I’m doing is sending a JSON string, setting lock codes with a minor time out so as not to bombard the lock and that’s all. It’s even using the provided z-wave lock device handler from SmartThings.
There has to be something not right. It would be really weird for a simple SmartApp to only be able to run once and lock up the other instances.
@slagle@jody.albritton any insight on what might be wrong? SmartApp issues, buggy code on my end, platform can’t support what I’m doing?
This is all very interesting. Is there an explanation of the ST cloud infrastructure somewhere? I assume it sits on Google or else AWS?
As to how Alexa handles things, well that all runs in Amazon Web Services, which is a remarkable infrastructure. There is even the ability for developers to write Alexa code (in Java, PHP or Python) and upload it to AWS.
The Alexa integration is a published web services Smart App…if I’m not mistaken. So technically it should function in the same manner as other community apps. Of course, given their customer base I’m sure they get some preferential treatment as they should.
Right I’m sure there’s a lot of differences but at a basic level they probably all run in a JVM…who knows for sure but it’s logical to think that their smartapps instances run similar caching and GC. Probably on their own isolated from the community…that’s just my guess though…I have no idea.