Ayoka Application Development Services Blog

Real Time Web with SignalR and Comet

SignalR provides API for building real time web functionality in the ASP.NET applications. Real Time web functionality is the ability to have server side code push content to the connected clients as it happens in real time.

The most common examples of real time web applications are Facebook’s news feed and Twitter, or features like chat and search, where the user gets the notification in the browser’s document window as the event happens in the form of a message, alert, update, or link to an article with decreased server load time.

signalr, websocket

To do this, SignalR must take advantage of HTML5s API that includes WebSocket, which takes an advantage of several packet transports by automatically selecting the best available transport given the client and server’s best available transport. When the technology isn’t available, it will gracefully fall back to other techniques, making sure the application code remains the same. SignalR will use HTML5 to transport WebSockets, utilizing its bi-directional communication line between the client and the server with server-to-client RPC (Remote Procedure Call). The RPC allows an inter-process communication line to be opened and lets the code call a subroutine to be executed from a different client remotely without the developer having to execute the subroutine from a specific location or compromise load time. Unfortunately for the outdated client, WebSocket is only available in later versions of Internet Explorer, Google Chrome, and Firefox, with partial implementation ability on Safari and Opera. SignalR provides this RPC that call the JavaScript functions from .NET code on the client side. It also provides an API for connection management for grouping connections or connect and disconnect events. It starts out first as an HTTP, and is then promoted to a WebSocket if the bandwidth is available. WebSocket is the best use of (the small amount of) memory that will be allocated.

In comparison, the Comet web application model will support an HTTP request that is held open for a long period of time during which time the server can send data to the client without the client knowing it may need to request it. For Internet Explorer, the Forever Frame, which creates a hidden iFrame that opens a connection that acts as a one-way connection from the server to the client. To get back the other way, from client back to server, a standard HTML request is posted and a new connection must be created per data packet to be sent. For other browsers, Ajax is implemented to poll the server with a request that stays open until the server responds and closes the connection, instantiating a request to open another connection.

Monitoring how your packets are transported can positively or negatively impact your code reception by users accessing and using your real-time web environments through browsers. The most successful real-time web environments were able to adeptly anticipate and implement their users’ propensities and seamlessly integrate those practices to create a true real-time web environment that can be accessed from anywhere with any device.

How Has Heartbleed Hurt You?

If you’ve gotten an email requesting that you change your password from your Pinterest, Google, Facebook, Instagram, YouTube, Dropbox, or even your domain registrar, GoDaddy, then you’ve probably already heard of the OpenSSL’s Heartbleed bug. OpenSSL is the go-to open source cryptographic library and protects email servers, chat servers, and even Virtual Private Networks (VPN).

The Heartbleed bug got its name from the implementation of OpenSSL’s cryptographic security extension, called Heartbeat. Since it turned out that Heartbeat exposes serious vulnerability in the Secure Sockets Layer (SSL) of the Applications Layer in the Internet Protocol Suite, which is the designated protocol for providing and maintaining security on the Internet from the Hypertext Transport Protocol (HTTP) to HTTPS (the ‘S’ stands for secure), the bug was called Heartbleed. OpenSSL’s found vulnerability means that encryption keys, security certificates, user names, passwords, and other sensitive information on your favorite social media site, your company’s commerce site, sites you download software from, and even government registered sites are susceptible to their data being compromised. The most interesting part is that there is no trace logged when a breach was made from a malicious attack since the primary and secondary keys (the aforementioned encryption keys and other top-tier security information) were compromised, allowing the attacker to impersonate the compromised service. Not even certificate authentication can reduce the chance of a user being notified of the site being compromised. There is debate on whether or not the NSA has known of and exploited these vulnerabilities to collect account information on patrons of the affected sites, totaling as many as two-thirds of the websites on the Internet.

Heartbleed was actually brought to the attention of OpenSSL back in late 2011, but after rigorously testing the patch for leaks (including OpenSSL attacking themselves!), the patch has been made available as of the 7th of this month. This means that, to stop the leaks, vendors need to implement the fix and alert their users, hence why you may have received an email notification with a short synopsis of what Heartbleed is and a suggestion to change your passwords. Service providers and users themselves need to install the fix as it becomes available to their operating systems and software they use.

