you too can be a radio host or how we scaled a .net startup and had fun doing it

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

Upload: aleksandr-yampolskiy

Post on 11-Nov-2014

2.294 views

Category:

Technology


3 download

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.

TRANSCRIPT

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

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

Aleksandr Yampolskiy and Rob Blackin

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

Who Are We?

Dr. Aleksandr Yampolskiy, CTO ([email protected])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 ([email protected])• 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.

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

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

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

BlogTalkRadioOur Owned Media Property

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

The Cinchcast Platform

Confidential © 2011 Cinchcast - All Rights Reserved 5

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

DEMO TIME - LIVE

Confidential © 2011 Cinchcast - All Rights Reserved 6

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

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 

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

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

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

Development Environment

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

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

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.

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

What Do Metrics Tell Us?

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

Architecture

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

BlogTalkRadio 2007

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

BlogTalkradio 2008

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

BlogTalkRadio 2009

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

BlogTalkRadio 2010

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

BlogTalkRadio 2011

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

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.

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

Telephony Overview

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

Cinch.fm Overview

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

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

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

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.

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

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.

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

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

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

Elastic Search

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

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

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

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

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

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.

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

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 : [email protected]