0

I currently have two CodeIgniter applications CI1 and CI2 that have different purposes.

  • CI1 - front end (contains view and controllers. Controllers call CI2 via REST)
  • CI2 - back end (contains controllers and model. Performs business logic. Receives inputs via REST)

I have been trying to find out if this is an alright setup. I have heard that an alternate method would be to set up symlinks to join them. The reason I have done this is because I wanted to decouple my application and was wondering how it would work if I CI1 sat on the web server and CI2 sat on the application server.

halfer
  • 19,824
  • 17
  • 99
  • 186
JianYA
  • 2,750
  • 8
  • 60
  • 136
  • you can merge them both in single code base as instructed [here](https://www.codeigniter.com/userguide3/general/managing_apps.html) – jagad89 Aug 09 '17 at 05:50
  • Hello, thank you for replying. That is for a single application though. How would it work if I need to split the application between a web server and an application server? – JianYA Aug 09 '17 at 12:31
  • Which one is true for your case, a) you have deployed code on different server b) You have deployed code on the same server but under different subdomain or folder. – jagad89 Aug 09 '17 at 12:43
  • I am still unsure of that. At the moment I have converted my application to do rest calls so that if they sit on different servers, it will still work. Would it be possible if it were A? So that means webserver, application server, database server – JianYA Aug 09 '17 at 12:57
  • I think if its case A, you will also need resource server ( for image or resource upload ). If you have different web, application and database server and you performing only CRUD operation on the database, I think you will not require inter server communication, because the database will be always on latest state. – jagad89 Aug 09 '17 at 13:02
  • But how will I connect my view to my controller? I can't just call it normally right? Won't they sit on separate file systems? – JianYA Aug 09 '17 at 13:03
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/151500/discussion-between-jagad89-and-jianya). – jagad89 Aug 09 '17 at 13:03

0 Answers0