I'm writing an application to help me manage my growing collection of retro game ROMs. I know there are lots of options and other programs out there that do this but I want to write my own.

My approach is to have a small 'server' app that runs continuously in the background. Its preferences can be accessed by clicking a taskbar or menubar icon. The server's role is to index all ROMs in a particular directory and populate a SQLite database with metadata. The server will also be in charge of launching (via the command line) the correct emulator for a chosen ROM.

A second application, the 'client' will be responsible for displaying the information about the ROMs (i.e. a visual browser) and for selecting which emulator to use to run it. I'm looking for the best way to communicate between the two. For instance, the client should be able to request all Super NES games currently indexed in the the 'platformer' genre and the server would return an XML formatted list that can be subsequently parsed. I'm looking for suggestions for the best approach to implement this. Although the server and my client will be written in Real Studio, I'm hoping that other people would be able to interface with the server (for instance from XBMC or Plex) using an API that I publish. This means that the format of communication needs to be a standard of some sort rather than a proprietary Real Software format (which is putting me off things like EasyTCPSocket).

I'm relatively new to networking so I don't want to start this project until I have a good idea of how to lay it out.

That's certainly a feature I'm considering implementing once I get the metadata scraping / managing side of things working. There will of course be issues of latency though (amongst many other technical hurdles!).

I would say that probably the easiest way to make your indexing app accessible over a socket would be to use a widely used data serialization format, RB supports XML and JSON so those would be good choices. Many, many other programming languages support one, the other or both of these formats, so if third-party clients are wanted, using one of these would make it much easier for the third parties.

As an example, here's a contrived JSON-based search protocol using a TCPSocket: