Originally Posted by hakan42
[...] could you please summarize and share the differences between your work (the PHP scripts) and the Calibre Content Server as it is integrated in calibre itself? I'm thinking in direction of integrating your results into the main server, and here knowing what and why differences there are instead of analyzing your output surely helps
(This conversation started in https://www.mobileread.com/forums/sho...42#post1238342
I am not quite sure what you are asking for, but I will give it a try.
The built-in calibre server has more functionality than the PHP server. I implemented the functionality subset that I needed, and have added some things asked for by Idolse. For example, the PHP server does not support OPDS, and there are significant differences in search capabilities.
There are massive differences in architecture over and above the PHP/python differences.
- The built-in calibre server is a constantly-running process. It opens the database when it starts and holds it open. The upside is that it can cache some amount of data. The downside is that it must detect database changes and do the correct thing. The PHP server reopens the database on every request. It computes what it needs at that time, produces the output, then shuts down. The upside is that there is no issue with database changes, as it sees the newest automatically. The downside is that it must recompute information that in fact doesn't change often, such as category contents.
- The PHP server runs under an existing web server (apache or IIS), making some things easier and some things harder. For example, running under SSL, multiple users, and security are all taken care of by the containing server. The downside is setup. You must configure a containing server.
- The PHP server has a smaller footprint than the built-in server, both in terms of installation prerequisites and resident memory.