cosmos-api | applications built on the Cosmos SDK | SDK library
kandi X-RAY | cosmos-api Summary
kandi X-RAY | cosmos-api Summary
Cosmos API is a library for interacting with applications built on the Cosmos SDK.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Format a raw transaction body for sending
cosmos-api Key Features
cosmos-api Examples and Code Snippets
Community Discussions
Trending Discussions on cosmos-api
QUESTION
I just looked a bit around in the source code of spotify and found this line of code:
var ALBUM_URI = 'hm://album/v1/album-app/album/';
And I was wondering what this hm://
protocol is. Unfortunately, I didn't find anything on google.
ANSWER
Answered 2017-Mar-16 at 16:55hm is short hermes, a protocol used internally between servers at Spotify. It is basically zeromq with a protobuf envelope with some defined headers.
So, kind of like HTTP define verbs and structure on-top of TCP, Hermes define verbs and structure on-top of zeromq. It is used for HTTP-like Request/Response as well as Publish/Subscribe. For instance, in the example you found, a client request data about an album and waits for a response. Another example could be a client subscribing to events about a playlist. The moment someone publishes a change to the playlist, the client will know.
It gets extra complicated in the example you found. It seems to be a javascript snippet found in the Spotify web player. Javascript in the browser can of course not talk this protocol, so because you see the uri there, it means there is some kind of tunneling going on as well.
In one sense, it can do more than HTTP, but in another sense, it is much simpler because of the limited use. It was built many years ago, before HTTP/2 and grpc. It is still used heavily at Spotify.
I found a thesis work and an industry article that mentioned hermes in more detail.
http://www.diva-portal.org/smash/get/diva2:706244/FULLTEXT01.pdf https://www.csc.kth.se/~gkreitz/spotifypubsub/spotifypubsub.pdf
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cosmos-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page