What language or technology was used to develop the Spotify desktop application?

Desktop ApplicationSpotify

Desktop Application Problem Overview


Does anybody know which language or technology was used to develop the Spotify desktop application? It's stable, good-looking and lightweight.

Desktop Application Solutions


Solution 1 - Desktop Application

From here: http://www.quora.com/What-is-the-technology-behind-the-Spotify-desktop-app
Dated: 2014-09-09

>Andreas Blixt, 5-year Spotify employee: > > The core of all our clients is C++, but that core has since Rasmus's > post gotten condensed, with functionality split out into modules. As > Spotify becomes available on more and more platforms as well as > getting a richer feature set, we need to ensure that "core" doesn't > become "a little bit of everything". This has meant breaking out > certain features, such as playback control, into their own separate > modules. These modules are still C++ but are self-contained enough > that their logic could theoretically be implemented in other > languages. We call the interface layer to these modules "Cosmos", and > it works in a way not too dissimilar from HTTP. Cosmos lets any part > of the client communicate with a module using arbitrary paths and > payloads, allowing for a much more flexible architecture. Some obvious > benefits are versioned interfaces (example: GET sp://player/v1/main > returns player state) and JSON for passing data around. This is > important for another change in our desktop client. > > A lot of our desktop UI these days is actually using Chromium Embedded > Framework (CEF), which basically means our views are powered by > JavaScript, HTML and CSS. For all of our feature teams to be able to > work on their features without fear of breaking someone else's view, > each view is sandboxed in their own "browser" (I guess you can think > of the views as tabs in Chrome, except we show more than one at a > time). This brings with it one restriction though: sharing data > between views gets more difficult. This is where Cosmos comes in and > really simplifies the communication between core (C++) and JavaScript > land: the JS clients can make arbitrary requests and if there's a > binding, that request gets handled and responded to. One example is > the "messages" endpoint which lets any view push JSON data out to any > other view that's listening (kind of like window.postMessage in HTML5, > except this one can also interface with C++ modules). This is also how > all the play buttons in the client know whether a track is playing or > not, or whether it's available offline (another Cosmos module), or > whether you've saved a song to your music. > > Another important change to our technology stack is that we've moved > some logic further "back", into view aggregation services. So where we > would before do almost all logic in the clients, only using the > backend as a data store, we now do much more work in a logic layer > between the data stores and the clients, exposing endpoints very > similar to Cosmos (in fact, you can call a backend the exact same way > you call a Cosmos module, so moving between layers is not a hassle). > The reason for this is two-fold: one, it lets us expand to more > platforms more quickly because there's less client logic to implement > and two, it really helps us keep our client behavior more consistent > and up-to-date because the client is more "stupid". To mitigate any > slowdown that might come from this we have ensured that there are > caching rules for all data, so that the client will still keep data > locally, it's just not responsible for as much business logic as it > used to be.

Solution 2 - Desktop Application

Here's the list of third-party components they use (on top of C++ of course):

  • Boost

  • Expat
    
  • FastDelegate

  • giflib

  •  libjpeg
    
  •  libogg
    
  •  libvorbis
    
  •  Mersenne Twister
    
  •  zlib
    
  •  NSIS (Windows only)
    
  •  Windows Template Library (Windows only)
    
  •  Growl (Max OS X only)
    
  •  MATrackingArea (Mac OS X only)
    

Solution 3 - Desktop Application

According to a Spotify designer:

http://twitter.com/#!/tobiasahlin/status/96483609799692288

"Some of it is in C++, and some of it is in a HTML-ish markup language called Spider" "It's built solely to be used within Spotify"

Solution 4 - Desktop Application

Spotify now uses the Chromium Embedded Framework (CEF) to display a web interface consisting of HTML/CSS/JavaScript within the desktop application.

Solution 5 - Desktop Application

From their website:

> Spotify is built mostly in Python and C++

Solution 6 - Desktop Application

Given it's running on windows, clearly not .NET (Process explorer is telling me that), didn't follow a AIR install process, I'd say C++ using cross platform libraries.

Everything is compiled down into one executable, which indicates they had access to the source of all dependencies.

W.r.t to Techno...i think they used Hardhouse Electronica

Solution 7 - Desktop Application

This answer is more updated and coming from their engineering blog: https://engineering.atspotify.com/2021/04/07/building-the-future-of-our-desktop-apps/

> The Spotify Desktop client is a Windows and Mac native application that uses CEF (Chromium Embedded Framework) to display a web-based user interface. That’s still true today, but for the previous version of Desktop, every “page” in the client was built as a standalone “app” to run inside its own iframe.

However, they recently had to update their architecture because they wanted to integrate their Web Player built with React and Desktop Client in a way that a single team can develop and ship features for both clients.

> The final architecture looks like a layer of Platform APIs that expose the underlying Spotify ecosystem to clients, with a React-based user interface and the Platform APIs exposed via React Hooks. Thus, the new UI can run on the web, and it can run in our Desktop container, and never know, or care, if the data is coming from our C++ stack or our web infrastructure.

Architecture Diagram

Solution 8 - Desktop Application

Check the first answer here: https://www.quora.com/What-is-the-technology-stack-behind-the-Spotify-web-client

Andreas Blixt who is a former Technology Lead at Spotify has answered it in details.

> We have a PHP layer that deals with logging in (and some other > server-side logic) as well as serving apps on different domains (for > security reasons). The rest is all JavaScript. > > For the JavaScript to communicate with the backend, it does so via > what we call an "access point" (AP), a highly optimized C++ service > which can handle lots of active connections at once. This service is > responsible for routing requests to the correct backend service. This > service is capable of running over ports 80 and 443 to overcome > firewall restrictions. The communication is done over WebSocket (or > Flash for some browsers). > > To communicate with specific backend services, we route the requests > through the AP using our own transport called "Hermes". This is > basically a URL scheme that lets the AP know where to send the > request. Payloads are encoded as Protobuf. Hermes has a nice caching > system (we call it "Mercury") that stores results to IndexedDB for > browsers that support it (we have the same system in the desktop > client, but instead implemented in C++), to avoid requesting the same > data twice. This is very useful for resources that get re-requested a > lot, such as artists, albums and tracks. > > For the UI we have written a pretty advanced application framework > (called "Stitch") for allowing every view to be developed > independently by different teams without having to worry about > breaking anything. The views run in a sandboxed

Solution 9 - Desktop Application

The frontend is written in FLEX, checkout the sources on your mac or windows machine. You will see a lot of xml file which are in the flex file format.

Off course the connection to the server and platform integration is probably written natively in c++. But the UI part is just FLEX...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiontomView Question on Stackoverflow
Solution 1 - Desktop ApplicationDaniel PView Answer on Stackoverflow
Solution 2 - Desktop ApplicationMahtarView Answer on Stackoverflow
Solution 3 - Desktop ApplicationBrian MathewsView Answer on Stackoverflow
Solution 4 - Desktop ApplicationKeavonView Answer on Stackoverflow
Solution 5 - Desktop ApplicationbhnyView Answer on Stackoverflow
Solution 6 - Desktop ApplicationCVertexView Answer on Stackoverflow
Solution 7 - Desktop ApplicationCesar SanchezView Answer on Stackoverflow
Solution 8 - Desktop ApplicationHossam MouradView Answer on Stackoverflow
Solution 9 - Desktop ApplicationTjerkWView Answer on Stackoverflow