Achievement Unlocked: Keynote Speaker

I've held off on making this post for a bit because I keep expecting an email that starts off with "I'm sorry, but we don't know what we were thinking...".  Assuming that email never comes, I will be a keynote speaker at the CGamesUSA 2012 Conference.

This will be the conference's 17th year, and will be held at the Galt House Hotel in Louisville, Kentucky.  The conference focuses on bringing together "researchers, games developers, sound, graphics, video, and animation developers, education and training industry, and students from around the world to exchange ideas on design methods, research and development, and programming techniques that are beneficial to the computer games industry and academia."  I am as excited to attend as I am to speak!

This next line is just for google.  And my ego.  But mostly google.

Keynote Speaker: Michael Neel

Posted By Mike On Wednesday, May 09, 2012
Comments (1)

The Technology Cooperative Needs Your Support (and by support we mean money)

TL;DR version – click the link below and make a donation to the Technology Cooperative (a non-profit helping children and adults with several STEM focused programs).  Any amount – $25 would be great, $50 amazing, $100 and you are an Awesome human being I would gladly send to represent us all when the aliens make contact.

A year ago I along with other like minded individuals “founded” the Technology Cooperative (TechCo).  I put founded in quotes because what really happened is we wrote some big personal checks to secure space.   We did this because we believe exposing youth to technology is critical to our future, and it is not happening enough.  If we help a few adults along the way find new careers in technology, even better.

Our first year has been successful by almost every measure.  The TechCo has become home for several groups including game programming, wordpress meetups, youth leadership, robotic exploration, and a makerspace.  We are currently planning a “Summer of Tech” program made up of independent half-day workshops targeting kids off from school.

Personally, I have been leading the game programming group Knoxna (soon to become Knoxville Game Design).  Last summer I held a 3 part workshop on creating Space Invaders from scratch in C# and XNA.  The group has attracted game designers of all ages and is a excellent way for children to apply the physics and math concepts learned in school.

1CCC0C18-6BE5-4B8C-87BF-72F9DCDF9BCA0DDFBFA1-5DD2-40EA-B8EE-F99DAC2F3232

I’ve also had great fun working with kids in the JunkBotz program.  This simple idea has become one of the most popular – we take donated old printers and electronics with motors (laptops aren’t very interesting inside) and let the children take them apart.  It’s not destruction, they have to figure out how to properly disassemble the device.  Motors, gears, switches and more are salvaged to be built into something else later.  So fundamental to learning is seeing how something it works; the fun involved is just a side benefit.

9FB48579-45DA-4976-80A6-1A0ED51BA6DCPhoto-Mar-10-12-19-02-PM

We have been covered in the local paper, and have received our 501-c-3 status (making us non-profit and tax deductible).  We find more and more people every week willing to get involved, lead a group, and help out.  The one thing we have not had success with is funding.

Technology Cooperative has to date been funded by the personal checking accounts of the founders.  We have been applying for sponsorship and STEM grants as quickly as we can, but are finding that many of these programs require the organization to exist for 3-5 years before becoming eligible, and the process slow.  We need help to make it through the time between now and the time we become eligible.

Any donation you can make will help.  We are in that phase Seth would call “A Dip”.  With your help we can reach the other side, and together create the scientists and engineers of tomorrow!

Posted By Mike On Tuesday, April 10, 2012
No Comments

Will The Real GoDaddy SOPA Numbers Please Stand Up?

So Ars Technica just ran a story titled “GoDaddy wins, and loses, Move Your Domain Day over SOPA”.  Well, that’s the story title now, but you can see from the URL the original title was “Move your domain day only a blip, but GoDaddy officially opposes SOPA”.  Which set me off because the entire article is around one day of data.  Shame on you Ars, this is lazy at best!

Ars linked to a source from DomainTools that shows daily changes for registrars.  With a few minutes of effort I compiled stats for GoDaddy for the month of December.  This chart tells a better picture of the SOPA impact on GoDaddy:

Godaddy-Net

December 23rd is the day GoDaddy announced support for SOPA.  Doesn’t look like the GoDaddy Girls had a very merry Christmas this year as many did not wait on the “official” boycot day.  Since I often work on Business Intelligence projects however, I don’t put too much faith in aggregated numbers without looking underneath them.  Here is a chart showing Domains In vs Out, what the Net change is based on:

Godaddy-InOUt

I can see that GoDaddy has a weekly rhythm to it’s domain business, and because the bulk of the Out domains came on a weekend, the impact is probably exaggerated a bit.  Still I can’t imagine any corporate getting excited at these charts.

Before I would really say what the impact was, I need more data.  I’d like to see these charts for the last 6 months, and also compare to year-over-year numbers.  I need to get a handle on what is typical for this time of year, and what an average week looks like.  What do GoDaddy’s numbers look like compared to the other top 5 registers?

Some other questions are what happened on the 15th?  If I had to guess I’d say it was a reporting or system error that was fixed a few days later, but how common is this occurrence?  The numbers for the boycott day also look high compared to the others.  There are many reports that GoDaddy is stalling on transfers and even registering domains itself to make the numbers look good.  This dataset is no smoking barrel, but it does hint at something out of the norm is happening and following these numbers for the next month may reveal a different picture.

Incase you want to do more digging, here is my data from DomainTools used in the charts above.  It will only be up for a week or so, so after then this will be a broken link.

More than enough time for Ars to do some real journalism, and cover the whole story.

Posted By Mike On Friday, December 30, 2011
No Comments

Moving to Azure: Worker Roles for Nothing and Tasks for Free

If you’ve been to at least one Azure presentation you’ve probably heard Azure has two primary roles: Web Roles and Worker Roles.  Web Roles run websites, and Worker Roles run tasks.  The two sites I’m moving, XboxIndies.com (which is moved, yay!) and GameMarx.com, use a few automation scripts to update the database and aggregate news feeds.  This sounds like a perfect excuse for a Worker Role, but there is a draw back to spinning up another server: cost.  There is a cheaper alternative though…

Roles in Azure are really customized VMs running some flavor of Windows Server 2008.  This means there is a Task Scheduler we can use to run automation tasks!

The easy way to setup a scheduled task in an Azure Web Role is to enable Remote Desktop, log in and add a task.  I won’t cover details, but setting up Remote Desktop access with the Azure SDK 1.5 is simple and 100% GUI supported.  You will have to start the Task Scheduler service as by default the service is set to start up “Manual”.

Setting up the task manually is good for development, but you’ll probably want to automate the process to simplify deployments.  Note:  Any startup scripts will be run per instance of your Web Role, so make sure there is no harm in the application by having multiple servers run the same script.

Now, before I show you my solution, I want to say I tried to use PowerShell like the cool kids.  An hour into to trying to figure how the Task Scheduler API works inside of PowerShell I decided to scrap that approach and go with what I know works without fuss – Windows Shell Scripts!

Here is my startup script:

net start "task scheduler"
net user autoguy n0t@RF45$_ /add
net localgroup Administrators autoguy /add
schtasks /create /SC DAILY /MO 1 /ST 08:00 /TN DBUpdate /TR %~dp0XBLIGUpdate.exe /F /RU autoguy /RP n0t@RF45$_ /RL HIGHEST
schtasks /create /SC MINUTE /MO 15 /ST 00:00 /TN StoryUpdate /TR "%~dp0SitePing.exe http://www.xboxindies.com/hiddenupdateurl" /F /RU autoguy /RP n0t@RF45$_ /RL HIGHEST

I saved this script as “startup.cmd” in a folder called “ServerScripts” in the root of my WebRole.  I also placed a web.config file in this folder set to deny all access from the web.  </>

A quick rundown of the commands in the script:

  • “net start” starts the task scheduler service.
  • ”net user” creates a new user on the server.  The arguments are the username and password.
  • “net localgroup” adds the new user to a local group on the server.  I am adding the new “autoguy” user to the Administrators group.
  • The last two lines add the scheduled tasks.

You can get help on the various task creation switches by running “schtasks /create /?” at your local command prompt.  The only magic in these line is the command script variable %~dp0 which is the folder the script is in.  I added the programs XBLIGUpdate.exe and SitePing.exe to the same folder so it would be easy to reference in the script, since I can’t make full path assumptions in Azure.

To run this script when the role is instanced, add the following to the <WebRole> section of your ServiceDefinition.csdef file:

<Startup>
  <Task taskType="background" commandLine="ServerScripts\startup.cmd" executionContext="elevated"/>      
</Startup>

I chose to place the task in the background so that it doesn’t block the startup of the Web Role.  If you set the script to “simple” and it fails, your Web Role could fail to start.

Posted By Mike On Monday, October 24, 2011
Filed under azure | No Comments

Moving to Azure: Static Assets

You may not have noticed, but this image came from the cloud!

The next stage in migrating GameMarx.com and XboxIndies.com to Azure is moving the static assets website static.gamemarx.com.  This site hosts game boxart, screenshots, video thumbnails, and the podcast.  In a traditional web hosting scenario, it’s common to create a static site for performance.  On the server side all dynamic content and script plugins can be disabled, resulting in a faster turnaround for content.  On the client side, most browsers will limit the number of concurrent connections to a single server.  By using a second server for the same page, the number of concurrent connections will increase, resulting in a faster load time.

With Azure there is another good reason to add a static site – it’s cheap!  Currently Azure Storage is $0.15/GB sent (uploads are free) + $0.15/GB stored per month.  20 GB of transfer per month would be a decently busy site, and would only cost $3!  Running a website out of Azure Storage does not require any WebRoles or VMs, so you’re only paying for data.

Cloud URLs

When you store a file as a blob in Azure Blob Storage, the URI is created using the blob name, storage container, and storage account.  The structure is:

