Estimated reading time: 3 minutes, 13 seconds. Contains 646 words
In terms of development, I have always been a fan of simply using Linux.
I always installed a Linux distribution alongside my Windows OS. Although I had a habit of distro hopping before, I always find myself going back to an ubuntu-based distribution (Ubuntu or PopOS) cause of the resourceful forums and active community. Also, I much prefer gnome-style desktop but I am aware that it is resource hungry.
I dual-boot Linux for the following reasons:
- I didn't want to go through the pain of adding extra apps on top of a terminal (I didn't want so much apps to eat my memory)
- Most servers are linux-based and I want to familiarize myself with the environment
- I'm an advocate of open-source products (a.k.a. I'm really cheap and I always try to find free alternative software first)
- I've never upgraded my laptop's HDD to an SSD so I always had to endure slow boot time if I wanted to use Windows (again I'm very frugal 😂)
As a result, I use Linux about 95% of the time when I'm using my laptop and I rarely boot Windows, usually when I really need to open a file or an application that is not compatible with Linux or when I play games.
But eventually, I was gifted with an SSD and I saw how it significantly made a difference in boot time and opening applications. Since then, I considered migrating my workspace and adjusting my workflow. I never really committed to it until I recognized that some of my responsibilities would be more conveniently and quickly accomplished if I find a sweet balance inside Windows OS. Some of my roles require Exploratory Data Analysis. Although, this is still possible in Linux, intuitive software tools are more available and supported in Windows, free or proprietary.
And so my set up is shown as seen in the figure: (pink apps are paid)
Essentially, I wanted to highlight that my drives are partitioned to separate System Files and Data Files. I do this for the following reasons:
- If system files partition occurs an error, Data Files will not be affected
- Accessibility of Data Files to any OS that I boot (much applicable when I still dual-boot)
- Save memory allocation in SSD for app installation (for faster boot times of applications)
Subsequently, I kept all database servers within Windows OS and did not install them in my WSL. I did this for the following reasons:
- Avoid multiple servers (both in Windows and WSL)
- Consistency of DB server placement (MongoDB isn't officially supported in WSL, yet)
- Accessibility of stored data to for access of both WSL scripts and Windows apps
- Centralized Configuration (To avoid getting confused if data are stored in Windows or WSL db servers)
- Last and most significant reason: I was experiencing much more issues in configuring data path for WSL than in Windows. (chmod, chown, symlinks, systemctl orchestration obstacles)
In case I do need to access my DB servers from my WSL all I need to do is:
- Identify host IP and place in .env file for script access:
# in WSL terminal
wsl.exe hostname -I #gives you Windows IP
- Ensure that ports are accessible via WSL by editing firewall to each database port to what is mentioned here
Honestly, this setup is more of a workaround. I would like it if the DB Servers are in the WSL container but the setup was really a pain and I don't have time to meticulously set it up at the moment to my liking. I'll update this post once I'm able to fix it.
I've also read in some forums that it's recommended to install DB servers in WSL instead of its host due to access speeds.
If you have any suggestions or comments to this setup, let me know. Would like to know what you think cause I'm pretty sure there is a better configuration out there 😊
Edit:
I would also like to provide the following resources to finally setup a WSL that will also provide GUI interface for Linux. It's not really needed to have a GUI. However, I do need to simulate and debug webcrawlers for data mining tasks and I need to observe how my web crawlers traverse a website.
Here are some sources:
- How to install WSL2 (pretty straightforward)
- How to enable GUI apps for WSL (unfortunately, I don't find Microsoft's documentation for setup working out of the box for me. It should be explicitly stated that VcXsrv or an alternative is needed in your device)