EllisLab text mark
Advanced Search
     
Using a Three-tier architecture with Code Igniter
Posted: 07 September 2007 07:15 AM   [ Ignore ]
Joined: 2007-09-07
7 posts

Hello,

I’d like to use Code Igniter in my company, but the do want a three-tier architecture (data, business, presentation) with 3 differents servers for security reasons. I know this is a Java-style architecture but do you think I could use code Igniter in a 3-tier architecture ? If so, how ?

Thanks in advance.

 
Posted: 07 September 2007 09:02 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-04-22
56 posts

You could separate out presentation and business logic layers into seperate CI apps.  Implement the business logic layer as an XML-RPC server which you call using the XML-RPC Client library at the presentation layer. 

While this gives you seperate presentation and business logic and you can run them on seperate servers, in practice it doesn’t work so well.  I did an app in this architecture (without CI though) some time ago, and the XML-RPC calls (serialising the data, and parsing the xml especially) were a major bottleneck. 

I think we would have been better off seperating logic and presentation cleanly in code, without running them on seperate machines, then scaling (replication, clustering, caching, etc) the front end/database as required.  Trying to run a 3 tier architecture using XML-RPC joining the tiers just didn’t seem to work well. 

Jim.