Particle photon accessing ONE variable - is there a limit to number of users listening?

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!

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.

Thanks … i edited my post to make it clearer … Publishes (Server Sent Events) … is that what I have done? Thank you.

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()

2 Likes