Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,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.