CloudFlare–Dipping my Toes into the Water

by Michael Santoroski on April 18, 2012

I started playing with CloudFlare last week, since they promise to “super charge your website.” And would wouldn’t want that, right? Website load and response times has been a bit of an obsession with me lately, and CloudFlare looks like a great way to squeeze some additional marginal performance out of our site.

Content Delivery Network

The biggest benefit would seem to be leveraging CloudFlare’s CDN. This means they are putting content closer to the user, theoretically speeding up delivery times. Everyone from Google to Facebook to Amazon are setting up CDNs, so this seems like a smart choice.

Website Optimization

I have done pretty much all I can by hand, by constantly running Google Page Speed and following the recommendations. CloudFlare takes care of the rest, without having to worry about the heavy lifting.

Web Security

This I didn’t expect, but I think makes the service 100% worthwhile. They stop the bad guys from coming to your site. Like most places we have been hit by spammers and hackers, and I know that I would be sleep better at night knowing that someone is keeping them off our site.

You can see in their analytics exactly how many people are getting stopped, and it is remarkably high.

image

Baby steps

We have several hosted domains for blogs and such (this one, our campus news blog (rcnewsblog.com) and our IT blog (rcitblog.com), I have set up CloudFlare for all up off the blogs. I have been trying to use our Pingdom reports to see if I can see any significant changes, but am not finding the exact option that I am looking for. But it looks like load time went from about 6.46 seconds to 1.78 seconds. Which is pretty significant.

image

image

Next steps

Next I want to get it one some of our internal domains, starting with our mobile site at m.roanoke.edu

I would love to hear what other people are thinking about CloudFlare. Drop me some feedback in the comments.

{ 2 comments }

Facebook Connect + Coldfusion Using the Graph API

by Michael Santoroski on September 2, 2011

The new graphapi makes getting Facebook connect super easy, but putting all the pieces together is a little tough.

What you need to do is set-up the Facebook connect button, and let it save the cookies for you. From there you can get an access token, required to get information back from the API. You can use cfhttp calls and get JSON back.

Step one is to follow Facebook’s instructions to get the Javascript set-up for the Facebook Connect button, found here:

https://developers.facebook.com/docs/guides/web/#login

Note: You need to request the permissions that you want in the button HTML, for example ours looks like this:

<fb:login-button perms="email, user_education_history, friends_education_history, publish_stream, offline_access">

Once this is done, you can use some ColdFusion to read the cookie and get the accesstoken.

<cfset left = Find("access_token=",cookie.fbs_239625941285)+13>
  <cfset right = Find("&",cookie.fbs_239625941285,left+1)>

<cfset accessToken = Mid(cookie.fbs_239625941285,left,right-left)>

<cfoutput>Access Token = #accessToken#</cfoutput>

And to get the Facebook ID:


cfset left = Find("&uid=",cookie.fbs_239625941285)+5>
  <cfset len = len(cookie.fbs_239625941285)-left>

<cfset SESSION.FBID = mid(cookie.fbs_239625941285,left,len)>

<br><cfoutput>Facebook ID = #SESSION.FBID#</cfoutput>

The next thing is to use the Graph Explorer tool to find the syntax for what you want to pull:

https://developers.facebook.com/tools/explorer

For example to get e-mail we use the code:


<cfdump var="#cookie#">
  <cfhttp url="https://graph.facebook.com/100000929135466/?#accessToken#" method="get" /> 

        <cfset response = DeserializeJSON(cfhttp.filecontent) />

<cfoutput>

<p>email = #response.email#</p>

</cfoutput>

You can try an example here:

Example

And I have uploaded the CFM files here:

http://webapps.roanoke.edu/michael/fbconnect/facebookconnect.zip

Let me know if you have questions or comments!

{ 3 comments }

Drop Dead Simple SMS Notifications with Twilio

July 15, 2011

I have been working to replace our internal SMS notification system with one that was not dependent on our servers, power and applications being up. I found Twilio a while ago, but never had time to play with the service. Long story short, we finally got things up and running this week, and it really [...]

Read the full article →

New Features of Our Mobile Site–Coming Soon

April 28, 2011

We are working on add a new (third) row of icons to our mobile home site. Right now they are: Admissions Alumni Majors Awards But, of course this is subject to change. Check out some screen shots below, and hit up the comments link with your feedback. Admissions: Alumni: Majors: Awards:

Read the full article →

Fat Footer is Live

April 12, 2011

Our new Fat Footer went live yesterday afternoon. Check it out at http://www.roanoke.edu. I think it is a huge improvement, and has several features that I have wanted to implement for long time.

Read the full article →

Blog Upgrade

April 9, 2011

Just a quick note to let you know we have upgraded our blog to use Dreamhost’s VPS (Virtual Private Server) service. So far seems to be running much better.

Read the full article →

Video Responses to Facebook questions

April 5, 2011

Roanoke has several Facebook groups for prospective students and a very active group for accepted students.  We have current students help answer questions in these groups.  Lately, there have been lots of questions and my intern was spending lots of time writing lengthy replies. So, we decided to do video responses to their questions.  We [...]

Read the full article →

Roanoke is #22 on Top Social Media Colleges list

April 4, 2011

Roanoke College was named to the Top 100 Social Media Colleges list, published by Student Advisor.  We were ranked #22 to be exact and were the only school from Virginia in the top 25. We are in good company with Duke at #18, Brown at #20, Yale at #24 and Dartmouth at #25. Their comments [...]

Read the full article →

Fat Footer Moves Forward

March 29, 2011

I recently talked about doing a Fat Footer on our website. We got the comps back from New City and they look great! Also, I got the XML working for the Google Analytics “Popular Today” feature. I used the GA CFC from RIA Forge by Pete Alexandrou, and it worked perfect. I was able to [...]

Read the full article →

Fat Footer

March 4, 2011

We are looking at adding a fat footer to roanoke.edu My plan is to add the following content: About the college section, (this is something that I have wanted to add for years) Full address, and links to maps, directions and mobile Admissions phone, e-mail and top links “Popular Today” links from our Google analytics [...]

Read the full article →