At Nokia entertainment we provide music and books to millions of customers around the world every day. Join us for a peek behind the scenes into the architecture we use and how we survive at a global scale.
31. Thanks!
• Mark Pope • twitter.com/
tcoupland
• twitter.com/scobal
• github.com/
• github.com/scobal mantree
• Tom Coupland
Notas do Editor
Welcomes. Thanks for coming. We’re Tom and Mark. From Nokia. \nHere to talk about \ndeliver a global music service\nhow we built it with Java\n(Do we add in a story throughout to keep the ideas concrete)\n
Located in central Bristol \nDesign, build and maintain the service (pretty much exclusively)\nProvide music to millions of users around the world\nScaled/Served to around 1million downloads a day\nJava, windows phone, web\n
Talk through parts of our service\nTwo use cases:\nSearch and adding to Library (Find and own)\nMix radio and Delivery (New product called mix radio)\nFirst going to talk about high level architecture...\n
Multiple client platforms (win phone, web, symbian)\nSOA 3 years ago\nStruggling with single monolith, lots of clashing\nTeams work on groups of services\nBreak a use case down into a set of responsibilities. Service for each one.\nScale single components\nEAPI provides \nauth\nproxy for routing\ncommon api\nJSON over HTTP with REST\nTalk more about it later....\n
Think about how you buy music from a store.\nHow you might model the process in software.\nSo, we ended up with something a bit like like:\n\n\n
EAPI routes requests to Search service\n\n\n
So we’re now going to talk about Search\n
Why do we need this layer? Stateless. Built for high throughput.\nReturns track metadata, artist information, track names.\nLayer of abstraction above solr\nTalk internal language\nJava, Spring (Open Source, tool for building java software [IOC {breakout acronyms}, DI]), REST API over HTTP\nTwo servers for failover - key concept when building big things\n
\n
\n
What is solr? Solr is an Apache Open Source inverted full text indexer. So...\nWhy use solr instead of SQL?\nPut in documents containing artist and song information, get broken down into individual words, then indexes.\n\nsearch for “stone” -> Stone Roses, Joss Stone, Rolling Stones.\n\n3 servers: failover and scale requests\n
So, this how our search architecture works.\nSo....\n
You’ve found what you’re looking for. \nWhat’s the next step?\n
Well, you have to give us some money.\nWe’re not going to concentrate on this\n
We have to know what you own.\nPersonal collection of music/books\nHow to model this in software (when you have to store millions of users collections)\n(Collections can be ma-hou-sive)\nClients use this to obtain what a user owns, so you can see what you own on the clients\n
The familiar clients and api layer.\nRoutes to Library sub-system.\n\n
The familiar clients and api layer.\nRoutes to Library sub-system.\n\n
Why do we need to shard? Why not one big database (horizontal vs vertical [expensive] scaling) \nClone, copy, master-master\nEach shard replicated twice - failover and redundancy when building big things. Hot failover.\nThin service runs on 8 servers, 12 db servers, 6 sharding servers\nSpring and hibernate, Open Source. Open Source MySql.\n
Not really an intermission. We’re just half way through our slides.\n
Mix radio - product on Nokia Lumia phones for streaming free music.\nHand crafted - created by experts to suit mood and taste.\nMobile optimised - codec with great sound and small file size\nHow might you do this with software?\n\n
Back to our old friend EAPI.\nCan see the two paths - not going to talk about personalisation today\nLooking for curated radio stations\nThese are stored in a service called Catalogue\n
Catalogue is a big list of all the music and books we offer. Metadata store.\nAlso stores curated radio stations\nEAPI retrieves the radio station you selected (which the client will then play)\nHowever, take a quick look at this EAPI thing. What is it\n
Conceptually a thin layer - actually a bit more to it (because of it’s centralness)\nClient agnostic. Stateless. \nContinuous change, integration and delivery\nHighly modular allowing collaboration reducing checkin conflicts (with git).\nPairing, TDD.\nDanny and Neil talking in more detail later about how we work\n
Ok\n
How do we make noise come out of your phone\n
Sub-systems that make noise come out of your phone\nResponsible for \nmaking sure you’re licensed to download your selection\nactually serving up the location of the music or book\nadding images and meta-data to your download\nNAS for storing music + books - massive\n\n
So how big is this thing?\n
Mention VCDN. What is a (Content Delivery Network) CDN?\nContent Delivery Network, a big cache out in the cloud.\nPowers ‘most’ of the internet, act as caches for content.\nLocated all over the world, reduce load.\nGreat Firewall of China.\nStores our eaac32 formatted tracks.\n