title: Creating an audio streamer in Java - where to start?
body: <p>What I am looking to do is create a simple Java audio streaming server. To keep things simple it will just be static MP3 files but I'm sure the theory transfers. Clients can be local or over Internet and can be any device or computer that can be programmed to communicate with the server.</p>
  
  <p>I have never programmed anything related to streaming/networking or server/client before so I thought this would be a useful exercise to learn something new.</p>
  
  <p>Things I think there are to consider:</p>
  
  <ul>
  <li><p>Authentication of client - how will this be done, how will the server know that user is the intended user.</p></li>
  <li><p>There will be some sort of buffering on the client. When the client is reading from the buffer there will likely be a file lock on the cached buffer file, so I won't be able to simply append the new segment of the file to the end.</p></li>
  <li><p>How much of an MP3 file do you actually need to play it? Is it linear, so the first x KB contains all the information of the first y seconds of the music sounds.</p></li>
  <li><p>What size segments do I stream the file in?</p></li>
  <li><p>Is it possible to know how far you are through an MP3 file in a stream? How would this be dealt with?</p></li>
  <li><p>What protocol to I actually use to stream? I'm assuming some sort of HTTP request would be best here? It is possible to do a HTTP Request over a port other than 80 isn't it?</p></li>
  <li><p>Does Java have inbuilt protocols for reliable transmission or do you have to get into the nitty-gritty and deal with sending packets back and forth with acknowledgements...etc...</p></li>
  <li><p>Is it possible to encrypt the traffic? With enough security for the file not being read, but not so much that low powered devices such as mobiles can't decrypt it fast enough for smooth playback.</p></li>
  </ul>
  
  <p>I am sure there are a lot more things I need to consider, but those are the other ones I can think of off the top of my head.</p>
  
  <p>I suppose in all the above there isn't really a question, it was more thinking aloud, so I guess why questions are: where do I start? are there any interesting reads? does anyone have any thoughts on the above?</p>
  
  <p>Just to reiterate, I AM looking at "re-inventing the wheel" here, I wanted to learn about this sort of stuff as I went along so I can transfer the knowledge onto other stuff.</p>