Microsoft Finally Drops IE6, so What Browsers are Popular?

With cross-platform browsing becoming more and more relevant, Microsoft dropped support for IE6 after usage in the US dropped below 1%. This begs two questions: Who was using IE6 for so long, and what are browsers are being utilized now? Chrome is definitely on the up and up, being utilized by over 40% of users, and IE11 is declining as 2013 ends, which is coincidentally when users started to use Chrome and other browsers more often. Firefox use has been consistent, showing some decline through the end of 2013 and making a comeback in the first quarter of 2014. Safari is showing some growth at the last quarter of 2013 and continues to increase through the first quarter of 2014, although it’s not as significant as the other three browsers. The combined others, illustrated as the dotted line, are barely above the 0% mark, which is still above Opera usage. Opera seems to keep changing the use of its User Agent string, which names the browser the user is in, making it difficult to properly identify what browser is officially being used, slightly skewing the statistical results.


It seems like with the decline of Internet Explorer comes the burgeon of the other browsers: Chrome, Firefox and Safari. Other users are taking the initiative and choosing a browser more fitting to them rather than use the familiar IE. The desktop operating system usually dictates what browsers are utilized by the user. For instance, the Safari browsing application comes on all iOS desktops, laptops, and devices, while Internet Explorer is the default browsing application for Windows Operating System. Internet Explorer is fighting its own previous versions, like IE6-IE8, since a lot of desktop users are set in their (outdated) operating system, such as Windows XP, which ultimately impairs the growth of usage of their newer browsers.

Desktop internet usage is at 76%, bringing Mobile internet usage to account for the other 24%. Mobile internet usage is increasing and with different mobile browsing applications hitting the market as well as devices coming equipped with browsing applications themselves, the game will be changed for classic internet browsers altogether.


150x Faster than its Competitors, Google Fiber Zooms to Austin!

Austin, Texas is known as a creative hub of musicians, artists, and techies, and is home of the University of Texas. Its habitants are always on the move and eager to take on new experiences, like the food trucks or Pedi-cabs! It’s no wonder why Google named Austin as one of the first cities for implementation of its new fiber-optic Internet Service, Google Fiber.
google fiber austin texas speed
Google’s goal is to integrate home internet service with mobile cellular service as a Mobile Virtual Network Operator (MVNO) that will span across the area giving public institutions like schools, libraries, hospitals, and other non-profit organizations selected by the city, up to a Gigabit (that is about 1000Mbps) of bandwidth for free and will be coined as a ‘Community Connection.’ Small businesses will have the opportunity to take advantage of the affordable high-speed service in 2014 before it will finally be released to Austin’s residents mid-2014.

What does this amount of bandwidth offered by Google Fiber mean for the existing Internet Service Providers (ISPs) like Time Warner Cable and AT&T that offer 15Mbps as a standard bandwidth? Well, they seem to be lowering their prices and upping their standard bandwidth in an attempt to retain their existing customers, as well as make a point to commit other Austin residents to their service before Google Fiber hits the local market.

Google Fiber is being laid down in Austin, unlike Provo (another chosen area for Google Fiber implementation), where they purchased an existing fiber-optic network that needed upgrading. Not only is Google’s implementation of such a high bandwidth in the community a kind of self-serving cause from a business standpoint, but it is also pushing growth and endorses the future of technology, ultimately benefiting us as a society. This carefully planned implementation of new Google Fiber in the Austin-area fills the residents with feelings of excitement and anticipation, leaving us in Dallas wondering when it will come our way!

Feedback Loops? They freaking work!!!

I had no idea how much until I got my Fitbit earlier this year. If you’re not familiar with Fitbit, it’s basically a little slave-driving purveyor of guilt that you wear on your wrist, pushing you all throughout the day to constantly do more, more, more…

Trust me, this is a good thing.

