Need Help to dev PMS ?

General discussion about PS3 Media Server (no support or requests)

Re: Need Help to dev PMS ?

Postby ExSport » Wed Apr 29, 2009 5:52 pm

:roll: ....... it seems promissing :mrgreen:
Thanks for your effort, hope also it will be usefull for Shagrath, main coder of this app and that he will incorporate it to latest trunk if it will have good effect on function/stability/performance :twisted:
Many thanks!
ExSport
 
Posts: 2168
Joined: Mon Jan 19, 2009 5:40 pm

Re: Need Help to dev PMS ?

Postby shagrath » Wed Apr 29, 2009 7:40 pm

karatsu wrote:I've build a new path that delete all override uneaded so that the project can be dev on JDK 1.5 as it target to be

(sorry for my english but i'm french :D )


Hi, I'm looking at your previous patch, because I'm not thinking of downgrading to JDK 1.5 right now... some 1.6 features are used in the project, and there's already an automatic 1.5 compiler Ant script (osx/buildosx_java15.xml), usable on Windows and Linux I guess

btw, the executors usage is quite interesting, thank you... did you noticed that much leakage with the original source ?
shagrath
Project Lead
 
Posts: 2668
Joined: Wed Jan 14, 2009 1:39 pm

Re: Need Help to dev PMS ?

Postby karatsu » Wed Apr 29, 2009 8:50 pm

You are creating Thread and it's expensive in Memory and CPU, i'm changing it to runnable and threadPool that is lighter and allow the JVM to recycle better objects.

After changing all this, it seems that the buffer recycle by it self.

But the patch is making many change and i have to handle differently boolean that allow sync between the working thread and the thread that is checking that the first is not too long.

It's better not include actual patch and wait for the big one .. if i'm getting late, i will handle the merge between your upgrade and mine.

To check that it's better with my modif than without .. i'm checking cpu/memory/classes count on JConsole

but do you have usual test ou file test to check no reg ? :evil:
karatsu
 
Posts: 15
Joined: Mon Apr 20, 2009 8:45 am

Re: Need Help to dev PMS ?

Postby karatsu » Fri May 01, 2009 11:29 am

i've been working on better thread management

difference between the main version and mine:
- memory usage is more linear and cute by ~ 50% (memory used by PMS not external encoders, checked with jconsole)
- cpu usage is overall cute by ~ 20% (cpu used by PMS not externel encoders, checked with jconsole)
- it seems that i introduced a bug because most things work excepte some time mencoded HD video (need help fixing it)

if someone can try it, to make it sure it's ok and maybe one time be integreted on the main version.

can you tell me:
- why don't you use httpservlet ?
- why don't you use log4j ?
- i haven't seen DAO pattern for sgbd ?
- connection and transaction with sgbd are all atomic but they can be global so less expensive
-
Attachments
patch-trunk-330.txt.zip
patch from trunk 330
(51.73 KiB) Downloaded 28 times
karatsu
 
Posts: 15
Joined: Mon Apr 20, 2009 8:45 am

Re: Need Help to dev PMS ?

Postby karatsu » Fri May 01, 2009 2:39 pm

i found the bug it's quite nothing .. just that HD video need more thread because of pipe and muxing .. so 10 is not enough .. i put 20 and everythink is ok :D
karatsu
 
Posts: 15
Joined: Mon Apr 20, 2009 8:45 am

Re: Need Help to dev PMS ?

Postby shagrath » Fri May 01, 2009 7:21 pm

karatsu wrote:i've been working on better thread management

difference between the main version and mine:
- memory usage is more linear and cute by ~ 50% (memory used by PMS not external encoders, checked with jconsole)
- cpu usage is overall cute by ~ 20% (cpu used by PMS not externel encoders, checked with jconsole)
- it seems that i introduced a bug because most things work excepte some time mencoded HD video (need help fixing it)

if someone can try it, to make it sure it's ok and maybe one time be integreted on the main version.
-


thanks for your help ! but the thing is you almost patched the whole project with the @override deletion :)
I'd like to keep this annotation, as the 1.5 downgrade is not really planned

can you tell me:
- why don't you use httpservlet ?
- why don't you use log4j ?
- i haven't seen DAO pattern for sgbd ?
- connection and transaction with sgbd are all atomic but they can be global so less expensive


The purpose was to make a lite/dirty program for myself (at first), and especially having FUN !
Using a DAO pattern in order to persist 20 fields at most is not my idea of fun :)

a logger library would be a good idea though (at least in order to use a daily rolling appender), but it's not really important
httpservlet means jetty or tomcat, quite heavy just for a file server. I would rather take the netty path (already done some tests, seems interesting)
shagrath
Project Lead
 
Posts: 2668
Joined: Wed Jan 14, 2009 1:39 pm

Re: Need Help to dev PMS ?

Postby karatsu » Fri May 01, 2009 8:03 pm

the override annotation that was not compatible with 1.5 was because they are not usefull because not true
this don't change the way things runs and you can use custom annotation or javadoc to see wich methode you have change

if you really wich i can re add the annotation or you are telling it's useless you won't accept this patch ?

having fun on project that's great .. httpservlet is not really usefull :D

i was asking for DAO only if you wish to have a true mediateque management

Netty seems interessting

is there a way to help you ?
karatsu
 
Posts: 15
Joined: Mon Apr 20, 2009 8:45 am

Re: Need Help to dev PMS ?

Postby WorldOfHurt » Fri May 01, 2009 8:39 pm

karatsu wrote:the override annotation that was not compatible with 1.5 was because they are not usefull because not true
this don't change the way things runs and you can use custom annotation or javadoc to see wich methode you have change

if you really wich i can re add the annotation or you are telling it's useless you won't accept this patch ?


I'm with shagrath on this one - just get java 6. The less changes made in a backward direction the better. 6 has been around quite a while now, is stable and useful, and is available on all the major OS.

karatsu wrote:having fun on project that's great .. httpservlet is not really usefull :D


Then why suggest it....? :?

karatsu wrote:i was asking for DAO only if you wish to have a true mediateque management


IMHO, DAO on a system this size is way overkill. The overhead and coding effort is not worth it. Keep it simple.
User avatar
WorldOfHurt
 
Posts: 252
Joined: Thu Mar 19, 2009 10:49 pm
Location: Winchester, UK

Re: Need Help to dev PMS ?

Postby karatsu » Fri May 01, 2009 9:44 pm

i don't know about you, but i'm a professionnal informaticien and quality, stability and maintenability is my guide line
your soft is working, is quite stable yet and it's technily impressive
but on the other side it has no comment, it's hard to handle ...

that's why i was asking about DAO or servlet.

i think we misunderstood about JRE 1.5/1.6 .... it runs and compile on both only deleting some annotation that are not use

the final word ? no need help or at least no mine ?
karatsu
 
Posts: 15
Joined: Mon Apr 20, 2009 8:45 am

Re: Need Help to dev PMS ?

Postby WorldOfHurt » Sat May 02, 2009 1:49 am

I am also a professional software engineer, who's been programming in Java since it was a glint in Gosling's eye. :geek:

As such, I hope my comments on this thread will be taken as advice from someone who's been there before, and only wants this project to succeed. @karatsu, I hope your efforts can benefit the PSM community, as you are obviously keen to help.

I practice the mantra of "tread lightly". If you are patching someone else's code, their rules are more important than yours.

Shagrath might have a different style to you, but he's the author, so respect his efforts. Your contribution is surely appreciated, but your starting point should be to change only as much as you need to to provide a tangible benefit.

Make a list of things you are going to fix. Document what each individual fix achieves. Implement each fix one patch at a time. And each patch must fix ONLY one problem, as far as possible using the current SVN baseline.

That way Shagrath can decide exactly what to include and when, without being overwhelmed by a sea of changes. And we can all benefit from your generous efforts. :D

Thanks for contributing, and in the best traditions of Open Source - long may it continue.
User avatar
WorldOfHurt
 
Posts: 252
Joined: Thu Mar 19, 2009 10:49 pm
Location: Winchester, UK

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest