# Does Processing have something equivalent to a "cloud variable"?

**URL:** <https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385>\
**Category:** Processing\
**Created:** [November 10, 2019, 9:28pm UTC](https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385 "2019-11-10T21:28:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Devon123](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@Devon123](https://discourse.processing.org/u/Devon123)\
**Post date:** [November 10, 2019, 9:28pm UTC](https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385/1 "2019-11-10T21:28:29Z")

</div>

In Scratch, a cloud variable is a variable that is stored in the cloud. So if someone on one computer changes it, anyone using that scetch on a different computer will see the variable change. Is there a way to do this in Processing?

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [November 11, 2019, 1:08am UTC](https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385/2 "2019-11-11T01:08:13Z")

</div>

Hi.  
You can upload and get strings.  
See [this](https://discourse.processing.org/t/can-i-upload-an-image-to-the-web/15222/9) topic.

[https://processing.org/reference/loadStrings\_.html](https://processing.org/reference/loadStrings_.html)

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 11, 2019, 1:37am UTC](https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385/3 "2019-11-11T01:37:31Z")

</div>

add some LOCAL server and networking options for processing  
i summarized [here](http://kll.engineering-news.org/kllfusion01/articles.php?article_id=154#here12)

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [November 11, 2019, 2:07am UTC](https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385/4 "2019-11-11T02:07:35Z")

</div>

kll ‘s upload code is a good real solution. I didn’ even know that this is possible with Processing. But if you haven’t an own domain you could maybe use the google’s bucket lib.

> **[Cloud Storage Client Libraries  |  Cloud Storage
     ...](https://cloud.google.com/storage/docs/reference/libraries#client-libraries-usage-java)**
>
> Client Libraries allowing you to get started programmatically with Cloud Storage in cpp,csharp,go,java,nodejs,python,php,ruby.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [November 12, 2019, 6:13pm UTC](https://discourse.processing.org/t/does-processing-have-something-equivalent-to-a-cloud-variable/15385/5 "2019-11-12T18:13:36Z")

</div>

Interesting! I wasn’t familiar with the Scratch “Cloud Data” system.

- [https://en.scratch-wiki.info/wiki/Cloud\_Data](https://en.scratch-wiki.info/wiki/Cloud_Data)
- [https://sites.google.com/site/scratchadventures/lessons/cloud-variables-lesson](https://sites.google.com/site/scratchadventures/lessons/cloud-variables-lesson)

> **Cloud data** is a feature that allows users to store variables “in the cloud,” or on the server.

So, this works because the Scratch community has a central hosting architecture, and a single server infrastructure backing it through a single website.

You could imagine a feature like being added to, for example, the p5.js web editor at [editor.p5js.org](http://editor.p5js.org), or as an extension to OpenProcessing services at [openprocessing.org](http://openprocessing.org) – a hosting service with a single server.

Absent that, the question is how to roll your own. Then there are dozens of options for putting / editing information somewhere on the internet and retrieving it:

1. use a web-hosted database and update values in the database
2. run a server sketch at a stable IP address, and have it send and receive network messages to update central variables in memory
3. work with a library that accesses a third-party hosted database, such as Firebase
4. work with a library that accesses a hosted key-value store (self-hosted or not), such as [Redis-processing](https://forum.processing.org/two/discussion/18323/anyone-using-redis-pubsub-in-processing-need-help-with-syntax) + openredis

Still, it having all that invisibly managed as a free web-hosted service would be a great feature – but by default, Processing is decentralized and PC oriented. Somebody would need to set up e.g. a redis server and create a library for people to add that easily interfaced with it, plus put some account / API-key / policies into place. That’s a lot harder than adding it as a feature to something like [openprocessing.org](http://openprocessing.org), where you already have user accounts, passwords, and a namespace for every sketch that runs.
