Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Use common libraries between domains

Options
  • 04-11-2014 11:32am
    #1
    Registered Users Posts: 155 ✭✭


    I have written a number of libraries which I use for pretty much all of the websites or web applications I develop. Rather than having to upload this to each website and update each individually when there is a change I would like to upload the libraries to a central location and be able to reference them from there.

    If I have full root access to a Linux server this is quiet do-able -

    In one domain I store my libraries as per normal www.mydomain1.com/libraries

    for domain2 the reference is the same -
    www.mydomain2.com/libraries

    However here libraries is just a soft link to the libraries folder on mydomain1.com and the same would go for any subsequent domains.

    Update in a single location and updates for all domains. My only problem is I have has second thoughts about taking on the whole server admin responsibility.

    My question is, is there any hosting package that allow this kind on sharing of resources?


Comments

  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    dahayeser wrote: »
    My only problem is I have has second thoughts about taking on the whole server admin responsibility.

    This won't remove all responsibility but it really will simplify it:

    https://serverpilot.io

    *no connection other than as a customer


  • Registered Users Posts: 155 ✭✭dahayeser


    Thanks Graham, you actually recommended serverpilot to me in another thread and I have been in touch since to establish exactly what they offer.

    Based on what I have got back from them I certainly would be much more comfortable with serverpilot than without but I just don't know if it is enough. If my server did go down despite the additional support of server pilot the buck would still fall to me to restore it.

    If I had 10 client websites hosted and the server became corrupt there would serious pressure. I am holding down a full time job too so such a situation would be a real nightmare.

    If I could find a managed hosting solution that would facilitate the scenario I have outlined above I would rather go that route.. I don't know if there is though.


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    As I suspect you're already discovering, most shared hosting packages don't offer much scope for special requests. It's easy to understand why when you look at the tiny margins the hosts must be working on.

    You could try looking for a managed dedicated server, whether the additional cost would be worth it to you is another question.

    Another option is to find a freelance admin you can call on if something goes wrong. There's plenty out there that would work on an hourly rate as/when required.


  • Registered Users Posts: 2,426 ✭✭✭ressem


    I would doubt that many providers would be willing to have a custom setup like this on a shared server.
    If I had 10 client websites hosted and the server became corrupt there would serious pressure. I am holding down a full time job too so such a situation would be a real nightmare.

    I would think that the ideal scenario would be that you can rapidly deploy onto a new server without having to wait for customised provider changes.
    If your provider has a server breakdown and uses their management tools to restore different websites to different servers, you'd be in the same situation with broken links.

    Would it be worthwhile to invest time in automating checkout, deployment and updates of your websites?
    For keeping the versions of your libraries and code in sync?

    Otherwise
    I guess that your chosen programming language has to use a filepath & doesn't allow you to include a CNAME DNS record? lib.mydomain2.com -> lib.mydomain.com?


  • Registered Users Posts: 27,087 ✭✭✭✭GreeBo


    Would you really expect to have to update all the existing sites just because you have a new version of a library?

    Unless someone is paying for upgrades I wouldn't be doing that?

    If they are your own sites then fair enough I guess.

    How about a CDN?


  • Advertisement
  • Registered Users Posts: 2,030 ✭✭✭colm_c


    If you hosted them as actual libraries/packages and published them so they could be used with a package manger, e.g. rubygem, bower, NPR, composer etc.

    That way you can safely upgrade and version your libraries.

    Automatic upgrading of shared libraries can be problematic if you don't have some kind of automated testing in place.


  • Registered Users Posts: 155 ✭✭dahayeser


    GreeBo wrote: »
    Would you really expect to have to update all the existing sites just because you have a new version of a library?

    Unless someone is paying for upgrades I wouldn't be doing that?

    If they are your own sites then fair enough I guess.

    How about a CDN?

    No go on the CDN, CDN just serves static content files and PHP files aren't static.

    You are right ordinarily you wouldn't he updating all clients together but I was hoping to try out a new model where the client would pay an ongoing retainer and I would deliver new releases to all at various points.

    Due to a lack of linux sys admin knowledge I am reluctant to go the VPS route.


  • Registered Users Posts: 27,087 ✭✭✭✭GreeBo


    dahayeser wrote: »
    No go on the CDN, CDN just serves static content files and PHP files aren't static.

    You are right ordinarily you wouldn't he updating all clients together but I was hoping to try out a new model where the client would pay an ongoing retainer and I would deliver new releases to all at various points.

    Due to a lack of linux sys admin knowledge I am reluctant to go the VPS route.

    Ah I didnt see PHP, assumed you were talking JS etc.

    One potential issue is that auto updates to everyone mean everyone gets the site crippling bug at the same time too...so maybe manual is the way to go, though it would be nice to be able to pull the trigger and roll them out.


Advertisement