XBOX 360 and mutilple storage instances

7 messages Options
Embed this post
Permalink
Dominik

XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
Hi,

as I wrote twice before I try to write my own storage backend and I made quite some progress but now I am stuck again.
The problem can be reproduced with this very simple storage backend.
If I create for example 3 instances of this backend and open all different containers on instance "test 1" with the UPnP-Inspector the console prints:
request 0
test 1
request 0
test 1
request 51
test 1
request 53
test 1
request 54
test 1
but when I try to open the video folder with my XBOX the console prints this:
request 54
test 3

So my conclusion from this is that the XBOX always makes requests on the last backend storage that has been created (in our case here "test 3")
Does this mean you can use multiple instances of the some backend storage with the XBOX 360, is there a work around for this or do I make something wrong?

cheers
Dominik
Frank Scholz

Re: XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
Hi Dominik,

> So my conclusion from this is that the XBOX always makes requests
> on the last backend storage that has been created
> (in our case here "test 3")

you are sure all backends have a different UUID?

Do you use a config file? Old or XML format?

Could you do a test with two FSStore backends?

coherence --plugin=backend:FSStore,content:/path/one \
          --plugin=backend:FSStore,content:/path/two


Regards,
Frank

_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
Dominik

Re: XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
I added 2 FSStorages and they work fine:
fs 1
request 0
fs 2
request 0

so I set VIDEO_FOLDER_CONTAINER_ID = 0 (in my TestStorage)
now I also got the correct output
request 0
test 1
request 0
test 2

the really weird thing is after I reset VIDEO_FOLDER_CONTAINER_ID = 54
it still works
request 0
test 1
request 0
test 2

But when I open the audio folder the console still prints
request 53
test 3
request 53
test 3

Somehow the XBOX decided to no longer request 54 but 0 instead.
I am getting more and more confused :-P

BTW: my config file for the described example is this:
<config>
  <logging level="debug">
    <subsystem active="yes" level="info" name="feed_store" />
  <subsystem active="yes" level="info" name="coherence" />
  <subsystem active="yes" level="info" name="webserver" />
  <subsystem active="no" level="info" name="dbus" />
  <subsystem active="no" level="info" name="webui" />
  <subsystem active="no" level="info" name="webui_menu_fragment" />
  <subsystem active="no" level="info" name="webui_device_fragment" />
  <subsystem active="no" level="info" name="webui_logging_fragment" />
  <subsystem active="no" level="info" name="ssdp" />
  <subsystem active="no" level="info" name="msearch" />
  <subsystem active="no" level="info" name="device" />
  <subsystem active="no" level="info" name="service_server" />
  <subsystem active="no" level="info" name="service_client" />
  <subsystem active="no" level="info" name="action" />
  <subsystem active="no" level="info" name="variable" />
  <subsystem active="no" level="info" name="event_server" />
  <subsystem active="no" level="info" name="event_subscription_server" />
  <subsystem active="no" level="info" name="event_protocol" />
  <subsystem active="yes" level="info" name="soap" />
  <subsystem active="yes" level="info" name="mediaserver" />
  <subsystem active="no" level="info" name="mediarenderer" />
  <subsystem active="no" level="info" name="controlpoint" />
  <subsystem active="yes" level="info" name="connection_manager_server" />
  <subsystem active="no" level="info" name="content_directory_server" />
  <subsystem active="no" level="info" name="ms_client" />
  <subsystem active="no" level="info" name="mr_client" />
  <subsystem active="no" level="info" name="fs_store" />
  <subsystem active="no" level="info" name="fs_item" />
  <subsystem active="no" level="info" name="gstreamer_player" />
  <logfile active="yes">coherence.log</logfile>
  </logging>
<controlpoint>yes</controlpoint>
<plugin active="yes">
    <uuid>92270c1f-f2a1-4c6a-9855-512e0099cdb5</uuid>
  <name>test 1</name>
  <backend>MyTestStore</backend>
  </plugin>
<plugin active="yes">
    <uuid>62a852a7-fa03-498d-b41b-9375ed88462e</uuid>
  <name>test 2</name>
  <backend>MyTestStore</backend>
  </plugin>
<plugin active="yes">
    <uuid>73fc12be-6efb-434e-90ca-d14c033d1a31</uuid>
  <name>test 3</name>
  <backend>MyTestStore</backend>
  </plugin>
<use_dbus>no</use_dbus>
<web-ui>yes</web-ui>
<logmode>debug</logmode>
<serverport>8080</serverport>
</config>



2009/4/17 Frank Scholz <[hidden email]>
Hi Dominik,

> So my conclusion from this is that the XBOX always makes requests
> on the last backend storage that has been created
> (in our case here "test 3")

you are sure all backends have a different UUID?

Do you use a config file? Old or XML format?

Could you do a test with two FSStore backends?

coherence --plugin=backend:FSStore,content:/path/one \
         --plugin=backend:FSStore,content:/path/two


Regards,
Frank

_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev


_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
Dominik

Re: XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
In reply to this post by Dominik
OK I have been digging deeper and deeper into the rabbit hole. And look what I have found. :-)

>>> class base():
...   dic = {'1':'1', '2':'2'}
...
>>> class child1(base):
...   def __init__(self):
...     self.dic.update({'1':'2'})
...
>>> class child2(base):
...   pass
...
>>> c1 = child1()
>>> c2 = child2()
>>>
>>> print c1.dic
{'1': '2', '2': '2'}
>>> print c2.dic
{'1': '2', '2': '2'}
>>>

Do you see the problem? :-)

The dic attribute from c2 is not what you would expect.
The same thing happens to the wmc_mapping dictionary.
So after all the backends are initialized we have a mixed up wmc_mapping and nobody knows what will really be mapped to what.

I have no solution/patch yet. (I need a break first. :-))
But I am pretty sure this is the cause of all my current problems.


Dominik wrote:
Hi,

as I wrote twice before I try to write my own storage backend and I made quite some progress but now I am stuck again.
The problem can be reproduced with this very simple storage backend.
If I create for example 3 instances of this backend and open all different containers on instance "test 1" with the UPnP-Inspector the console prints:
request 0
test 1
request 0
test 1
request 51
test 1
request 53
test 1
request 54
test 1
but when I try to open the video folder with my XBOX the console prints this:
request 54
test 3

So my conclusion from this is that the XBOX always makes requests on the last backend storage that has been created (in our case here "test 3")
Does this mean you can use multiple instances of the some backend storage with the XBOX 360, is there a work around for this or do I make something wrong?

cheers
Dominik
Frank Scholz

Re: XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
Hi Dominik,

> OK I have been digging deeper and deeper into the rabbit hole. And look what I have found. :-)
[...]
> Do you see the problem? :-)
yep, and I see that I've misinterpreted your emails in the beginning.

What you see here is the difference between working on
a class variable or an instance 'of-this-class' variable.

I never came across the idea that several instances of
the same backend class would have different WMV mappings.

But: "Life will find a way." ;-)

I'll fix that in Coherence trunk now.

And in your test-backend you will then have to move
the wmc_mapping from the class definition into the
__init__ method and do there a self.wmc_mapping = {...}.

Regards,
Frank
_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev
Dominik

Re: XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
In reply to this post by Dominik
My backend works now. I haven't tested it very much yet I think it will be usefully for some people.
feed_storage.py
The configuration looks like this
<plugin active="yes">
    <backend>FeedStore</backend>
  <opml_url>http://www.swr3.de/rdf-feed/podcast/</opml_url>
  <uuid>426e6b31-fe2d-46ef-a69a-f0733ff4914f</uuid>
  <name>SWR3 OPML</name>
  </plugin>
or this
<plugin active="yes">
    <name>Quarks</name>
  <uuid>b51ddca7-79ba-47bd-b558-2e830d1e2566</uuid>
  <feed_urls>http://podcast.wdr.de/quarks.xml</feed_urls>
  <backend>FeedStore</backend>
  </plugin>

You can use this backend to share a lot of different podcasts in your network.
I use it to watch/listen to podcasts on my XBOX 360 in front of my TV.
And since I have install coherence on my NAS (DNS-323) I don't have to turn on my PC.

If somebody has problems in using it feel free to send me an email.

Dominik wrote:
Hi,

as I wrote twice before I try to write my own storage backend and I made quite some progress but now I am stuck again.
The problem can be reproduced with this very simple storage backend.
If I create for example 3 instances of this backend and open all different containers on instance "test 1" with the UPnP-Inspector the console prints:
request 0
test 1
request 0
test 1
request 51
test 1
request 53
test 1
request 54
test 1
but when I try to open the video folder with my XBOX the console prints this:
request 54
test 3

So my conclusion from this is that the XBOX always makes requests on the last backend storage that has been created (in our case here "test 3")
Does this mean you can use multiple instances of the some backend storage with the XBOX 360, is there a work around for this or do I make something wrong?

cheers
Dominik
Dominik

Re: XBOX 360 and mutilple storage instances

Reply Threaded More More options
Print post
Permalink
I forgot to mention that it depends on feedparser.

2009/4/21 Dominik <[hidden email]>

My backend works now. I haven't tested it very much yet I think it will be
usefully for some people.
http://n2.nabble.com/file/n2670958/feed_storage.py feed_storage.py
The configuration looks like this
<plugin active="yes">
   <backend>FeedStore</backend>
 <opml_url>http://www.swr3.de/rdf-feed/podcast/</opml_url>
 <uuid>426e6b31-fe2d-46ef-a69a-f0733ff4914f</uuid>
 <name>SWR3 OPML</name>
 </plugin>
or this
<plugin active="yes">
   <name>Quarks</name>
 <uuid>b51ddca7-79ba-47bd-b558-2e830d1e2566</uuid>
 <feed_urls>http://podcast.wdr.de/quarks.xml</feed_urls>
 <backend>FeedStore</backend>
 </plugin>

You can use this backend to share a lot of different podcasts in your
network.
I use it to watch/listen to podcasts on my XBOX 360 in front of my TV.
And since I have install coherence on my NAS (DNS-323) I don't have to turn
on my PC.

If somebody has problems in using it feel free to send me an email.


Dominik wrote:
>
> Hi,
>
> as I wrote twice before I try to write my own storage backend and I made
> quite some progress but now I am stuck again.
> The problem can be reproduced with
> http://n2.nabble.com/file/n2644883/mytest_storage.py this  very simple
> storage backend.
> If I create for example 3 instances of this backend and open all different
> containers on instance "test 1" with the UPnP-Inspector the console
> prints:
> request 0
> test 1
> request 0
> test 1
> request 51
> test 1
> request 53
> test 1
> request 54
> test 1
> but when I try to open the video folder with my XBOX the console prints
> this:
> request 54
> test 3
>
> So my conclusion from this is that the XBOX always makes requests on the
> last backend storage that has been created (in our case here "test 3")
> Does this mean you can use multiple instances of the some backend storage
> with the XBOX 360, is there a work around for this or do I make something
> wrong?
>
> cheers
> Dominik
>
>

--
View this message in context: http://n2.nabble.com/XBOX-360-and-mutilple-storage-instances-tp2644883p2670958.html
Sent from the coherence-dev mailing list archive at Nabble.com.

_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev


_______________________________________________
coherence-dev mailing list
[hidden email]
http://lists.beebits.net/cgi-bin/mailman/listinfo/coherence-dev