views:

48

answers:

3

I have a server which consists of several Zend Framework application.

I want to know if it is a good idea to upload Zend Library on the server and share it among all the applications instead of uploading it per application.

Does it influence speed if for example multiple applications request a library simultaneously or not.

What is its Pros and Cons?

Thx in advance.

+3  A: 

My answer applies in general to shared libraries, as this should not be specific to Zend Library:

PROS of sharing:

  • Less disk space usage
  • Possibly less memory usage (depends on many factors, including OS)
  • Update once, update all (you do not have to update the library for every single app

CONS of sharing:

  • If you need a particular version of the library for a certain application (for compatibility reasons for example), you cannot do it by sharing the library
  • Risk of breaking apps by updating to an incompatible library version.
Michele Balistreri
I want to know if it affects the speed of application execution.
rahim asgari
No, it doesn't.
Michele Balistreri
Not on execution. It can however take a bit longer to read the library files from disk if they're not cached, but that's only a problem if you don't have enough RAM for the disk cache.
Emil Vikström
+1  A: 

If the applications are separate, I would give each one its own library to avoid issues when you need to upgrade a library on one of the apps, but don't want to have to test and update them all with that library version.

Then again, if those applications share code, they should definitely share the libraries too, to avoid even worse problems with the shared code running under different library version on each site.

Pies
+2  A: 
timdev