Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OfflineAnalyzer #10

Open
icedream opened this issue Mar 17, 2022 · 11 comments
Open

OfflineAnalyzer #10

icedream opened this issue Mar 17, 2022 · 11 comments

Comments

@icedream
Copy link
Owner

This seems to be a new service as of engine os 2.x. Did not analyze at all yet.

@honusz
Copy link

honusz commented Mar 17, 2022

Haven't been able to capture any activity that utilizes this service. Not even entirely sure what the function of it is.

It's possible, in a multiple device setup (eg 2x SC6000s), the device to which the Source is connected is able to utilize additional devices to share the load for track analysis.

Need to get a lan tap, or figure out some other way to capture traffic between my two SC6000s, which I hope will reveal what this service does.

@mhite
Copy link
Contributor

mhite commented Oct 1, 2022

Interesting to note, both the JC11 and OfflineAnalyzer software on the Prime 4 devices provide the FileTransfer service. I don't think SC devices offer an OfflineAnalyzer service proper. So this begs the question, is OfflineAnalyzer an actual service or a software ID?

@honusz
Copy link

honusz commented Oct 1, 2022

I don't think SC devices offer an OfflineAnalyzer service proper.

The SC6000s announce two OfflineAnalyzer devices. When I capture traffic between the two players, both OfflineAnalyzers offer FileTransfer service.

So this begs the question, is OfflineAnalyzer an actual service or a software ID?

I'd hypothesize that, when you connect media with unanalyzed files, the OfflineAnalyzers allow the second player (the one without the media connected) to utilize their processing power to analyze the media faster.
It would be a pretty elegant solution, maximize available resources considering >90% of the time, when one SC player is connected, a second one is present, and has the resources to spare.
As to why there are two services? I don't know enough about the SC topology, but separate processor for each layer?

Test would be to do a capture between two SC players, and connect media with a bunch of unanalyzed files. I'll try that when I get a chance.

@mhite
Copy link
Contributor

mhite commented Oct 2, 2022

I don't think SC devices offer an OfflineAnalyzer service proper.

The SC6000s announce two OfflineAnalyzer devices. When I capture traffic between the two players, both OfflineAnalyzers offer FileTransfer service.

Whoops! My bad. Thank you for the clarification.

So this begs the question, is OfflineAnalyzer an actual service or a software ID?

I realized I phrased this very very poorly.

I was thinking that perhaps OfflineAnalyzer, JC11, and JM08, JP07, etc. should be considered service registry endpoints. (The aforementioned are what we see advertised in DISCOVER_HOWDY UDP broadcast messages.) Clients can connect to these endpoints via TCP to request a list of registered services. In the case of the OfflineAnalyzer registry, FileTransfer is a registered service.

I'd hypothesize that, when you connect media with unanalyzed files, the OfflineAnalyzers allow the second player (the one without the media connected) to utilize their processing power to analyze the media faster. It would be a pretty elegant solution, maximize available resources considering >90% of the time, when one SC player is connected, a second one is present, and has the resources to spare. As to why there are two services? I don't know enough about the SC topology, but separate processor for each layer?

So it sounds like you hypothesize that OfflineAnalyzer accepts more than "service registry" enumerate commands. That would be very cool and makes a lot of sense!

Test would be to do a capture between two SC players, and connect media with a bunch of unanalyzed files. I'll try that when I get a chance.

Definitely would love to hear what you find out. If this is happening on a Prime4 between players, it is most certainly constrained to an internal bus or network. If you connect an SC player to a Prime, I do wonder if we would witness this sort of traffic on the network. (I am assuming you can pair additional SC players to a Prime2/4?)

@honusz
Copy link

honusz commented Oct 2, 2022

I was thinking that perhaps OfflineAnalyzer, JC11, and JM08, JP07, etc. should be considered service registry endpoints. (The aforementioned are what we see advertised in DISCOVER_HOWDY UDP broadcast messages.) Clients can connect to these endpoints via TCP to request a list of registered services. In the case of the OfflineAnalyzer registry, FileTransfer is a registered service.

