Wetty Terminal: SSH Terminal in your Browser

While setting up my NAS, one thing which I always wanted was to able to connect my NAS machine using SSH. The idea of having to download and configure various applications on different devices seemed cumbersome. I needed a solution that allowed me to connect to SSH effortlessly, from any location, using just a web browser. That’s when I discovered Wetty. WeTTy (Web + TTy) is “an alternative to ajaxterm and anyterm but much better than them because WeTTy uses xterm.js which is a full fledged implementation of terminal emulation written entirely in JavaScript. WeTTy uses websockets rather then Ajax and hence better response time.” ...

February 23, 2025 · 3 min · Rishi Daftary

Trino - Cross DB Reporting

Introduction Managing multiple data sources was a big challenge I was facing on my NAS environment. I have various applications running on my NAS, and each application utilizes different databases to store the data. This diverse ecosystem of databases includes MySQL, PostgreSQL, SQLite, MS SQL, and others, each serving its specific purpose. My main applications are: Immich, a photo and video backup system A WordPress blog Some of my personal projects Each of these applications has its own database, and I wanted to generate a daily report that requires data from multiple databases. Manually joining tables across these different databases was not only time-consuming but also prone to errors and inefficiencies. I was looking for a solution that could seamlessly integrate and query data from these disparate sources to generate accurate and timely reports. ...

February 1, 2025 · 3 min · Rishi Daftary

Http Performance: Go vs .Net 9

With the recent release of .NET 9, I was eager to explore how it compares to GoLang in terms of performance. As a longtime .NET core enthusiast, I’ve always believed that .NET core holds an edge over GoLang. Today, we’ll explore key metrics like requests per second, latency, and data transfer rates to understand how each framework performs under similar conditions. Introduction to HTTP Performance HTTP performance is crucial for web applications, influencing user experience and server resource efficiency. Key metrics to consider include: ...

January 17, 2025 · 3 min · Rishi Daftary

Immich - Self-Hosted Photo Management on NAS

Introduction When I first bought my NAS, my primary goal was to sync all the photos across my devices and those of my family in one central place without paying for any cloud subscription. The challenge was to find a reliable, privacy-focused photo management solution that could replace Google Photos. That’s when I stumbled upon Immich. Immich has not only met but exceeded my expectations. Here’s a detailed account of my experience with Immich self-hosted on my NAS. ...

January 13, 2025 · 4 min · Rishi Daftary

Orico NAS Review

Introduction In my quest to enhance our family’s digital life, I recently decided to upgrade our home network storage solution with the Orico NAS. My main motivation for this purchase was twofold. First, I wanted to create a private cloud for my family, allowing everyone to back up their data in one centralized location without the ongoing costs associated with cloud subscriptions. This ensures that our precious photos, documents, and other data are securely stored and easily accessible. ...

January 12, 2025 · 3 min · Rishi Daftary

C#13 params collection performance benchmark

Microsoft released the latest version of C# i.e. C#13 and now it allows params to be any of the collections supported by collection expressions rather than just arrays. So, I quickly wrote the benchmark code to test the performance and overall, it did improve the performance. Here’s the code snippet and results for the single value test: public class ParamsBenchmark{ // Dummy methods to illustrate the params collections public int SumOld(params int[] numbers) { var sum = 0; foreach (var num in numbers) { sum += num; } return sum; } public int SumNew(params Span<int> numbers) { int sum = 0; foreach (var num in numbers) { sum += num; } return sum; } [Benchmark] public int SumOldParams() { return SumOld(1, 2, 3, 4, 5); } [Benchmark] public int SumNewParams() { return SumNew([1, 2, 3, 4, 5]); } } Below are my benchmark results: ...

November 20, 2023 · 1 min · Rishi Daftary

Running Powershell Command Remotely Using C#

C# has some really awesome nuget package if you want to run the PowerShell script or run the command. I am talking about the nuget package “Microsoft.PowerShell.SDK”. Now running the batch file or any command or any executable from the local machine is quite easy and simple. You just need to create the PowerShell object, add the script you want to execute and invoke it. Above code is simple and self explanatory. But lately in my project we had a requirement in which we need to execute the command on the remote machine and fetch the output. It’s as good as you are remoting to that machine and executing the command on that machine and fetching the output. Now you would be surprised to know that, you can actually achieve that using the PowerShell SDK and with only few lines of code you can create the magic. ...

June 7, 2022 · 2 min · Rishi Daftary