« Back Issue #258
  • 2015-04-24 00:35 Reported by pooja
  • 2015-12-26 18:00 Marked fixed
Status: Marked fixed
Priority: Low

Video Updater Feature on multiple machine setting

pooja 2015-04-24 00:35

Using this feature when a mov or avi file is uploaded to any group page, it can be scheduled for conversion to mp4 format(supported by all browsers including mozilla). The slave media updater would request name server for the file to be converted and will convert and upload back to the server. Name server would be doing tasks like splitting and concatenating videos.

pooja 2015-04-24 01:38

Hello Dr. Pollett,

Please have a look at patch and let me know your suggestions,if any.

Thanks, Pooja

P.S. In this patch, I have also included the UI change for the manage machine page, where name server is seen in both the cases - 'Name Server' as well as 'Distributed'.

administrator 2015-04-24 11:25

Hey Pooja,

Thanks for your patch! Looking at the patch, there seems to be a lot of echo statements that might have been there for debugging. If you want them to appear in the log switch them to crawlLogs; otherwise, remove them. Also, there are still some whitespace issues. Function names should be meaningful and start with a lower case letter (you have a function Convert). Please revise your patch and submit a new one.

Best, Chris

pooja 2015-04-26 19:06

Hello Dr. Pollett,

I have incorporated the suggested changes in this new patch (My2.patch). Please have a look, if there are still any issues we can discuss those in tomorrow's meeting.

Thanks, Pooja

pooja 2015-04-30 12:57

Hello Dr. Pollett,

I have incorporated the suggested changes in this new patch (My3.patch). Please scroll down to view the recent patch (starts at line no 801). Please have a look at it and let me know if there are still anymore chnages to be done.

Thanks, Pooja

administrator 2015-05-06 00:59

Okay. Your patch has been applied. Congratulations! I've since gone through the code to do an initial pass at cleaning it up. I've tested my changes on a Mac. Test it on a PC. Also, I want you to test how the code behaves under a variety of crashes of the media_updaters.php . It should fail gracefully. Neither the NAME SERVER nor slaves should end up with dummy files that never get erased. The code also needs to generate a thumb nail for the newly created mp4. Common string names should be consolidated to an interface implemented by both the media updater, resource and crawl controllers. Make these changes and a new patch and the issue can be closed.

Best, Chris

pooja 2015-05-08 16:48

Hello Dr. Pollett,

I have attached new patch(my4.patch) with suggested changes. I still have one question in this. I will discuss that with you on Monday. Thumbnail(png) is being created using already written function.

This patch also contains mail distribution code for name server.I have tasted code separately and it works. I am still working on distributing it but I am stuck at a point.Will discuss that on monday again. Please let me know if you want me to create separate issue for mail distribution.

Please let me know if you still have any issues with this patch.

Thanks, Pooja

administrator 2015-05-09 12:38

Hi Pooja,

Thanks for the code! Can you describe briefly for each change I said above, how you addressed the issue in your changes? For example, I can't tell if you addressed the issue of leaving stray files around. You should have constants for "/ready_to_assemble.txt", "/file_info.txt". "/concatenated.txt", "/count.txt". You can add these after we talk on Monday. I've pushed my4.patch as it seems like it does go in the correct direction, but maybe we need to make a couple more minor changes.

I think we could really kick this up a notch by adding a notion of a MediaJob. The media updater would dynamically load jobs when it boots. Jobs would have three kinds of methods: Those that should be run by the media updater, those that should be run by the crawl_controller, and those that should be run by the resource_controller. When checking for a valid activity the controllers would check a $_REQUEST['job'] variable to see if the method belongs to a job of the Yioop instance, then check if the activity belongs to the activities set up by that job.

pooja 2015-05-09 12:54

Hello Dr. Pollett,

I added only the folders to the media_constants file. I can add the mentioned text files as well.I missed those. Regarding the stray files in the Name server, as I had mentioned I have a doubt about that since I was going through your code , you have made certain changes which I have to first discuss. I created the thumb file(png) using your already written function in concatenateVideos. I am cleaning up the slave media updater folders when it crashes(We had discussed this last week).

Regarding the MediaJob , I will clear any doubts if I have on monday and can create another patch on the same day.

Please let me know if you have any other issues in mail distribution code as well so I can include them in new patch.

Thanks, Pooja

administrator 2015-05-09 13:05

Thanks for the clarifications, Pooja. As I said, I pushed your changes to the repository, will continue testing them, and let you know if I see anything by Monday.

Best, Chris

administrator 2015-12-26 18:00

This has been fixed since mid 2015 -- just getting around to closing this issue. Thanks for your work Pooja!

pooja 2015-12-26 18:00
X