PowerShell Multithreading with PoshRSJob

Intro

PowerShell has had a native method for spawning multiple “threads” ever since I can remember, in the form of the *-Job functions. They work OK, but there are a couple downsides:

  • Each job is its own PowerShell process, so it takes a non-trivial amount of time and memory to spin each up
  • There’s no built-in method for throttling the number of concurrent jobs

This combination will become an ugly mess if something spins out of control and you spawn dozens or hundreds of jobs. PowerShell jobs are better tailored to small-scale asynchronous background processing. You can wrap the functions to limit the number of concurrent jobs but again, there’s a lot of overhead involved in creating and tearing down jobs. Warren Frame created Invoke-Parallel, which uses runspaces (lighter-weight than jobs) and allows for throttling, but isn’t quite as full-featured as jobs are.

Tips for Attending a SQL Saturday

Matt (blog | twitter) is preparing for his first SQL Saturday presentation next weekend in Washington, DC. He’s asked:

I wanted to get an idea of some good, bad, and surprise experiences that people had at everything from a SQL Server User Group meeting to PASS Summit. Things you found out right before, during or even after that you were glad you did or wish you did.

Random Thoughts

SQL Saturdays are similar to PASS Summit, but much smaller in scope and budget. Most SQL Saturdays have a twitter hashtag; follow it before the event so you can get an idea of who’s attending and make plans to meet some of those people.

PASS Summit 2018 - A Lesson in Personal Branding

Last year at PASS Summit 2017, I heard a number of comments related to people not recognizing me without the hat in my social media photo/avatar. The linked post started and concluded with the notion that I needed to take a new photo.

That never happened. Instead, I embraced The Hat. And it was totally worth it. I got a bit of ribbing from folks early in the week but it was all friendly. Trying to meet up with people at various points in the week, I’d get messages like “I’m in (location), looking for your hat, where are you?” People introduced themselves when they spotted me doing my PASS Ambassador duties because they recognized the hat from my photo.

T-SQL Tuesday #108 - Learning Tech Beyond SQL Server

Malathi Mahadevan (blog|twitter) is hosting this month’s T-SQL Tuesday, a monthly blog party for the SQL Server community.

Malathi has asked us to:

Pick one thing you want to learn that is not SQL Server. Write down ways and means to learn it and add it as another skill to your resume. If you are already learning it or know it – explain how you got there and how it has helped you. Your experience may help many others looking for guidance on this.

PASS Summit: Planting Seeds of Knowledge

On the eve of this year’s PASS Summit, I find myself reflecting on my first Summit in 2012. My employer was generous enough to pay for not only Summit itself, but a pre-con session on Tuesday as well.

I was a developer with an interest in SQL Server and PowerShell at the time, not a DBA. Becoming a DBA wasn’t on my radar yet. Regardless, I used the opportunity to attend a full-day class on managing SQL Server with PowerShell, taught by Allen White (blog | twitter). One of the big focal points of the day was the SQL Server Management Objects, aka SMO.

PASS Summit 2018 - Let's Hang Out! Where to Find Me

In addition to being an amazing opportunity for both technical and professional development, PASS Summit is a #sqlfamily reunion and a huge networking event. Catching up with old friends, meeting new ones, finding out who’s doing what with which technologies, etc.

This is one of the few times each year I’m anything even approaching a social butterfly and I’ve had one or two people ask about my schedule so we can plan meetups. Summit is so huge that you have to plan these things. You can’t count on randomly bumping into people around the convention center or city, and if you happen to spot someone you really want to meet, you have to take advantage of that opportunity the first time it presents itself.

Here Comes the New Blog. Same as the Old Blog.

Welcome to the new home of my blog! I’ve had this domain for over a year but with PASS Summit 2018 coming up soon I decided it was time to make the move official.

I’ve brought all the content over from the old site but all new content will be appearing here. I’ll throw a new coat of paint on at some point just to freshen things up.

T-SQL Tuesday #107 - Death March

This month’s T-SQL Tuesday is hosted by Jeff Mlakar and he asks us to write about a project that went horribly wrong. My story isn’t really worthy of the name “death march” but it was a pretty rough project.

The project started sometime in mid-2003. I was working as a web developer (Classic ASP) for an insurance company and they wanted to modernize the underwriting process with a web-based “workflow” application.