Elevator? Nah, I’ll take the stairs. Gotta feed the Fitbit! Ooh, front row parking spot?! Nah, I’ll take this one at the very back of the lot. Gotta feed Fitbit! 10:30, time for bed. But first, I need to walk around the block. I haven’t quite hit my goal for the day. And… wait for it… I gotta feed Fitbit!!!

In case you don’t know and haven’t figured it out, Fitbit feasts on steps. And the more the better. At its heart, Fitbit is a really, really good pedometer. But the power is in the app, where you get the feedback. How many steps did I take? How many flights did I climb? How many minutes was I “Very Active?” Did I hit my distance goal?
fitbit app mobile dashboard metrics
Thing is, this only matters if it is a metric that you care to change. I could probably find a way to track how many keystrokes I have in a day; but I don’t care. That’s not something I’m trying to increase (or decrease).

But I do care about being more active, taking more steps; and frequent feedback on that helps me do better.

So, think of something you want to improve. Track it. Get feedback on it. A LOT. You might like what happens next.

Yesterday, I parked close and took the elevator. I’m not proud of it, but it’s true. You see, Fitbit was at home on my bathroom counter and wouldn’t know any better…

In Development Nothing is Certain…Except Paper.

In this world nothing can be said to be certain, except death and taxes. Benjamin Franklin is credited with this line to a letter to Jean-Baptiste Leroy in 1789.

I’ve learned that in the world of software development we could create a similar phrase about bugs and printable forms. No matter how far removed our society attempts to move away from printing paper, organizations, companies and government entities hold on to the idea that having a physical piece of paper in hand, means more. What this means in to developers is finding a way to take whatever you create electronically and be able to print it in a nice, readable format; sometimes under very strict formatting guidelines.
paper to electronic form
When this happens, I have found that using a library that allows print to PDF an extremely helpful tool. Currently, my favorite is called iTextSharp, which can be found through nuGet or through a download at source forge.

iTextSharp gives you a vast array of options when creating your PDF and I have had projects where we’ve done all of it: building html from scratch (which is slightly difficult due to the lack of CSS control), building reports and charts while working with MS Chart Control, over writing background images and simply editing an editable PDF. The last one, for me has proven the most helpful, especially in those forms where those strict guidelines exist.

The use of Adobe Live Cycle Enterprise Suite alongside iTextSharp cuts what used to be a painstaking process in half. You can take any PDF into Live Cycle and draw each type of input field (text box, text area, check boxes, radio buttons, etc.), label them and then in your back end code you can recall all of those fields and map them to data with iTextSharp. The final product is the exact form, in the exact format the client needs without the need for recreation or the time and effort to plot coordinates on a background image to try and match where data should go. Of course, you or your client still have to dedicate the time to creating the editable PDF, but it’s a pittance compared to other options I’ve found.

iTextSharp is far from perfect, but it goes a long way in taking a difficult, and certain task (in the software world) and making it much more manageable.

The Battle for the Cloud!

In this corner we have Microsoft, in this corner we have Amazon, and in our final corner is Google. Yowza the big boys are at it again. And yes I know there are not 3 corners in a boxing match…work with me people!
Google Micrsoft Amazon Cloud Battle
Despite its hype, the cloud still accounts for just 4.8% of the overall enterprise IT spend. Gartner estimates the worldwide market for public cloud services for 2013 to be at $129billion, representing less than 5% of the total IT market of $2.7trillion in 2013. Now that is something to fight over!

Amazon Web Services (AWS), the incumbent, is losing traction as Google and Windows Azure convince large enterprise clients access to their private, public and hybrid cloud offerings. Google recently cut storage prices for the second time in a week. This only a day after Amazon cut its S3 storage prices by 25 percent. Hit’em in the pocket boys, just keep it above the belt!

Microsoft on the other hand has some work to do to keep up with the competition. They no longer can be stuck in Windows world. They are working feverishly to welcome non-Windows-oriented toolsets and languages. The rumored launch of Office for the iPad could help put to rest the Windows only mindset that Microsoft has embraced for decades. Way to come out of the box Microsft, hope it isn’t too late the fight started years ago!

