Welcome Guest, Not a member yet? Register   Sign In
Running CI on multiple client servers but core on mine
#1

[eluser]tadtoad[/eluser]
Hi

First, sorry for the long first post. I just started using CodeIgniter and it's cut out a whole bunch of development time. I'm putting the finishing touches on a booking system for a client and realized that I'll never actually finish building it since there's always something I want to tweak here and there. Plus, I'd like to license it to other clients.

Because of the above I thought I'd take the SaaS approach to creating the app which will allow me maintain and update only one application but at the same time having these updates to all clients.

I've linked to an image of how the architecture of the whole thing will work. If you have a better approach please let me know. I've checked other posts that make me believe this is doable but need some guidance.
http://i1244.photobucket.com/albums/gg56...rocess.png

The Application Architecture
1. There is only one "application" folder that resides on my server (www.mydomain.com) which contains Controllers, helpers, and all other files (except the client's public view [see 4])

2. My server has all databases (1 per client). So if there are 10 clients, then 10 databases.

3. Client-1's administrator/sales team sign in through my server (client1.mydomain.com) to access orders

4. The client's server (www.client1.com) contains all public views/template files. I want it this way so that if the client wishes to hire another designer to create a new design, they can do so without messing up my code. Plus I don't want them to have any direct access to my server.

5. The config file dynamically changes the DB based on the incoming URL and a predefined pass-key.

6. Users visit the client's website at www.client1.com and they can place orders.

7. On the diagram, it says "Authentication", "Key". This is a layer that I'd like to place which checks to see if the client's subscription to my service has expired. When a user visits the client's website, just before the view is loaded a key is sent to my server which then checks a Customer database that has all registered clients and checks the table if their subscription is expired or not. If expired, the user gets a message, else the rest of the application is loaded and he can place his orders.

My Issues
As I said, I just got into CodeIgniter so there are still a few things I need to catch up on. But here are the steps and issues I foresee.
1. If I have the application folder on my server but pluck out the views folder and place them on another server, how do I tell CI to look at the new server? Is this even possible?

2. I'll need to check to see where a client request is coming from. That is, I get the URL and the key mentioned above. How do I dynamically change the database based on this info? I found links on the forum and a blog post on this but need to try them out. Do you have any suggestions?

3. What other files do I need to update or be mindful of?

I hope someone can help me out with this. I'll also spend the weekend trying to work this out.

Thanks!



Messages In This Thread
Running CI on multiple client servers but core on mine - by El Forum - 03-30-2012, 01:12 PM
Running CI on multiple client servers but core on mine - by El Forum - 03-31-2012, 01:01 AM
Running CI on multiple client servers but core on mine - by El Forum - 07-07-2012, 01:40 PM
Running CI on multiple client servers but core on mine - by El Forum - 07-12-2012, 04:33 PM
Running CI on multiple client servers but core on mine - by El Forum - 07-12-2012, 11:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB