Trevor May.ca

blog - tech - photos - portfolio

Sep102014

Comparing GPS Devices for Mountain Biking

Blog I wrote on Pinkbike comparing some GPS units.

Dec142012

The Hobbit High Frame Rate

So yah, high frame rate… I want to like new things, in theory it sounds good and 24gps film is an outdated standard from almost 100 years ago, but…. Not sure I like it. I definitely get what a lot of reviews say that it looks like a video game or watching a live play. The scenes with CG, lots of light and a moving camera look fake, lots of movements look sped up, specially close-ups in brightly lit scenes. The first 10min all looked very strange, but after that you start to get used to it. Then there will be a scene that is kinda jarring that reminds you. It defiantly works better with dark low light scenes. It also helps a lot with the 3D, no blurriness, no eye strain and everything is SUPER crisp, maybe too much so at times.

I have to go see the movie again in normal 24fps non-3D to compare. I suspect I will enjoy it more the old-school way :(

May302012

Drupal Performance on IIS7 vs Apache

I’ve been doing a bunch of performance testing for one of my Drupal sites Trailforks.com and decided to compare IIS7 vs Apache 2.4. I host several Drupal websites on Windows Web Server 2008 with IIS7 and love it. I’ve read more and more articles that show IIS outperforms Apache and other web servers in many situations. But I wanted to make sure I wasn’t loosing possible performance by hosting my site with IIS compared to Apache.

I created a local copy of my site and database on my desktop which is an Intel Core i7 920 OC@ 3.3Ghz with 6GB ram and an SSD. I installed the following software: IIS7, MySQL 5.5, PHP 5.3.13 & Apache 2.4. For IIS I also installed Microsofts URL Rewrite plugin. Besides that the IIS7 configuration is default. PHP settings are default besides upping the memory_limit to 256MB. For my first tests I also left Apache with its default config.

I used Microsoft’s cool testing tool called WCAT. My tests were to see how many pages each server could load in a 20 second period, with a 5 second warmup. The following is my wcat .ubr settings

[Configuration]
WarmupTime 5s
NumClientMachines 1
MaxRecvBuffer 64K
CooldownTime 5s
ThinkTime 0s
NumClientThreads 80
Duration 20s
Comment Test Server

[Script]
SET KeepAlive = TRUE

NEW TRANSACTION
classId = 1
weight = 100
server = “localhost”
NEW REQUEST HTTP
URL = “http://trailforks.local/”

For the Drupal side, I tested my Trailforks site which contains over 100 modules & a custom theme. I created a blank page with a blank template using a custom module, so its the most basic drupal page. I disabled drupals cache and the Boost module cache. These are the initial results.

  1. IIS – 192
  2. Apache – 53

I was rather surprised with the results, IIS blew Apache out of the water. The next test was to enable boost and test serving basically just a simple html file.

  1. IIS – 207,677
  2. Apache – 84,436
Again IIS more than doubles Apache’s numbers. I also tried with IIS’s built-in “Output Caching” and the result was prety close to Boost at 219,374. Now another advantage to IIS is that the default configuation of IIS7 and of PHP 5.3 when using the PHP Installer is pretty good, I wouldn’t change much. Its been several years since I had used Apache, but I knew that the default Apache config is not great. So I did a bit of looking around and added a couple things to the httpd.conf along with disabling all but the minimum Apache modules needed to run Drupal.

KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 5

<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>

This increased the Apache number only slightly from 53 to 62.
I also wanted to test each platforms most popular PHP Opcode cache extension, Wincache & APC. I installed the newest version for each and gave both lots of memory (same amount for both).
  1. IIS – 683
  2. Apache – 544

So once again IIS with Wincache beats out Apache with APC. Also nice to see that the opcode more than triples the performance!

Another quick test was to enable a “web garden” on the IIS application pool for the site. Changed the max worker process to 10. this increased the IIS number even further to 936.

Doing these tests has defiantly reaffirmed my choice to use Windows & IIS for hosting my sites. Not only does it outperform Apache in these specific tests but I find it MUCH easier to manage with the excellent UI’s and tools. Ever since Microsoft moved the HTTP.sys into the Windows kernal and rewrote IIS from 6 to 7, its been a solid competitive option. With Windows you also don’t have to worry about tweaking TCP like you have to on most Linus distros for optimal web hosting performance. Microsoft has also invested a lot into PHP & FastCGI on Windows over the past several years and PHP on Windows/IIS is just as good as LAMP now. One of my favourite things about IIS is “application pools” and how each site is isolated from everything else, so if it crashes, or is running slow, it doesn’t effect the others. This also helps for security and application pools can be configured to recycle when it detects problems. Another huge bonus is most config changes you make with the IIS Admin GUI or by hand editing a web.config file take effect instantly! No restarting Apache every time you change a setting.

I know doing any kind of benchmarks is never perfect and I want to do more tests. I’m planning on running more tests with a higher concurrent to see if that changes the comparative results at all. Additionaly if anyone has any suggestions on how Apache might be better tweaked please let me know!

Easy WCAT setup I created with simple .BAT files to run creating the server & client for testing: wcat_setup.zip

Tags:
Mar272012

How Politwitter Works

A new blog post on Politwitter detailing some of the background mechanisms that make Politwitter.ca tick. http://politwitter.ca/blog/26/how-politwitter-works

Mar122012

Politwitter Launches Government Social Media Aggregator

gov.politwitter.ca is a companion tool to Politwitter that tracks social media activity by Canadian government departments, institutions & organizations.

Many of the features, & statistic tracking from Politwitter is now available to help track & analyze how the Canadian government is using social media and how citizens are interacting with it.

Back in 2009 after launching Politwitter.ca I thought about creating sub-sites for local government, newsmedia & government. In 2009 I started creating newstweets.ca but soon realised there was not much interest. I created local.politwitter.ca to start collecting municipal twitter data, but also realised I didn’t have the time to maintain a database of all the municipalities in Canada. Keeping Politwitter going with federal & provincial politics is already a big undertaking.

I started on a Government site but with federal & provincial elections on the go I was focused on Politwitter.ca. Well in March 2012 a new site zegov.ca created a directory of Government Twitter & Facebook accounts so it reminded & prompted me to finish the Politwitter GOV site. Keeping a directory of Governments social media is manageable, the numbers aren’t huge. But as with the main Politwitter site the directory can be updated by anyone.

Politwitter not only lists government Twitter & Facebook accounts but also includes Youtube, Flickr & indexing of photos & links. Politwitter also aggregates all of this government social media data for permanent archival and analysis, with features & tools people have loved on the Politwitter political side.

Politwitter allows sorting, filtering, searching and statistics of the Government social media. More statistics will become available once more data is collected.

I don’t mean to step on Zegov’s toes, but I’ve had this on the backburner for 2 years and already had all the infrastructure built for Politwitter. Using the Politwiter platform gives much more functionality than exists on the Zegov website. I’ve also seen several projects like these popup over the years that fizzle out or aren’t maintained. Politwitter has a proven track record which media, politicians and government already rely on. I can also share data between the government & political sites for deeper analysis going forward.

I’m always open to working with others or having people help develop Politwitter, but for the most part no one takes me up on that offer and it’s been a solo undertaking. Of course if you’re not a web developer you can always help by keeping the directory updated, telling others about Politwitter or donating.

If you have any suggestions for the new Government Politwitter let me know! If you see a government twitter account missing you can add it here.

gov.politwitter.ca

Feb192012

Trailforks

Finally pulling the wraps off a project I’ve been working on called Trailforks.www.trailforks.com is a community-powered mountain biking trail database currently focused on BC.

The core functionality of Trailforks is a database for mountain biking trails. Trailforks is a crowd-sourced community site and users can help populate and keep the database updated. The data & features for each trail is tailed specifically for mountain biking. There is a high focus on getting GPS data for every trail & maps are a big part of the site. Each trail page has a map and GPS data and each riding area has a Google Earth 3D map with all the trails plotted on it dynamically. Just upload a GPS track of a single trail and all the rest is handled automatically. (Example the Mount Fromme Page)

The site has loads of other features like photos, videos, skill parks, news, business directory, local products, events, forums, bike profiles, riding routes, route challenges, group ride planning & more. But one feature I really want to promote is “Trail Reports”. A Trail Report is a quick entry posted by users indicating the status of a trail and describing any problems or things needing attention on a trail. A trail report can also be a log of work done on a trail and “trail days”. I hope that local riding associations and trail maintainers might start using this tool. Most pages on the site offer RSS feeds and I can create custom widgets for associations so they can display trail status and reports on their own sites. I also have a REST API that accepts and outputs data in XML, JSON or Serialized PHP.

To help encourage people to build the database users earn points for all the content they contribute and credit is given to the user. The site also has points & gaming style achievements that users can unlock by helping contribute content or just by using the site. For example one of the achievements is “Ridden 100 Trails” earned by marking 100 trails as “ridden”.

Trailforks now also integrates with my “Ridelog” Facebook App.

Feb82012

Email Client Switch?

I’ve been trying out different email programs, just to see if something fits better than Outlook which I’ve always used. I use Google Apps to host my domain email and have to check using IMAP. I find the IMAP in Outlook fairly slow at times.

I tried Postbox & Opera mail and didn’t like either, I then tried Thunderbird again. I’ve tried it several times over the years and it never stuck. But now since I use an Android phone I’ve been using Google Contacts & Calendar more and more over the Outlook built-in options. I still use Outlook contacts & calendar but use a program called gSyncit to sync changes.

The thing that sets Thunderbird apart is its healthy ecosystem of  “addons”. There are addons to use Google Contacts & Calendar within Thunderbird. I also find the IMAP much faster and the search and filtering is faster and contains some nice features.

I will try using Thunderbird for a week as my main email client and see if it sticks. One thing I miss already is the ability to right click an email “find related messages” which Outlook has.

Here are the addons I’m using

Jan52012

Switching to XBMC

I have run a computer connected to my TV for many years, started with just normal windows then Windows Media Center 2005, then Vista Media Center then to Boxee and now i’m making the move to XBMC.

I’ve spent a lot of time the last 3 days pimping out my XBMC Eden setup and organizing my movies and tv shows so they 100% identify and have all the poster, banner, logo and fanart images.

I’m pretty happy with XBMC its very customizable, but I do miss some of the features and apps Boxee had.

I made a video demo’ing my XBMC setup
http://www.youtube.com/watch?v=0eepxM3K3tc

Here is a pic of my TV setup, my HTPC is a horizontal case under my receiver.

 

 

 

 

 

Tags: ,
Oct212011

Tip: Download Youtube Videos in HD

I like to save youtube videos I really like so I can watch on my TV anytime, fun to watch when friends are over and such. There are several extensions for the Google Chrome web browser that add a download button below the video on youtube.com This allows you to quickly and easily download the video in any format available, all the way upto 1080p!

Many of these extensions no longer work and there isn’t any in the official Chrome Extension directory. This one currently works great though, the one I was using before stopped working.

http://www.chromeextensions.org/music-videos-photos/download-youtube-videos-as-mp4-flv/

You want to download the MP4 versions for best video offline playback, if you run a Windows prior to Windows 7, you may have to install a codec pack to play MP4 files.

Tags:
Mar172011

Updates to Politwitter.ca

I’ve been working hard on Politwitter this past week, adding many new exciting features along with several bug fixes.

I just finished adding a new statistics page that tracks the sentiment of tweets mentioning MPs. The results are grouped by party and interesting charts are shown.
http://politwitter.ca/page/sentiment

I created a page listing all the Twitter hashtags for House of Commons committees and will now index all tweets using these hashtags.
http://politwitter.ca/page/committees

I created a list of all 308 federal ridings http://politwitter.ca/riding
You can click on any riding to view that ridings social media page, showing all related content for that riding.

I also started a federal riding hashtag format based on the riding EDID number for people to tag their tweets about local riding issues. To help people find your EDID hashtag I created this lookup tool http://politwitter.ca/page/edid_lookup

I remade the main menu using a multi-column dropdown format, allowing for much more links in a user friendly format.

I created a system to collect the total number of tweets each parties MPs make each week then to automatically tweet out those stats for each party using 4 Twitter accounts I have for each party. So people can follow which ever twitter account they are interested in. The stats can also be viewed on this page: http://politwitter.ca/page/statistics_weekly

I remade the “election fever” page updated for 2011 and switched the charts to use the new interactive Google visualization.
http://politwitter.ca/page/election_fever

I did some major backend work to allow the site to start tracking MPs & MLAs that are not on Twitter but do have other social networks. Previously everything was tied to a twitter username, so I wasn’t able to add MPs without Twitter.

Along with that I started creating new directory pages to list the politicians on other social networks than Twitter
Facebook: http://politwitter.ca/directory/facebook
Youtube: http://politwitter.ca/directory/youtube/mp/house

Also related are the new ‘profile overview’ pages for tracked users, which give a summary of all their social media content indexed by Politwitter. Example: http://politwitter.ca/profile/joycemurray
I’ve also added ‘Klout’ score to all MPs profiles.

I started populating the stats page on MPs profiles, here is an example: http://politwitter.ca/page/userstats/user/MinJK

There is now a “Bills & Votes” landing page http://politwitter.ca/page/bills and I’m working on indexing all tweets relating to any bill in parliament, then listing all the bills with related tweets.

The MP & Riding search was also improved. You can enter an MP or MLAs name, riding name or a postal code and get a list of MPs and ridings that match.
Example: http://politwitter.ca/mp_search.php?search_mp=Peter

————————————————————————–

And finally I added a new blog post asking for Donations to help fund the continuing development, upkeep and hosting of Politwitter.ca

Read the post here: http://politwitter.ca/blog/14/call-for-donations
Donate here: http://politwitter.ca/page/donate