xPerT -- PervTalk plugin for Xlobby

Xlobby plugin development

Postby dalanik on Fri Aug 04, 2006 6:26 pm

OK, that's what I thought as 1 option. But why do they have to work through P3rvTalk?
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby P3rv3rt B3ar on Fri Aug 04, 2006 7:04 pm

dalanik wrote:OK, that's what I thought as 1 option. But why do they have to work through P3rvTalk?


As i already mentioned my first and original reason was avoiding coding with msvc# cause i dont have that, so basicly xP3rT was set to "forward" xlobby plugin interface to my softare trough TCP/IP so i could use whatever dev env i wanted. I had none of c# programming experience beforehand so i decided not to make c# program (xP3rT) to handle multiple connections, but decided to use more familiar plain win32 c++ to code hub which should handle multiple connections (be server)... This was original reason, but i had to do so much coding with xPerT that i developed my c# skills far enough that it wouldnt really matter. However i considered that architecturaly very smart choige on severalk reasons.
Here i tried to explain few good points of architechture:

- Allthough PervTalk is originally planned to XLobby (and currently support no other front end) nothing says it cant. All u have to do is code new device for new frontend. This is also my personally insurence... if Xlobby (god forbids) dies, gets bought by microsoft and gets killed for being competitor of MCE. My whole plugin architecture can be ported to other front end simply by making one device. Instead of making whole batch of new plugins.

- Also PervTalk makes possible communication between two different front end, running on different platforms... for example lets say my car client is running Freeway, upcoming FWd can get location information from GPS, transfer it to xPerT running on my livingroom pc via PervTalk and display my cars current location on map.

- PervTalks goal is to be universal plugin infrastucture, when traditionally every pair of software requires 1 plugin to integrate them... PervTalk only reguires one device per software... let make asumption we have five software which all should communicate together... with traditional approach it takes 10 plugins to make them truly inter connected... with PervTalk it only takes 5 devices... as u add software u very soon reach combinatorial explosion with old aproach.

- I think it already came clear that PervTalk will (thanx to TCP/IP stack, which is rather universal) extend Xlobby plugin interface to any software language, any operating system, and any host (plugins can run on separate host than XLobby) I have plans to port PervHub for Linux and Symbian at somepoint.

- Based on posts here there seems to be problems to communicating between separate XLobby plugins. If these plugins are implemented in PervTalk, there will be no such problems.

- Because of those problems ive been also thinking to implement something which i call FakeLobby Device... that would fool regular xlobby plugin to believe it is working together with Xlobby, but instead it is connected to Xlobby via PervTalk... this would not only make those problems gone, but also make it possible to run current plugins on different host than Xlobby is installed.

However keep in mind that parts of infrastucture mentioned here (FakeLobby, Freeway device, linux PervHub, symbian PervHub) are just on planning board, more immeadeate future are kXd and ZPd. But since u asked my motives i had to answer with visions... lets see how it goes.

Also if u or any other developer is interested to implement PervTalk device... ill reveal PervTalk protocol, and even better yet im currently writing PervTalk library, which is currently used by kXd, its not complete yet but when it is ill be releasing it for devs to quickly implement PervTalk devices.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Fri Aug 04, 2006 7:28 pm

Also Dalanik, it doesnt have to be hard to enduser... currently everything works totally transparent after theyve been setup... avarage user cant tell when starting XLobby that theres already XPerT, PervHub, And some devices running. Even setting up can be easy for end user with installer developed by french team i believe.

But as u can notice from my first post im not targeting this set of programs (directly) for end users, but skinners and power users instead. Theres no reason to try to wrap this setup to nice package before some skinner takes it up and makes a skin which takes advantages of it... surely i have my own adaptation of Dragon skin but im rather power user noway to classify me as skinner. Before that happens, i believe xPerT is beyond capabilities of your avarage end user.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby abobader on Fri Aug 04, 2006 8:19 pm

Hi P3rv3rt B3ar,

I read this thread like 20 times now, still confuse tho on how these work you doing will be apply, but here what I come some far as my understanding (please notice, I am as well my English lanaguge not even the second one).

XPerT actully a device plugin need on the server/clint, listening/acting for another devices that you working on, let give example name as XpertD1 and this as Server1.

PervHub on Server0, that will as will link all action requested (sharing or whatever), from Server/cleint name above (Server1) to another Server/client as to give it ecample name as (Server2).

So the PervHub, actully the "hub" to link all the devices/plugins, like controller issue, expanding and a like.

Is my understing near this or still not near the issue yet?

Eitherway, sound alots og good work here, and many thanks for the effort you been doing to explain here (evern tho still many not clear to me).

My best.
abobader
 
Posts: 142
Joined: Fri Apr 21, 2006 5:08 pm

Postby P3rv3rt B3ar on Fri Aug 04, 2006 9:00 pm

What i gather here... i think your understanding is pretty much correct. I wanted to do a picture, but i only have paint installed... and my hand written work on tablet is even worse :)

But basicly u can think PervTalk as a circle with layers, and in the middle of all (inner layer) is PervHub, it communicates with devices on second layer like (ZPd, kXd, and xPerT) and on outer layer are all these regular applications like (Zoom player, XLobby, kX drivers), which connect to PervHub trough corresponding device, devices are kind of translators if u will... they translate native languages spoken by applications and turn it to PervTalk which is language understanded by PervHub... This way PervHub quarantees that all software can talk together.

Currently all this happens inside one host. current version of PervHub is not capable to talk with other pervhubs running on other hosts... but this is upcoming development, theres certain factors i need to implement before i can allow this. For example i wanna make it possible to encrypt all interhost communications, even though first version of networked PervHub will be planned to run only in trusted LAN... but since somelinks might be over the air, i want to give possibility to encrypt the traffic.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby abobader on Mon Aug 07, 2006 3:17 am

This is then a whole project than a plugin!

Great new open will be possible with this when it done, P3rv3rt B3ar keep the good job up, many thanks in advanced for you dedicated work.

My best.
abobader
 
Posts: 142
Joined: Fri Apr 21, 2006 5:08 pm

Postby P3rv3rt B3ar on Wed Sep 06, 2006 8:08 pm

Version 0.91 beta available, trough the link in first post.

It fixes "recv lag" bug and uses new way to go around problem reported by bfauska. I couldnt hunt down "jam" bug, trying to find it whole day and its making me frustrated, however i wanted to hurry release, cause u guys have waited long enough, eitherway u guys shouldnt encounter "jam" bug, happens to me only with ZPd.

So this version should make Bfauskas skinning attempts with movies to work properly and also make slide bars for kXd testers "instantenous", by removing earlier lag problem. However changes might have caused new problems, so if u notice abnormal behavior, collect as much info as possible and report it to me.

I hope to make added features version within 30 days.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby bfauska on Thu Sep 07, 2006 3:11 am

hey perv,

I tested the latest download and it definately fixed the problem I was having. It is prety quick when only 7 movies are on screen, but when I set it up with about 42 it got very slow, about 2 seconds or more when I scrolled to the next item. On the screen with 7 it only took about 1/2 second. I also noticed that the graphics were slowed way down when I was creating the page, every time I added a new pic it slowed down my click and drag speed with the coverart. I could definately make a useable skin for selecting movies this way, but I would have to keep from doing too many coverarts at once. I also noticed that with your plugin running my cpu usage jumps about 40 percent. I don't know if the speed or CPU is easily addressed but I wouldn't be suprised if more testing makes me decide I can't spare the CPU cycles needed to run this.

It seems promising, if it can get a little less power hungry.

Thanks for the update,
Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby P3rv3rt B3ar on Thu Sep 07, 2006 1:22 pm

Thanx for analysis, I noticed similar results myself running xPerT in my new dedicated-HTPC, i knew its gonna be slow, based on experiment i did with test pc... but i never would have thought that upgrading from 1Ghz processor to 2.8Ghz Duo really didnt improve performance at all... cause of my limited test pc i was earlier in false impression that with modern about 3Ghz machines it would run nicely. Now it seems i was wrong. However now that i have capable machine, its gonna be easier for me to test and evaluate performance in future.

yes i have an idea how to make it faster and it should also be less straining CPU cycle consumption wise. However i just wanted to release this bugfix first. Ill be making new hopefully faster algoritm for next version, which will be released within 30 days.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Thu Sep 07, 2006 5:50 pm

Bfauska,

While u r waiting better solution (which is not guaranteed to be much better) i advice u to play with "consume" command. It was planned as a tradeoff between responsiveness and resource consumption. Higher the value u give slower the system is to respond but resource consumption is smaller, and other way around. zero value should give u fastest system but also consume most resource. With my new machine value zero gave best overall performance. Set the command for example in goto event which take u to that particular screen... experiment different values and find optimal one for u.

Also about 40% rise in your resource consumption... That shouldnt happen on every screen, right? only in screen which contains enchanted categories... So trick is try to plan your system so that there is not hard processing simultaneously so u can take 40% hit. For example in my test system had enchanced gategory as video selection, so when user click to video, before video started to play i switch screen to player screen so video and enhanced categorie never wasted resources simultaneously... Its a lot u can do with this kind of resource planning... however if u need simultaneously manage several videozones i understand its not possible.

My options to try to make it faster are somewhat limited since i can access data only trough SDK interface... if i would have direct access ofcourse it would be lot faster. Also ofcourse i could access database files directly... but its just i consider it rather unelegant solution and im not too keen to use it... well anycase i try to implement speed boost i had in mind... well just have to se will it yield enough advantage.

Lastly, xPerT wasnt planned to handle enchanted categories of size 40 or around... but targeted around 6 items... i only tested it with 8 items... but im very happy that u choosed to experiment ad find limits and provide me with data, Lets hope that planned speed enchanments will remedy situation... if not, u need to make item count smaller...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby bfauska on Fri Sep 08, 2006 3:08 am

I will try that consume command. Like I said I can also live with fewer covers on the screen at one time.

Can you give me an example of the context for the consume command?
Is it like:
plugin>xpert>consume>#

I will also check the cpu usage on other screens but I thought it was doing it on all, but I could be wrong.

Thanks,
Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby P3rv3rt B3ar on Sat Sep 09, 2006 12:54 am

Yes that is format for consume (except its command, as opposite to variable, so its given in event dialog, without '>' characters).

Im not too sure if consume will help u though, it was implemented for very early version and program evolved so much after, so im not sure how relevant it is in current version, but it never hurts to try...

also i tried to tackle the resource dilemma yesterday with some new code... funny thing was i ended up wasting even more resources than before... oh well back to drawing board :)
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Mon Sep 11, 2006 4:38 pm

Bfauska,

I made u experimental version to test. It should cut down some strain on processor, it is quick and dirty fix... and this one is not aimed for responsiviness.

i made 15 item cat like yours, and on my test it dropped resource consumption from about 40% to about 25%... fix is probably going to be more benefitial on your screen since u have about 40 items.

This is experimental version, so screen update wont happen simultaneously, but ill figure something out to it if this approach prooves benefitical in your system. Please test it and let me know about possible performance improvement. Also u have to make some changes to your cat in order to gain advantage of this fix.

In order for u to apply it, i need to reveal one thing about xPert i didnt before, whenever u have translation in xPerT, ie something between brackets [], u can put numerical value between !-characters as first thing in translation, to indicate time translation is valid in seconds (notice this is not very accurate, so smaller than 5 or 10 seconds steps are not recommended) so if u increase the validity period ridicilously long no additional processing is needed. However when u want to scroll the view translations have to be invalidated thats why new command was added to experimental version called "RedoTranslations".

so u need to do these two things:

change sentences for covers from

Code: Select all
plugin>xPerT>loadpic>normal>[plugin>xPerT>beforeprevious>movies>coverart]


to something like:

Code: Select all
plugin>xPerT>loadpic>normal>[!500!plugin>xPerT>beforeprevious>movies>coverart]


and then u need to add RedoTranslations command as last one into arrows which control scrolling of your cat. RedoTranslation does not take parameters.

Download experimental versionhere

and let me know what effect it had.[/url][/code]
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby bfauska on Tue Sep 12, 2006 5:20 am

P3rv,

That definately cut down the processor use. With my 7 image screen my CPU dropped to 4%, that's what it runs without the plugin too, so you made it much leaner. I did see short spikes when I scroll, but that seems ok.

I didnt' try it with my 40 image page yet because it would take forever to edit it in the editor, and I f#$# it up when I tried to xml edit it, so it crashed xlobby until I deleted it, now I have to make that page again. I am not sure when that will happen but it seems like it would definately be faster with this new fix.

Thanks and keep up the good work.

Brian
bfauska
 
Posts: 94
Joined: Thu Jul 21, 2005 10:50 pm

Postby P3rv3rt B3ar on Sun Sep 24, 2006 7:40 pm

Anyway, i thought its time for development status report... Ive been making huge changes in xPerT, good news is that responsivenes has improved a lot, bad news is ive been introducing a lot of bugs, which im now busy hunting down. Theres still about 10 days before M$ license ends, so im not so sure i get new version stable enough, not even mentioning new features, which i would like to, implemented in that thight deadline. I still hope i have it stable enough and some of new feats implemented for release, but we have to see what happens.

Also on other note ill be changing name of PervTalk to XTalk before releasing P3rvHub. Its just im tired always to explain why is it named like that. However name of all components remains unchanged (atleast for now), P3rvHub will still be the name of central component of XTalk as well as XL-device will be still called xPerT... just name of architecture as whole changes.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

PreviousNext