Welcome to the Treehouse Community
Looking to learn something new?
What are workspaces?
How do workspaces work? Are they stored in a database? How do they remember which student is which?
Kevin Korte28,135 Points
Not really sure exactly how they work, as it's certainly a complicated thing to build. But if I were to guess, each workspace creates a virtual box on server. Your files, and code is probably remembered because it pulls up that box that belongs to you, just like your personal computer remembers what files you have. When you code, you're inside the virtual box, so let's say you did something bizarre, and downloaded a virus, the virus couldn't affect the physical machine, and it couldn't affect other users boxes on the same server. Just destroy the box, and the virus is gone.
I'm sure there are some sort of credentials that are passed to the server to return virtual boxes that the user is the owner of.