Centralized Code for Hosted Solution

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Centralized Code for Hosted Solution

Post by jwalsh »

Hi,

We've built a substantial code engine for our upcoming hosted solution. What we would like to do is centralize this code base in one place, and access it from there from each customer account.

Since the engine itself is large, and will grow increasingly large, it doesn't make sense to have it installed on each account, as any upgrades will exponentially grow our storage overhead.

How is the best way to centralize this codebase? Everything will be accessed from our owned servers under our control, and our customers will not have FTP access. So there's not an issue of remotely including it from a location out of our control.

We've thought about giving every account root access and pointing at the codebase in the root folder of the servers, but that seems like a HUGE security risk to take, especially with sensitive data. We've thought about SOAP calls to a SOAP server as well, but that seems like overkill.

There's only one file that needs to be included, and that file takes care of loading the rest of the engine, and including the other files necessary.

Thanks,

Josh
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Couldn't you just store it on a central file server mounted at a specific point on all the customer accounts?
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Re: Centralized Code for Hosted Solution

Post by nickvd »

jwalsh wrote:We've thought about giving every account root access and pointing at the codebase in the root folder of the servers, but that seems like a HUGE security risk to take, especially with sensitive data.

NO NO NO!

/me slaps your hands just for thinking of this ;)


Ole has the right idea... just use an nfs mount (assuming customers and code are on different machines) or just store the code within php's include path and you wont have anything to worry about... (perhaps chown/chmodding the code to enhance the security would be something to remember)
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

We've thought about giving every account root access
I had a VPS with root access. But its completely private. You get root access to your own copy of Linux with a time slice, pretty cool.

VPS = Virtual Private Server
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Post by jwalsh »

Thanks guys. Much appreciated. I'll look into it and post back.
Post Reply