Hmmm, I think I'm following your meaning. I suspect there's some reason why these are advertised as discrete devices, rather than just a different service on the main device.
Again this is just speculation, but I think it may be that the track analysis happens on a separate microcontroller, or some partitioned domain on the device. This would make sense as the analyzing happens in the background, and doesn't affect playback or anything on the device.
Which would make sense, and be an elegant solution for distributing the workload. Say you had four SC6000s connected, the player with the media just has to collect all the OfflineAnalyzer announcements (including it's own) and fire the tracks off to each one for analysis.

So it sounds like you hypothesize that OfflineAnalyzer accepts more than "service registry" enumerate commands. That would be very cool and makes a lot of sense!

I don't think it would need any other commands or special behaviour, I suspect FileTransfer is the only service it would need. If your device needs a file analyzed, it transfers the file to OfflineAnalyzer service, which analyses the track, then returns... A database record for the analyzed track? Something like that.

Definitely would love to hear what you find out. If this is happening on a Prime4, it is most certainly constrained to an internal bus or network. If you connect an SC player to a Prime, I do wonder if we would witness this sort of traffic on the network. (I am assuming you can pair additional SC players to a Prime?)

I assume you can as well, I think I've seen setups with 2x players and a Prime2 or 4. You might be able to have 4x Prime4s on a network and, while they wouldn't be able to interface player-wise, the unit sending tracks out for analysis could just fire off tracks round-robin style to every OfflineAnalyzer it can connect to.

@mhite
Copy link
Contributor

mhite commented Oct 3, 2022

Again this is just speculation, but I think it may be that the track analysis happens on a separate microcontroller, or some partitioned domain on the device. This would make sense as the analyzing happens in the background, and doesn't affect playback or anything on the device.

Makes sense! I like the hypothesis.

@honusz
Copy link

honusz commented Oct 3, 2022

@mhite Actually working on it right now.
Mixed results on OfflineAnalyzer, but I am looking at some Broadcast transmissions rn ;)

@honusz
Copy link

honusz commented Oct 3, 2022

@mhite So it definitely works kind of like how I suspected.
Player without the media attached is downloading tracks, and sending back SQL data.
It's a lot to go through, and I might need to attack it with fresh eyes later.
A few interesting notes:

  • OfflineAnalyzers communicate with OfflineAnalyzers, for sending files back and forth.
  • Both OfflineAnalyzer services are used I think., at least on one device. I need to colourize the wireshark capture a bit better tomorrow to get a better picture.
  • The Broadcast service seems to be an important part of this, telling the player that DB stuff has changed so it downloads again? Needs more examination.
  • The player can switch the database mode between Write-ahead log and journal? I don't really know enough about SQL, will have to look at more.

@icedream
Copy link
Owner Author

icedream commented Oct 3, 2022

Reference doc regarding SQLite write-ahead logging: https://sqlite.org/wal.html

@honusz
Copy link

honusz commented Oct 3, 2022

  • Both OfflineAnalyzer services are used I think., at least on one device. I need to colourize the wireshark capture a bit better tomorrow to get a better picture.

Nvm, it seems the OfflineAnalyzers are only used as additional FileTransfer services. I loaded a track on LayerA and LayerB on Player2 (without media connected), and it used it's two OfflineAnalyzer services to retrieve the MP3 from Player1's respective OfflineAnalyzers.
Which makes sense, it allows the players to have concurrent large file transfers without blocking the main FileTransfer Service.

I suppose a test would be to try and connect to the OfflineAnalyzer as a supplementary filetransfer service, and see if we can use that for retrieving tracks.

@mhite
Copy link
Contributor

mhite commented Oct 3, 2022

@honusz - I don't have great notes on this for the SC (since I don't have any), but does the jp07 (sc5000) and jp13 (sc6000) "service registry" endpoints also advertise FileTransfer (in addition to be advertised from their OfflineAnalyzer "service registry" endpoint)? In other words, FileTransfer is available via both JP07/JP13 and OfflineAnalyzer on a singe SC player?

If I'm understanding you correctly (and the aforementioned presence of two FileTransfer services on a single player is accurate), the following connections are established:

Player2/LayerA -> Player1/JP13/FileTransfer
Player2/LayerB -> Player1/OfflineAnalyzer/FileTransfer

Would love to see a diagram of your topology and some captures!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants