Online music Streaming with GWT
I need to develop an application that is hosted in Google App Engine and access mysql database that is hosted in separate server which is not enable RMI or tomcat installed. Data(music files) stored in same server and for music files paths are stored in开发者_StackOverflow中文版 mysql database. Users can select music category and play them.
Just like - http://www.the-music-collective.com/listen/MP3Player.html ![alt text][1]
My questions are,
- What technology I can use to access the mysql database?
- Can I upload music files to the server via client interface?
The site you mentioned is using this javascript library:
http://www.schillmania.com/projects/soundmanager2/
and it's wrapped with GWT by JSNI or by library mentioned by stan229:
http://code.google.com/p/gwt-sound
You can read more about this here:
http://googlewebtoolkit.blogspot.com/2009/03/giving-your-gwt-application-voice.html
Add 1) According to this two questions:
Can I use a MySQL database with an App Engine application
and this:
App Engine and MySQL
you can't connect to a mysql database directly, but you can expose web service that will connect you with db.
Add 2) Yes you can upload any files through client. You can use this widget:
com.google.gwt.user.client.ui.FileUpload
or this library:
http://code.google.com/p/gwt-upload/
Well, you need something server-side. Why not PHP? Will they let you have PHP on that server? You could then write a simple script to give you feeds of data you need. Just be careful and secure it.
Regarding uploading music, you can handle this with PHP as well.
For the Client you will need something like GWT-Sound http://code.google.com/p/gwt-sound/ For the URL you would need to call some kind of server that returns the stream of data from mysql on a GET
精彩评论