Custom CMS application model... host on 1 server?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
weismana81
Forum Newbie
Posts: 20
Joined: Mon Feb 07, 2011 3:36 am

Custom CMS application model... host on 1 server?

Post by weismana81 »

Hello!

I'm a relatively new designer/developer, and I've just started doing some freelance work. I've integrated my own custom CMS in each of the sites I've done, and I've started branding it a little more for the last few projects, and making it a little more object oriented so it's easier to implement on new projects. It's already clear to me that I need an application that is more scalable. As I make improvements, it's becoming more and more difficult and confusing on how to implement them on each site. Before I go jumping into anything too crazy, I was hoping I could get some advice on a new "application model".

I figure I have two options... Set up some sort of "versioning" system, or host my application on one server with all of my clients accessing the same mysql db. I guess I'm just looking for pros and cons of both. Obviously, the app would be much easier to update if I only had to work on the single installation. But security, and speed are my concerns here. Of course the server would have to be pretty powerful, but would these websites take a hit on speed having to access an external server for the db that holds their data? This db would also be much larger. I read all the time about newbies like myself trying to get a faster db, and the pros always seem to chime in and say that a mysql db can handle a huge amount of records. I have also considered having the single application, but have it connect to the db on the client's server based on their user info. That way, each site would have it's own db that performs well, and my application would still be pretty simple to manage.

As far as versioning goes, I have little experience with this. I really don't want to have my clients updating anything themselves, so this could turn into a lot of work having to update each site, especially considering that I'm going to be ridiculously successful :D . And I really don't want to charge them for updates, as that could lead to people not using the most recent version... I see this app as an extension of myself, and I want everyone using the best version!

As you can see, I'm in a little over my head here (hopefully just enough to push me to create something awesome), and I need to commit to a model. Any info that anyone can offer is greatly appreciated! If anyone knows of any articles or tutorials on the subject, that would be awesome too!! Thanks a bunch!!
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Custom CMS application model... host on 1 server?

Post by Jade »

First off, I commend you for actually thinking this through rather than just posting "this is what I want tell me how to do it". Such a refreshing attitude! Rather than telling you what I think the best scenario is I'll run through the pros/cons of each of the options you've considered and give you my input -- ultimately it needs to be your decision based on your long term goals.

Version System

If you go this route I would suggest using only one copy of the application that's pushed to all of your clients. I worked for a company that would install a base version and did upgrades after every X years (or if the client requested). Over time each version of the client's software had customizations made for their particular needs. It meant each upgrade to a new version had issues with overwriting older custom modifications or corrupting data because it was being handled differently than the original version which was installed.

Security

I don't see much of a difference in security for this option over the other. If each of your versions use the same security protocols then you'll be just as vulnerable with server running the software as you will with each client running the software.

Speed

The benefit of having it on one server is you can have some control over the speed/optimizations being run -- if each client has their own copy their speeds will vary based on the servers/software they're using. In addition you'd have control over what software/packages are installed on your own server -- some of which you may not be able to implement on clients servers with their existing setup.

Databases

Separating your database server from your web server is a good practice if you're working with a huge number of records of sites that receive a lots of traffic. When you host a client's data you'll have to make sure you protect yourself -- you'd be responsible for the loss/theft of their information unless you have some kind of written contract that states otherwise. If you make your clients use their own database servers you'd again be dealing with the limited software/speed issue.

Final Considerations

The benefit of having the clients maintain their servers is you don't have to deal with server issues on top of your application problems that arise. You can direct them to contact their hosting help desk or IT dept who will take over from there. When you control the servers it will be up to you to deal with cleaning log files, tweaking configurations, optimizing to handle high loads, etc.

Last but not least I would think about the ramifications of server failures/down time. If you put your application on one server and that server goes down then ALL of your client's cannot access the application. The same with using a single database. On the other hand if the client has their own copy of the application/database and their server goes down they are the only client affected by the failure/down time.

In the end it all really boils down to this: the more you control via using your own web/database servers the more you'll be responsible for outside of your applications programming bugs as well as the greater potential for overall downtime for all clients in server failures. If you make clients have their own web/database server the less you have to deal with things outside of your actual application.
weismana81
Forum Newbie
Posts: 20
Joined: Mon Feb 07, 2011 3:36 am

Re: Custom CMS application model... host on 1 server?

Post by weismana81 »

Great info! This is exactly what I needed! Thank you so much for the thorough answer! I think I'm leaning towards hosting my application on my server, and having it connect to a database on their server. I think I could handle the possibility of having some unhappy clients if my server was down and they could not use the application from time to time, but the potential for all of their data being inaccessible if my server was down... yikes! I've read just a little bit about "redundancy" (I think), and that's possibly something I could look into more down the road if it becomes an issue, but I'm trying to stay focused on improving my app, and growing my business.

As far as creating a version system, I just don't know what that would look like, and while I'm probably doing some form of that right now, it's pretty ugly...

Anyway, thanks again!!
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Custom CMS application model... host on 1 server?

Post by alex.barylski »

I would recommend using an existing CMS like Drupal and just accept it's going to take a while before you become proficient with it. It does everything you need just implemented differently than you might.

You can install Drupal on one server per client or single installation hosting several web sites. It's designed to be scalable.

Cheers,
Alex
weismana81
Forum Newbie
Posts: 20
Joined: Mon Feb 07, 2011 3:36 am

Re: Custom CMS application model... host on 1 server?

Post by weismana81 »

Thanks for the input! I've gone back and forth on this. Ultimately, my objective is to make life on my clients easy and simple. They can do far less with my app than they could with something like Drupal, but they're still able to do everything they need, and it's very simple. I'm all about the simplicity! The problem with that logic, is that it's obviously much more difficult for me to create a CMS rather than just learn Drupal. I'm still all over the place :)

Here's a question...

Is it reasonable to customize the back end of a system like Drupal or joomla? Is this a violation of the license? I know it's open source, but I've always assumed that was so you could add to it, not change it. It would definitely be easier to learn Drupal and tweak the back end a little. I guess the reason I keep deciding against this is that there's just so much going on in these apps, and if something goes wrong, it could get ugly. But I know my app inside and out. I don't know... Like I said, I'm all over place. But thanks again for the input!! I've read that Drupal is very developer friendly so I might take a closer look.
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Custom CMS application model... host on 1 server?

Post by Jade »

I've never used Drupal or Joomla so I'm not much help there. I prefer to develop my own apps, especially if I know there is going to be a lot of unique customizations per the client's request.
weismana81
Forum Newbie
Posts: 20
Joined: Mon Feb 07, 2011 3:36 am

Re: Custom CMS application model... host on 1 server?

Post by weismana81 »

I think I agree with you. When I've tried off the shelf CMS in the past, it always ends up having this "rigged" feel to it... Like I Macgyvered a bunch of widgets together that sort of get the job done. To be realistic, that's probably a result of my inexperience, but I've just ended up with sketchy results that I'm not proud of.
Post Reply