catharsis / spotifile

FUSE file system for Spotify
BSD 3-Clause "New" or "Revised" License
144 stars 7 forks source link

Rework how we store and handle libspotify data #11

Closed catharsis closed 8 years ago

catharsis commented 9 years ago

Currently, there is just a bunch of void pointers being juggled about, which are casted appropriately depending on context. It works ok, but comes with a bunch of uncomfortable restrictions, such as not being able to update borrowed data client-side to reflect updates received from the server conveniently. Another issue is that the ownership of data is not clear. Currently this is dealt with by simply never freeing/deleting libspotify objects - an approach that is obviously flawed.

catharsis commented 9 years ago

It might be worthwhile to look into adding another level of indirection on top of libspotifys opaque types (with our own ditto) and handling allocation and frees through that.

As a side gain, that would also be beneficial if libspotify is eventually replaced by some other library, since it would serve to achieve better decoupling between the spotify code and the file system code.

catharsis commented 8 years ago

Nothing has happened with this, I'm closing it due to lack of activity on my part, since that probably means it doesn't hurt enough to worry about just yet.