Social Networking – An Extension of You

Recently Eric Schmidt (CEO of Google) talked about the “Dark Side of Social Networking“. His view is one day people will change their names in order to escape the online persona they have created and he is right except that “one day” is really today.

Many companies are now checking Facebook, Twitter, etc. as part of the hiring process. Even at my job Facebook and MySpace is checked on potential hires.

So here are some things to think about when you create or post on social networking sites:

Posts Are Archived Somewhere
Recently the Library of Congress has started archiving all twitter tweets. This means that anything you say (at least on twitter) is accessible in perpetuity. So don’t post it unless you mean it.

Potential For Misuse
If I am the leader of a cult, a government radical, or if I have an alternate sexual lifestyle how does that affect me getting hired to an office job? I am none of those of course, but I just pose the question. Could they just pass your resume over if they see something online they don’t like and that you didn’t list on your resume? I bet this happens more often than not.

Rule 34
This kind of ties into the misuse section but there is a saying on the internet. It’s called “Rule 34″ and it says that if it exists then there is porn of it. I wonder how many potential hires and employees there are out there that this holds true. How do you think nude pictures of yourself work for getting that job? Even if you get or have the job how serious is anyone going to take you after seeing the photos?

The answer to this one is just don’t post photos of yourself in embarrassing or compromising positions even if you think it’s a non-public area (facebook can and does get hacked). If you do have them on your PC get rid of them and/or don’t give them to anyone. This includes boyfriends/girlfriends. Nothing speaks revenge more than posting your nudes all over the place after a bad breakup.

Creating Another Account
Within the last year my job has opened up twitter to some of the I.T. staff including myself. The benefits of this I have posted a few months ago in “No I.T. training budget. Twitter to the Rescue!“.

However, due to the fact that I sometimes like to post NSFW jokes, family communication, family photos, and other non-work related items I created another Twitter account for personal use outside of work (@greeleygeek for work, @amidageek for personal).

In my view using my personal account now is no different than text messaging or making personal calls at work. Even this blog falls outside of the scope “work-related” in some posts, which is why I post on evenings and weekends.

Doing this has safeguarded any problems with posting questionable content at work and has effectively separated my “work online persona” and my “personal online persona”.

Be Careful What You Post At Work
You must be careful of the data you post because of trade secrets, private work information, etc. I see this becoming more and more of a concern of employers to monitor these areas and also many more people getting fired for sharing something they weren’t supposed to.

Too Much Information
Another danger is too much information. One of our friends has a teenage daughter that regularly posts her location on Facebook. “Home alone again. Popping some popcorn” may seem innocent, but a savvy internet stalker would have that address and be on their way. This is a why I suggest that you don’t  share your location unless you want people to find you.

Final Advice

  • Watch and think carefully about what you post on work time and/or accounts
  • Create a second account if you want to post personal items (non-work related) and post after work hours.
  • Do not post your location if you don’t want strangers to find you
  • Do not post incriminating photos of yourself online. They will be seen.
  • Remember. What you post could affect current and potential opportunities.

To wrap up here are some links of people getting busted breaking the above rules:

Guy calls in sick, but posts he’s hung-over on Facebook
Woman posts on Facebook by accident (NSFW)
How twitter can get you fired in 140 characters
Woman stalked on Facebook by ex-boyfriends other lovers


Sharepoint Saturday – Denver

Yesterday morning I attended Sharepoint Saturday down in Denver.

From the Sharepoint Saturday website (http://sharepointsaturday.org):
SharePoint Saturday is an educational, informative & lively day filled with sessions from respected SharePoint professionals & MVPs, covering a wide variety of SharePoint-orientated topics.  SharePoint Saturday is FREE, open to the public and is your local chance to immerse yourself in SharePoint!

The first session I attended was “Upgrading Your Custom Developed Solution from Sharepoint 2007 to Sharepoint 2010″ by Shai Petel (from KWizCom – http://kwizcom.blogspot.com/).
The biggest takeaway from this session were the new Sandboxing features of Sharepoint 2010. This allows you to deploy a solution in a sandbox and not bring down the entire Sharepoint collection if your solution has bugs/memory leaks (a problem with previous versions).

Next up was “Caching-In for SharePoint Performance” by Sean McDonough (http://sharepointinterface.com/). My takeaway here was with SharePoint caching the key element is balancing the type of users. The more unique the users the more things like page output caching for SharePoint might not work well for you. He also covered BLOB caching and Office web application caching. A very interesting and informative session.

Lunch – super excellent spread and tons of vendors were there. Lots of swag.

After lunch I attended “Covering your behind – SQL Server and high availability and SharePoint” with Art Laubach. This probably was the least informative as it covered Mirroring and Clustering (two topics which, being a SQL MCITP, I already am well versed in). However, it was good to know that SharePoint does perfectly fine for both which was something I have not researched up until this point.

“Introduction to Sharepoint applications using InfoPath and Forms Services 2010″ with Darvish Shadravan (Microsoft) was an interesting look at the new features of InfoPath and Sharepoint 2010. However most of the cool features like integrating the Office web application features was Enterprise version specific. However these features would be nice as anytime we need a form we have to develop an ASP.NET solution. This isn’t so much of a problem but with SharePoint we could have the versioning built-in rather than resort to Subversion or other versioning system.

The last session of the day ended with “Best Practices for Content Lifecycle Management with Microsoft SharePoint” by the SharePoint guru Mary Leigh Mackie from AvePoint. This was an excellent walk-through of strategies to manage content and scale out your SharePoint installation covering topics such as Remote Blob Storage in SQL (this may be a future blog post), and training end-users.

All in all this was a great experience and well worth the Saturday. SharePoint MVPs were on hand to answer questions and Gary Lapointe (http://stsadm.blogspot.com) even donated two MSDN licenses at the final give-away.

Needless to say I am excited to get back to work with a new outlook on SharePoint and am already looking foward to next year.

Comments Off more...

An Easy Way To Optimize Page Allocation in TempDB

Old Skool Page Lookups

The other day (prompted by a tweet by @buckwoody) I ran the Microsoft Baseline Analyzer on one of my SQL DBs. One of the recommendations it made was that I create multiple data files for tempDB as allocations were slow. I vaguely remember reading about doing this but was still hazy on the details.

So rather than just make the change blindly I wanted to do some research behind the scenes and understand why.

The Mechanics

When you create an entry in tempDB it needs to allocate space just like any other table. There are three types of pages utilized in the allocation process in the tempdb data file: Page Free Space (PFS), Shared Global Allocation Map (SGAM), and Global Allocation Map (GAM).

  • The PFS (specified as a 1) holds 1 byte of data that contains how much free space is in each page.
  • The SGAM (specified as a 3) holds 1 bit per extent which SQL server uses to find whether or not an extent is a mixed extent with some free space or a full extent (there are some optimizations SQL 2008 has where you allocate a uniform extent, but for the sake of this post I will leave that out).
  • The GAM (specified as a 2) holds 1 bit per extent which SQL Server uses to to see which extents are empty to allocate to the new object.

The tempdb page allocation goes something like this:

1. When a temp table is created SQL Server reads the SGAM page to find some free space to allocate for the the table.
2. SQL Server latches the SGAM page and then reads the PFS page to find free pages within the extent.
3. Once free space is found SQL Server creates an exclusive lock on the PFS page and allocates the space.

However, if tempdb is overloaded with allocation requests this can become burdensome with PAGELATCH waits. This can be seen by querying the following:

SELECT session_id, wait_duration_ms,   resource_description
from    sys.dm_os_waiting_tasks
where   wait_type like ‘PAGE%LATCH_%’ and
resource_description like ’2:%’

This query is getting all the PAGE LATCH wait types where the database id is 2 (tempdb). The order for this is dbid:page:type (in the resource_description). If this type is GAM (ex- 2:1:2), SGAM (ex- 2:1:3), or PFS (ex- 2:1:1) it can represent a bottleneck.

One solution to this issue (and the easiest) is to configure multiple tempdb data files.
Microsoft recommends starting with 1 tempdb data file per CPU and adjusting up from there.

There are a couple issues though. One problem is if you create too many data files you may actually get a performance reduction. Another issue is that tempdb will try and fill the file with the most free space first. So you won’t get any benefit unless you equalize all the data files. So a sample configuration for a quad-core system might look like this:

ALTER DATABASE tempdb
MODIFY FILE (name=tempdev1, size=100MB);
GO
ALTER DATABASE tempdb ADD FILE (name=tempdev2, size=100MB,filename=’Z:\mydata\tempdev2.ndf’);
GO
ALTER DATABASE tempdb
ADD FILE (name=tempdev3, size=100MB,filename=’Z:\mydata\tempdev3.ndf’);
GO
ALTER DATABASE tempdb
ADD FILE (name=tempdev4, size=100MB,filename=’Z:\mydata\tempdev4.ndf’);
GO

Now, in theory, you should have uniform page allocation to tempdb. I highly recommend that you utilize the sys.dm_os_wait_stats DMV before and after to see what kind of effect this has on your PAGELATCH’ing and Duration. Your mileage may vary of course.

1 Comment more...

No I.T. Training Budget? Twitter to the Rescue!

Computing Circa 1981

As everyone knows the economy has been tough on the I.T. field. Redmond magazine even did a great piece in their June issue called “I.T. Hell: How the Recession Has Affected I.T. Jobs“.

More often than not the first thing out the I.T. budget window is training and travel. Since technology changes almost daily an “axed” training budget puts any kind of professional development on the back burner.

In my case twitter has come to the rescue!

At first I was among the ranks of those that really did not want to know the last time people washed their dog, or how much they love Justin Bieber. However, once I finally took the plunge I felt like I found the mother-lode.

The first hurdle I/we had to overcome was to get management buy in. In my case we had the following points:

  • Direct contact with the public and/or customers.
  • Some of the top people in their respective fields are on twitter and will actually answer questions.
  • Gives the sense that your organization is innovative and technologically savvy.

One additional bonus we found (and really the most valuable benefit) is the free resources and training.

Free you say? Absolutely!

Tons of software vendors and professional organizations are out there hosting webinars, conferences, user groups, and free software contests. Twitter is the gateway to finding out about these if you start to follow those in your field of interest.

Once you have management buy-in all that’s left to do is sign-up, download a client (like tweetdeck), and start tweeting away.

One pitfall I see is lots of people have one twitter account, but your boss may have a real problem if you’re not tweeting business related items during work hours. HR may also have a problem if you’re tweeting dirty jokes after hours on what is supposed to be a work account.

If you’re really interested in being a serious twitterer there are some simple rules to start building your twitter persona. Rather than go into detail on that I will simply point to a great resource by Brent Ozar called “The Simple Twitter Book“.

My final word on twitter is that it has helped me to identify free resources to move my career forward. It has put me in contact with awesome people I would never ever have come in contact with before. It has pushed my vistas out and prevented me from stagnating in a terrible budget year.

1 Comment more...

MongoDB and SSIS

Below is a very simple proof of concept that I’ve been batting around in my head awhile.
There is much talk of the validity of MongoDB (http://mongodb.com) and even of it’s replacing SQL Server. I am in no way advocating this. MongoDB is great for some applications, but not a full ACID compliant database in my view.

However, if you are a webdev and need a quick and dirty database and you don’t like to mess with Access or a full fledged RDBMS MongoDB is perfect.

My goal with this was to bring these tools together and utilize the strengths of both applications. MongoDB for it’s lightning-fast execution, and SQL Server for it’s analytics and storage on the back-end.

So here we go:

1. Open Visual Studio and Select New BI Integration Services Project

2. Add a DataFlow Task

3. Add a Script Component to the DataFlow as Source.

4. Add an Excel Destination for our purposes.

5. Right-click Script Component and go to Edit

6. Select “Input and Outputs”. I rename mine from Output 0 to “myOutput” in this step for clarity.

7. Select Output Columns. Click “Add Column”. This will add the columns from Mongo that you want to export to Excel.

8. I added name and ip selecting Unicode string as type for both.

9. Click on script and the “Edit Script” button.

10. With script window open I right-click References and add the MongoDB.dll (available here: http://github.com/downloads/samus/mongodb-csharp/MongoDBDriver-Release-0.90.0-Beta-1.zip). I apply to all and say yes.

11. Add “using MongoDB” to the top of the script.

12. I used the following script to connect and extract the data from the MongoDB. Then built the script (don’t forget to do this before you close the script window).

Mongo myMongo = new Mongo();
        myMongo.Connect();
        var db = myMongo.GetDatabase("citizenInput");
        ICursor<Document> cursor = db.GetCollection<Document>("submissions").FindAll();
        foreach (Document document in cursor.Documents)
        {

            myOutputBuffer.AddRow();
            myOutputBuffer.name = document["name"] == null ? "" : document["name"].ToString();
            myOutputBuffer.ip = document["ip"] == null ? "" : document["ip"].ToString();

        }

13. Drag the green arrow to connect to the excel destination.

14. Right-click excel destination and select “Edit”.

15. Click the new button to add an OLE DB connection manager.

16. Fill in the destination file path. First row will have column names. Press ok.

17. Click new for name of excel sheet. Select OK to have it built from the outputs. Pick Excel_Destination as the name.

18. Click mappings to double-check mapping is correct.

19. Click the play button to run the package. Mongo must be running on the same machine in this configuration (and have data of course).

20. Viola! Data in excel.

While this is a very basic example of utilizing SSIS with Mongo you could go much further in depth.

Other ideas might be creating a nightly task to pull the Mongo data down with SSIS to a SQL Database, then clear the Mongo database (all with SSIS). Another possibility is to go the other way and populate a Mongo database with SQL Server data on the fly.

In conclusion I find that if you need a front-end database without the bulk and you don’t care too much about ACID compliance Mongo is the way to go. As an added bonus bringing SQL Server to bear on the exported data makes it that much more powerful for both analytics and storage.

1 Comment more...

Favorite SQL Server Tools

Built into 2008 is a nice little tool called Activity Monitor.

If you have SSMS 2008 simply open it, right-click on the top level server name and select “Activity Monitor”.
With Activity Monitor you can get real-time data on Processes, Wait Tasks, and I/O. A very handy and quick view of your SQL Server(s).

Also, the nice part about this is you don’t have to be running SQL 2008, it will work for SQL 2005 as well.
So, if you have a mix of 2005 and 2008 databases you don’t need to install SSMS for each version, just use the 2008 SSMS and you’ll get instant access to the Activity Monitor for both versions.

On additional note: You can use SSMS 2008 with SQL 2000. However, the Activity Monitor will not work with anything below 2005.

Comments Off more...

Varnish Proxy

So one of the more interesting projects in my opinion is the Varnish Cache project (http://varnish.projects.linpro.no/).

Now I know I’m supposed to be this pro-Microsoft guy now what with all the certs and working with it day in and out, but the budget crunch has hit us pretty hard.

So, when the GIS guys needed to get their award-winning Flex mapping project online and put it behind a proxy I did my research. Basically you’ve got Microsoft’s offering of ISA (expensive), Squid (uses the filesystem to cache..not efficient),  and Apache (kinda bloated).

Then I stumbled on Varnish proxy and haven’t looked back.

We deployed a Fedora Core 10 server into the DMZ, installed and configured varnish pointing to the internal addresses we wanted.

I did some load testing afterwards and before when the webserver (IIS) could handle roughly 30 req/sec it now can handle over 100 req/sec.
Just today I noticed we are getting about 1 million requests a day.

Long story short, it’s been up for almost a year now and after the initial tweaking we haven’t really had to touch it since.

If you’re looking for a non-ssl reverse proxy it’s worth a look

Comments Off more...

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Copyright © 1996-2010 Zero1. All rights reserved.
iDream theme by Templates Next | Powered by WordPress