marklee
September 22, 2017, 12:25am
1
Hi,
I new to particle photon. Using it for prototyping for students to learn.
My particle publishes data to a variable
Particle.publish (“ID”, String(ABC));
Particle.variable(“ABC”, Data);
I have a smartphone app which listens for variable ABC.
e.g. https://api.particle.io/v1/devices/xxxx/ABC?access_token=xxxx
Is there a limit on how many concurrent users (smartphone app in my case) can listen to the Variable ABC for data?
e.g. 200, 300, 1000 ?
Thank you!
Moors7
September 22, 2017, 12:35am
2
With variables, you’re not really listening, but rather pulling data out.
If you want to push the data, and have many listeners, I’d rater go for Publishes (Server Sent Events) since those were made for that.
As to the question; there shouldn’t really be a limit, though it’s good courtesy to not spam the API with requests.
marklee
September 22, 2017, 12:41am
4
Thanks … i edited my post to make it clearer … Publishes (Server Sent Events) … is that what I have done? Thank you.
Moors7
September 22, 2017, 9:28am
5
Unless you change the URL, you're still using the variables.
You don't "publish to a variable", but rather you publish data (which can be a variable) or you request data that's been assigned to a variable.
Publish = push
Variables = pull
Have a look at this tutorial: Tutorial: Getting Started with Spark.publish() - #27 by bko
2 Likes