http://<account>/<container>/<blob>

Within the Azure control panel, you can map a custom domain name to the account.  In my case I’ve setup a CNAME of static.gamemarx.com pointing to gamemarxstatic.blob.core.windows.net.  The container can only include letters, numbers, and dashes.  The blob name can contain pretty much anything, but special characters need to be URL escaped.  My example image above has the following URI:

http://static.gamemarx.com/games/images/66acd000-77fe-1000-9115-d80258550998/lg_screen2.jpg

Where did the extra folders come from?  Well, they don’t exist – like the Matrix they are just a construct of the mind.  In my example, the blob is named “images/66acd000-77fe-1000-9115-d80258550998/lg_screen2.jpg”.  “/” is a legal character in a blob name.

File Management

The blob name trick may be nice for the browser, but you will have to deal with reality when managing files on the server.  In the Azure SDK Microsoft includes a class CloudBlobDirectory to make things easier.  When you call ListBlobs() on the container, the result will (by default) will include CloudBlob and CloudBlobDirectory objects.  The directory objects use the blob names to create a virtual hierarchy, and have their own ListBlobs() method plus a GetSubdirectory() method for walking the tree.

If you need to create a file in the root of the site, such as a clientaccesspolicy.xml file, you can setup a special container named “$root”.  Blobs in “$root” can be accessed with or without the container name in the URL.

Be sure all the containers you create are set to public read access to avoid clients getting 403 – Forbidden errors.

Storage Issues

Azure does not compress content automatically when requested by a client (i.e. GZip the document and send a “Content-Encoding: gzip” header).  For me, this is not a big deal – I’m only serving jpegs and mp3s, which are already compressed.  If however you have text documents stored, you will want to compress these not only for the Data Out savings, but to increase the page load time as well. 

To enable content compression, you will need to compress the content before uploading, and set the ContentEncoding blob property to the method used.  Sriram Krishnan has a good write up on sending gzip content from Azure storage.  There is a downside – the content will always be served compressed, no matter the client’s AcceptEncoding headers.  All modern browsers accept compressed content, but if you are supporting some non-standard clients they will not be able to read the content.

Update: Adding another gotcha that bit me today.  The URLs to the static website are really URIs to the content in blob storage.  According to spec, only the scheme and host are considered case-insensitive.  This means you will need to be consistent when uploading and linking to the blobs, as an incorrect case match will mean a 404 error.

Finally, there is no default document feature in Azure Blob Storage.  If you publish a fully static website to Azure Blob Storage, no one could load the homepage!

Going Web Scale!

Negatives aside, there is still another advantage for using Azure Storage beyond cost: the Azure Content Deliver Network.  With a simple configuration change in the azure control panel I can send my content out to 24 datacenters around the world, speeding delivery and providing alternate routes during internet outages.

To active the CDN once you have your content in blob storage, log into the control panel and click “Create CDN”.  Then point the CDN at the storage account as the “master” server, and setup a DNS CNAME and you are done.

I did not do this with my site however, because I do not have the traffic levels to warrant the need.  The CDN rates are similar to Storage (nodes outside Europe and North America are $0.20/GB data out) but there is a “double charge” for content as it’s loaded into a CDN node.

When a user in London requests an image, they will first try the Europe CDN node.  If the node hasn’t already cached the image, the node will request it from the Master Blob Storage Account.  Then the London CDN node will send the image to the user.  There will be a Data Out charge from the Master server, and again from the CDN node.  Subsequent requests to the same CDN node will only have a single charge, as they will be served from cache.

Content is cached at a CDN node based upon request traffic.  Since I don’t have that much traffic, it’s likely most of my content will expire before I see a real benefit.  (and to be 100% honest, I cannot find anywhere that states CDN is included in the Bizspark Azure package – sorry London!).

I’d like to thank…

Once again I’d like to thank Brian H. Prince and Chris Hay for writing Azure In Action – which has a section on running a static website from blob storage.

The screenshot is from Pixel Animator 3D – an Xbox Indie Game that let’s you create animations using those Minecraft blocks (aka voxels).

Posted By Mike On Monday, October 17, 2011
Filed under azure | No Comments

About Michael

Michael C. Neel, born 1976 in Houston, TX and now live in Knoxvile, TN. Software developer, currently .Net focused. Board member of ETNUG and organizes CodeStock, East Tennessee's annual developers conference. .Net speaker, a Microsoft ASP.NET MVP and ASPInsider. Co-Founder of FuncWorks, LLC and GameMarx.

Proud father of two amazing girls, Rachel and Hannah, and loving husband to Cicelie who inflates and pops his ego as necessary.

 Subscribe to ViNull.com |  Comments

Follow me on Twitter | Contact Me

XNA 3D Primer by Michael C. Neel

XNA 3D Primer by Michael C. Neel
Buy Now: [ Amazon ] [ Wrox ]

GameMarx

CodeStock

ASPInsiders Member

ETNUG Member