So how will this battle pan out? Only time will tell. But isn’t it fun to watch these megalomaniacs fight to the bitter end!  Okay not the bitter end because let’s get real…they all win in the end!

Smartphones for Dinner?

Recently I was having dinner with a few friends and I noticed that every five seconds someone was looking at their phone.  Needless to say I was not pleased! Really, people? You can’t take a break from social media for an hour to have a cocktail and a bite to eat! What the h**% is this world coming to! Now I expect this behavior from, what I will call the “young kids”, but from grown adults this seems a little juvenile.
people checking phones at dinner
While writing this blog I came across an awesome movie that makes my point better than I can. Take a look and judge for yourself…This is adult behavior…don’t get me started on children!

Dear goodness even our kids are addicted. I must admit that I am one of those parents who is guilty of handing my kids the phones to shut them up. It keeps them quite while I try to have an adult conversation. Desperate times require desperate measures…or so I have convinced myself! Now a days it is par for the course for kids starting at age two to have an iPad.  I feel like a freak because my children do not each have an iPad. Sometimes I feel like I may be retarding their growth.

However, after doing my research I stumble upon this. This article really looks at both the pros and cons of young children using iPads, etc. I can see both sides, but for now my kids will continue to play with LEGOS instead of iPads. Except when I need to have an adult conversation.

Is the Smartwatch Really Smart or Just Dumb Fun?

According to Wikipedia a smartwatch, is a “computerized wristwatch with functionality that is enhanced beyond timekeeping, and is often comparable to a personal digital assistant (PDA) device.” Of course the almighty Google has its hands or should I say wrists all over the smartwatch revolution. Google has announced Android Wear, a version of its mobile operating system tailored for smartwatches and other wearable devices. Google is currently working with companies including Asus, HTC, LG, Samsung, Intel, Qualcomm, and Fossil Group to release Android Wear smart watches this year.

LG confirmed, after much speculation that they were were partnering with Google to design an Android smartwatch. The LG G Watch is expected to arrive in the second quarter of this year and will work with “a wide range of Android smartphones, this will be the key to the watch’s success.

Also on Tuesday Motorola, owned by Google, exhibited its upcoming smartwatch, the Moto 360, which also runs on Android Wear.  The buzz about the Moto 360 is intriguing based on the photos and description released on the 18th.  The watch not only keeps you on time, but also keeps you informed via subtle alerts and notifications allowing users to see who’s emailing or calling, the time of your next meeting is or a friend’s latest social post.  Moto 360 also responds to voice commands. Just saying “Ok Google” allows users to ask questions like who won a game or what time their flight leaves, etc.

So how smart is the smartwatch? Clearly not as smart as Google who partnered with all of the top technology companies by introducing Android Wear…but I digress! I was quite the skeptic of these smartwatches, especially since nobody wears a watch any more thanks to cellphones. However, I especially like the voice command…this feature makes me happy every time I use Google. But, I must admit that the watches look really sleek. So I guess the watches are pretty smart, but can we get some that look a bit more lady like…right sisters?

Apple FTW? Maybe…

Apple seems really, really determined to make their own maps app work in iOS 8. Why? Is this Apple arrogance? Are they simply embarrassed from getting their nose bloodied with Maps in iOS 6? What a disaster that was!

Google has maps absolutely nailed, wired tight as a Marine might say. That particular wheel has been invented. And refined. Why is Apple so insistent on reinventing it? A friend of mine speculates that they don’t have any new ideas. I couldn’t argue with him.

This brings me to my real point. Apple needs a big win. I mean BIG. They need to innovate, maybe revolutionize something. You can certainly question whether the iPad was innovative. After all, Apple didn’t create the tablet category. But they sure made it cool! You cannot, however, question that it was revolutionary… and a massive win.

So, what’s next, Apple? What do you have up your sleeve?

Surely Google and Samsung don’t have ALL the great ideas…

Or should we keep an eye on the folks in Redmond?