You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It

Preview:

DESCRIPTION

Cinchcast (aka BlogTalkRadio) is a startup in New York City.Using only a phone, you can broadcast your message globally to millions of listeners.Thousands of broadcasts are happening every day on topics ranging from technology to battling cancer.In this talk, we will discuss how we accomplished this, the technology behind it, and the challenges ahead.We will talk about what it's like building a startup in .NET and the techniques we have used to scale, such asHTML and donut caching, lazy loading of data, elastic search, as well as marrying telephony to the web stack.

Citation preview

You Too Can Be a Radio Host or How We Scaled a .NET Startup and Had Fun Doing it!

Aleksandr Yampolskiy and Rob Blackin

Who Are We?

Dr. Aleksandr Yampolskiy, CTO (alex@cinchcast.com)Previously head of security and compliance for Gilt Groupe companies, in charge of securing IT infrastructure, secure architecture, PCI/SOX compliance, etc. Various leadership roles in Goldman Sachs, Oracle, Microsoft building scalable, enterprise software for IDM, SSO, AuthN/AuthZ. Ph.D. in Crypto Tools for Efficient Distributed ComputingHobbies: chess, Edward Hopper, Ray Bradbury, martial arts, lately foosball and coffee.

• Rob Blackin, VP of Development and Operations (robblackin@cinchcast.com)• Previously Director of Development at IDT in charge of systems for

global businesses in 9 diff countries• CIO of VoiceNet subsidiary of Destia.• Hobbies: competitive volleyball player, as well as basketball, father of

3 girls and lately cranking out code at midnight.

Company Overview

• Cinchcast provides cloud-based software and services for creating, distributing, measuring and monetizing voice-based content• BlogTalkRadio is a consumer-based media property

Founded in 2006 ~30 Employees 10 of them in Tech HQ in New York, NY Millions of pageviews a

day Powering over 1,500

hours of content creation every day

Confidential © 2011 Cinchcast - All Rights Reserved 3

BlogTalkRadioOur Owned Media Property

The Cinchcast Platform

Confidential © 2011 Cinchcast - All Rights Reserved 5

DEMO TIME - LIVE

Confidential © 2011 Cinchcast - All Rights Reserved 6

Our Approach

• “Be brief, be bright, be gone”

• Don’t go chasing hot technologies of the day. Instead ‘mitigate your top problems’

• Achieve “essential”, then worry about “excellent”.

• Be a “how team” instead of a “no team”.

• Build security into the software development lifecycle.

Love And Other Drugs 

Current Technology Stack

.NET 3.5 C#Jenkins + NunitSauce On Demand - SeleniumGomez + NewRelic for monitoringJQueryASP.NET and MVC 3IIS 6SQL SERVER 2005Windows Server 2003 and 2008Red 5Asterisk, PactolusAiCacheAptimize

Development Environment

Visual Studio 2010StyleCop / Resharper experimentation.Scrum methodology for large features + adopting Kanban for various bug fixesJIRA for project management + GreenhopperSvn, Jenkins

Metrics

Not using metrics for your dev process is like landing a plane without any instruments in a storm.

Code coverageSite throughputNumber of critical security bugsTime to fix Blocker/Critical/Major JIRA issues.Percentage of developers using your site.Etc.

What Do Metrics Tell Us?

Architecture

BlogTalkRadio 2007

BlogTalkradio 2008

BlogTalkRadio 2009

BlogTalkRadio 2010

BlogTalkRadio 2011

Evolution Summary

• 2008 – Multiple web servers via Coyote LB and Scaleout for session state

• 2009 – Read Only databases through replication and aptimize for combining JS, CSS and Images on the fly.

• 2010 - aiCache for caching html, second farm on amazon for specific traffic, specializtion of web and database servers.

• 2011 – Contendo cdn, services framework, retired aptimize due to Continuous Integration process, Service broker queuing.

Telephony Overview

Cinch.fm Overview

Decoupling spaghetti code

Search Service

AuthN Service

AuthZ Service

Cache Service

• Decoupling key pieces of the code into separate services possibly written in diff languages.

• Can be used either as DLL imports or through RESTful calls on the network.

BlogTalkRadio Cinch.FM Cinchcast

Services

Based on Martin framework (https://github.com/thegrubbsian/Martin)Lightweight .NET framework mapping URLs to actions.Modified framework to reflect interfaces and automatically expose all their methods.

Service Philosophy

• RESTful model, using JSON• Not all data is relational, so database isn’t

always a good medium.- Logging is key to detecting problems.- Reinventing the wheel can be a good thing.

Elastic SearchOur first service is moving search off DB.Settled on Elastic Search (http://www.elasticsearch.org/ ) is based on top of LuceneA novel project. Unlike SOLR, it can handle real-time search applications.

Due to Ryan Sonnek

Elastic Search

Caching

“Donut caching” : caches most of the page except a few dynamic regions.

.Net caching via Fixed Expiration

myCache.Insert("LiveChatRooms", liveRooms, myDependency, DateTime.UtcNow.AddMinutes(2), Cache.NoSlidingExpiration);

.Net caching via Sql Dependency Expiration SqlCacheDependency myHDDependency = new SqlCacheDependency(DBName, "Genres"); myCache.Insert(DictionaryOfGenreEntityByID, myDictionary, myHDDependency);

Data Caching via Scaleout return DCacheSoss.GetObjectFromNamedCache(CacheName, UniqueKeyName);

CDN caching of JS, CSS and Images via Contendo and Limelight

HTML Caching via CDN – Contendo, Limelight, aiCache

Cool Tech Projects On the Horizon

Personalization of radio shows based on customer’s preferences.Build out of SOA Cinchcast platform from Python, .NET, Java components communicating as RESTFUL JSON-based servicesMoving real-time search to ElasticSearch (right now just for RSS/bots)Improving our caching layer performance (too many hit misses)A/B testing framework

Conclusion

• Architecture improvements are gradual and sometimes you make mistakes (e.g. Aptimize)

• Don’t chase hot technologies (e.g. MemCached mania). Sometimes reinventing the wheel is good.

• REST+JSON > SOAP+XML

• Be brief, be bright, be gone.

We’re Hiring. Why Work Here?• Well-funded profitable startup

used by millions.• Patent-pending radio tech

utilized in a new way.• Medical/dental/etc. benefits.• Great office space in mid-town

right near subway.• Flexible hours. Top-notch

compensation + stock options.

Open Positions:• Front-end Engineer • Sys Admin• Tech Lead

• If you are good we’ll find a role for you : jobs@cinchcast.com

Recommended