View Single Post
Old 11-27-2010, 07:40 AM   #65
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,740
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by hakan42 View Post
[...] 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 built-in server uses AJAX. Javascript on the client asks the calibre server for book information as needed, formats that information, then displays it. The PHP server uses a more 'normal' HTML approach, formatting the information on the server, then sending it. Because of this, the PHP server can easily support modifiable page templates. The calibre server requires hacking the javascript. In addition, the PHP server is better for less-intelligent devices (e.g., phones and readers) that can't handle AJAX.

- The PHP server has a smaller footprint than the built-in server, both in terms of installation prerequisites and resident memory.
chaley is offline   Reply With Quote