Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

What are workspaces?

How do workspaces work? Are they stored in a database? How do they remember which student is which?

1 Answer

Kevin Korte
Kevin Korte
28,148 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.