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?
Hi.
You can upload and get strings.
See this topic.
add some LOCAL server and networking options for processing
i summarized here
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.
Interesting! I wasnât familiar with the Scratch âCloud Dataâ system.
- https://en.scratch-wiki.info/wiki/Cloud_Data
- 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, or as an extension to OpenProcessing services at 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:
- use a web-hosted database and update values in the database
- run a server sketch at a stable IP address, and have it send and receive network messages to update central variables in memory
- work with a library that accesses a third-party hosted database, such as Firebase
- work with a library that accesses a hosted key-value store (self-hosted or not), such as Redis-processing + 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, where you already have user accounts, passwords, and a namespace for every sketch that runs.