Flash Media Interactive Server with MogileFS - flv

Is it possible to get Flash Media Interactive Server working in conjunction with MogileFS? What it boils down to is that I need FMIS to fetch the FLV files from MogileFS over HTTP. As far as I can tell, however, the FMIS can only fetch and stream files from a local store :/
Anyone have experience with this or other ideas?
Thanks!

You can use a psuedo streaming setup using the PHP xmoov script, then fetch the needed bytes of the files from MogileFS using PHP, and then push them to the client one chuck at the time.

Related

Flex mobile project for IOS, server side proxy

I am trying to write an iphone app that loads a video from an inbuilt web server running off a camera (connect to iphone via wifi).
I am using flash builder / flex mobile project - not particularly familiar but finding it easier to understand than xcode !!
The files from the camera have the wrong file extension so will not play on the ios video app, can I set up a server side proxy in flex mobile and use this to alter the file extension and then pass this link to the ios video app ?
If so any help anybody could give me ( examples etc) would be really grateful received , I have been trying to get round this problem for a couple of weeks .
Cheers
Toby
I can explain, conceptually, what a server side proxy would do in this case. Let's say you are retrieving a URL, like this:
http://myserver.com/somethingSomething/DarkSide/
to retrieve a video stream from the server. You say it won't be played because there is no file extension; so you have to, in essence, use a different URL with the extension. Set up 'search engine friendly' URLs on the server. And do something like this:
http://myserver.com/myProxy.cfm/streamURL/somethingSomething%5CDarkSide/Name/myProxyVid.mp4
Here is some information on how to deal with Search Engine Friendly URLs in ColdFusion. Here is some information on how to deal with Search Engine Friendly URls in PHP. I'm sure Other technologies will come up in a Google Search.
In the URL above; this is what you have:
http://myserver.com/: This is your server
myProxy.cfm: This is your server side file; that is a proxy
streamURL/somethingSomething%5CDarkSide/Name/myProxyVid.mp4: This is the query string. It consists of two name value pairs. The first is the streamURL. This is the URL you want to retrieve with your proxy. The second is just random; but as long as it ends with the file extension .mp4 the URL should be seen as an 'mp4 file'
The code behind your myProxy.cfm should be something like this, in psuedo-code:
Parse URL Query String
Retrieve Stream.
Set mimeType on return value.
Return stream data
I used a similar approach on TheFlexShow.com to track the number of people who watch our screencast on-line vs downloading it first. I also used the same approach to keep track of impressions of advertiser's banner ads. For example, the browser can't tell that this is not a JPG image:
http://www.theflexshow.com/blog/mediaDisplay.cfm?mediaid=51
Based on this, and one of your previous questions; I am not convinced this is the best solution, though. I make a lot of assumptions here. I assume that the problem with playing the file does relate to the extension and not the file data. I assume that you are not actually streaming video with an open connection on both client and server to send data back and forth.

sync Contacts between iPhone(also Android) and server

I am in trouble and Need your help.
1st Question:
My IOS app has to send/receive datas to/from a Web Server.
The server defined using the TCP and the data format is TLV; I have never used TLV before, and have no idea how to solve this problem.
As for TCP, I decide to use cocoaAsyncSocket, it's simple to deal with TCP transports;
But I send/receive datas all in the (NSData*) format, I don't know if the server can decode
it correctly.
2nd Question:
I am also trying to sync Contacts between local client and the server; the local client will be IOS app and Android app. Through I decide using vCard as the contacts' data format, but the vCard from iPhone contains some items(such as RelatedName) that not contained in Android; When I using vCard, there are some data lose, I can't solve this problem. Is there any good suggestion?
Somebody help me. Best regards.
=========================
Finally, I decided to use cocoaAsyncScoket for transporting data and use SQLite for storing contacts's all data; And it seems avoiding data lose is not possible.
I completed it.
I used the GCDAsyncSocket lib to send & receive datas;
As for TLV, just send the raw bytes in order under the custom defined rules will be fine.
The lib in github

Limit File Upload Size on client side GWT only

Is there any provision in which i can limit my file upload to some limt ?
I'm using FileUploadField in my GWT screen.
Is there any way i can apply some check that only allows me to upload file max. upto 10MB only ?
TIA !
That is the job of the server. Javascript (and thus abstractions of Javascript such as GWT) are not allowed access to the file being uploaded. The server side should check the file side and throw an exception.
According to http://www.artofsolving.com/node/50 finding the error client side is tricky. You have to actually parse the html results in the iframe used for the upload in the onSubmitComplete event.
As the above answer stated It is not able to be done due to security. It is possible via ActiveX but I am in no way recommending that.
So you can not have a way to check it front end but you could make it seem like it.
Your servlet in this instance would use a push technology such as Comet to send the status of that file such as too big or completed back to the UI.

Easiest technic for syncing files

I am developing an iphone application and I don't know which would be the best approach to sync data between the application and a server.
I'd like to work with data in my application even if there is no internet connection, and sync the data when the device reconnects.
First I thought of using a local database, but I have no idea how to sync the records. At least, I can't imagine an easy way to do it.
How could I sync a local database to a remote one?
Should I think in using files (like json or xml) to store my data instead?
How would I sync files?
Thanks.

Is there any way to allow failed uploads to resume with a Perl CGI script?

The application is simple, an HTML form that posts to a Perl script. The problem is we sometimes have our customers upload very large files (gt 500mb) and their internet connections can be unreliable at times.
Is there any way to resume a failed transfer like in WinSCP or is this something that can't be done without support for it in the client?
AFAIK, it must be supported by the client. Basically, the client and the server need to negotiate which parts of the file (likely defined as parts in "multipart/form-data" POST) have already been uploaded, and then the server code needs to be able to merge newly uploaded data with existing one.
The best solution is to have custom uploader code, usually implemented in Java though I think this may be possible in Flash as well. You might be even able to do this via JavaScript - see 2 sections with examples below
Here's an example of how Google did it with YouTube: http://code.google.com/apis/youtube/2.0/developers_guide_protocol_resumable_uploads.html
It uses "308 Resume Incomplete" HTTP response which sends range: bytes=0-408 header from the server to indicate what was already uploaded.
For additional ideas on the topic:
http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal
Someone implemented this using Google Gears on calient side and PHP on server side (the latter you can easily port to Perl)
http://michaelshadle.com/2008/11/26/updates-on-the-http-file-upload-front/
http://michaelshadle.com/2008/12/03/updates-on-the-http-file-upload-front-part-2/
It's a shame that your clients can't use ftp uploading, since this already includes abilities like that. There is also "chunked transfer encoding" in HTTP. I don't know what Perl modules might support it already.