Welcome Guest, Not a member yet? Register   Sign In
How to work communication between different physical servers?
#2

[eluser]WanWizard[/eluser]
This is not something CI is meant for, or can do our of the box. But in the end, it's based on PHP, and with a program language you can do (almost) everything.

Normally you would solve these kind of issues with a message queue system. Your front end inserts messages into the queue, possible with a message type and a prority. The backend runs a process that requests a message from the queue, processes the message (the assignment), and sends the result back. Then the cycle repeats. Another option is using a central dispatcher. In this case the processes sit and wait until they are assigned a job by the dispatcher, which they then execute.

The first option is more scalable, but with a single cluster not really relevant.

I use the first system for ExiteCMS' background processing. I have a cron engine and a workflow engine that both generate background tasks. I have a generic background processor that picks up the task (= a specific CI controller/method) to execute. I can run this on the same system, or on other systems, and I can run as many as I need to handle the load. The only requirement is access to the database that holds the message queue.


Messages In This Thread
How to work communication between different physical servers? - by El Forum - 07-15-2010, 09:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB