Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2014, 11:08 AM   #1
didierm
Enthusiast
didierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enough
 
Posts: 33
Karma: 576
Join Date: Aug 2014
Device: Boyue T61, 2x Boyue T62D
Multiple identical server instances detected

In my home network, I am running multiple calibre-server instances on one headless server host (due to the huge discrepancy in storage requirements, I like to keep e.g. ebook & comics libraries separated).

Currently, all instances/collections are announced as "Books in calibre".
This makes them indistinguishable in e.g. Calibre Companion.

Mr. Haley has ventilated the intention (https://bugs.launchpad.net/calibre/+...641/comments/3) to include the port number in CC's Content Server list.

1. Feature request :
I would very much like the possibility to assign aliases/descriptions in CC to host/port combinations, as a port number is hardly indicative of the library contents (especially for those family members who do not maintain the shared Calibre installation )

2. Bug report :
In order to cope for my immediate needs, I am discriminating between current instances by copying the calibre folder for each instance, and binary patching the contents of the "Books in calibre" string, located in /calibre/library/server/base.py, class Bonjour(), def mdns_services().

However, it seems :
- at a first "Connect to Content Server" attempt (after clearing the app's data in Android's Apps setting), not all instances are detected, requiring a second run, and/or
- some instances are randomly detected more than once, as indicated by the attached screenshot (CC 3.4.2 with calibre-server 1.205, running 3 instances FictionNL/FictionEN/Comics).

This is reproducible on all my Android clients (4.2.2, 4.4.2, 4.4.4).

According to tcpdump, instances are detected exclusively by means of multicast mDNS (224.0.0.251, port 5353).


I am available for further debugging and/or running CC test builds.


Cheers,
Didier
Attached Thumbnails
Click image for larger version

Name:	imgCC.jpg
Views:	346
Size:	50.5 KB
ID:	126913  
didierm is offline   Reply With Quote
Old 08-17-2014, 09:43 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by didierm View Post
1. Feature request :
I would very much like the possibility to assign aliases/descriptions in CC to host/port combinations, as a port number is hardly indicative of the library contents (especially for those family members who do not maintain the shared Calibre installation )
I am not willing to add this. It would cost development and maintenance time for a rare use case. And as you note, the port number does disambiguate it. Your family would need to remember the ports. Perhaps you could help this process by using very different port numbers.
Quote:
2. Bug report :
In order to cope for my immediate needs, I am discriminating between current instances by copying the calibre folder for each instance, and binary patching the contents of the "Books in calibre" string, located in /calibre/library/server/base.py, class Bonjour(), def mdns_services().

However, it seems :
- at a first "Connect to Content Server" attempt (after clearing the app's data in Android's Apps setting), not all instances are detected, requiring a second run, and/or
- some instances are randomly detected more than once, as indicated by the attached screenshot (CC 3.4.2 with calibre-server 1.205, running 3 instances FictionNL/FictionEN/Comics).

This is reproducible on all my Android clients (4.2.2, 4.4.2, 4.4.4).

According to tcpdump, instances are detected exclusively by means of multicast mDNS (224.0.0.251, port 5353).


I am available for further debugging and/or running CC test builds.


Cheers,
Didier
There are two problems here.

The first is the duplications. As far as I can tell, this happens only when the content server instances are restarted while CC is running after having attempted to connect. Regardless, it is wrong and I will fix it.

The second is the missing instances. This is caused by a combination of a problem with the mDNS protocol where the description is used to disambiguate the services and threading issues in CC affecting when responses are seen. Kovid and I have decided to fix the former by including the port in the description sent by the content server, which is as safe a fix as we can think of. I have fixed the latter in CC.

The CC fixes will be in the next CC release. I don't know when I will make that release, but it will probably be within weeks. The calibre change will be in the next calibre release.
chaley is offline   Reply With Quote
Advert
Old 08-17-2014, 10:19 AM   #3
didierm
Enthusiast
didierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enoughdidierm will become famous soon enough
 
Posts: 33
Karma: 576
Join Date: Aug 2014
Device: Boyue T61, 2x Boyue T62D
Quote:
Originally Posted by chaley View Post
I am not willing to add this. It would cost development and maintenance time for a rare use case.
No problem. Due to the frequency of calibre releases, I wll have a look at writing a script to handle both hardlinking the calibre binaries and binary patching the base.pyo mDNS string for each of my instances.

Quote:
Originally Posted by chaley View Post
The CC fixes will be in the next CC release. I don't know when I will make that release, but it will probably be within weeks. The calibre change will be in the next calibre release.
Much appreciated ; thanks to both you and Kovid.
didierm is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two or multiple instances of Calibre on one computer clockmaker Library Management 2 06-30-2012 01:55 PM
Replace multiple matching instances within paragraph? murphycc Conversion 2 02-23-2012 09:53 AM
Trouble with multiple content server instances perx Calibre 3 02-17-2012 01:24 AM
Regular expressions - Single back-reference, multiple instances? David Kudler Sigil 10 12-17-2011 12:05 PM
Problem with Coverflow - multiple identical covers! DennyL Calibre 4 10-13-2011 08:53 AM


All times are GMT -4. The time now is 03:52 AM.


MobileRead.com is a privately owned, operated and funded community.