By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,702 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,702 IT Pros & Developers. It's quick & easy.

Communication between Python and PHP

P: n/a
Don't ask me why, but we have a bunch of legacy code in PHP on a
server and a wee-bit of Python code for integrating GData google
calendar services. We now need to build a way of sending messages
between them. The general flow is:

PHP Web Page(on apache) ---Python Gdata Consumer -----Gdata
and then json is returned back like:
PHP Web Page<----json data---- Pthon Gdata Consumer

So I tried to convince my boss to let me use the python c extension to
write a native bridge but 'no dice'. He also does not want anything
'experimental' so pyphp is out. He'd like me to basically have them
communicate by passing the json via http/apache - so in essence, I'll
have to make (what I feel) are very expensive calls between two
objects that, in a perfect world, would be on the same machine in the
same language! I see this as a potential bottleneck. Any suggestions?
I have to start prototyping this today so the sooner the better, um,
please ;) Thanks gurus out there.
Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies

P: n/a
nicodotti2 wrote:
Don't ask me why, but we have a bunch of legacy code in PHP on a
server and a wee-bit of Python code for integrating GData google
calendar services. We now need to build a way of sending messages
between them. The general flow is:

PHP Web Page(on apache) ---Python Gdata Consumer -----Gdata
and then json is returned back like:
PHP Web Page<----json data---- Pthon Gdata Consumer

So I tried to convince my boss to let me use the python c extension to
write a native bridge but 'no dice'. He also does not want anything
'experimental' so pyphp is out. He'd like me to basically have them
communicate by passing the json via http/apache - so in essence, I'll
have to make (what I feel) are very expensive calls between two
objects that, in a perfect world, would be on the same machine in the
same language! I see this as a potential bottleneck. Any suggestions?
I have to start prototyping this today so the sooner the better, um,
please ;) Thanks gurus out there.
Use sockets. They are efficient and both languages have good implementations.

-Larry
Jun 27 '08 #2

P: n/a
On Jun 25, 1:50 pm, Larry Bates <larry.ba...@websafe.com`wrote:
nicodotti2 wrote:
Don't ask me why, but we have a bunch of legacy code in PHP on a
server and a wee-bit of Python code for integrating GData google
calendar services. We now need to build a way of sending messages
between them. The general flow is:
PHP Web Page(on apache) ---Python Gdata Consumer -----Gdata
and then json is returned back like:
PHP Web Page<----json data---- Pthon Gdata Consumer
So I tried to convince my boss to let me use the python c extension to
write a native bridge but 'no dice'. He also does not want anything
'experimental' so pyphp is out. He'd like me to basically have them
communicate by passing the json via http/apache - so in essence, I'll
have to make (what I feel) are very expensive calls between two
objects that, in a perfect world, would be on the same machine in the
same language! I see this as a potential bottleneck. Any suggestions?
I have to start prototyping this today so the sooner the better, um,
please ;) Thanks gurus out there.

Use sockets. They are efficient and both languages have good implementations.

-Larry
Thanks Larry I'll look into going that route.
Jun 27 '08 #3

P: n/a
On Jun 25, 1:50 pm, Larry Bates <larry.ba...@websafe.com`wrote:
nicodotti2 wrote:
Don't ask me why, but we have a bunch of legacy code in PHP on a
server and a wee-bit of Python code for integrating GData google
calendar services. We now need to build a way of sending messages
between them. The general flow is:
PHP Web Page(on apache) ---Python Gdata Consumer -----Gdata
and then json is returned back like:
PHP Web Page<----json data---- Pthon Gdata Consumer
So I tried to convince my boss to let me use the python c extension to
write a native bridge but 'no dice'. He also does not want anything
'experimental' so pyphp is out. He'd like me to basically have them
communicate by passing the json via http/apache - so in essence, I'll
have to make (what I feel) are very expensive calls between two
objects that, in a perfect world, would be on the same machine in the
same language! I see this as a potential bottleneck. Any suggestions?
I have to start prototyping this today so the sooner the better, um,
please ;) Thanks gurus out there.

Use sockets. They are efficient and both languages have good implementations.

-Larry
Thanks Larry I'll look into going that route.
Jun 27 '08 #4

P: n/a
On Jun 25, 6:59 pm, nicodotti2 <nicodot...@gmail.comwrote:
On Jun 25, 1:50 pm, Larry Bates <larry.ba...@websafe.com`wrote:
nicodotti2 wrote:
Don't ask me why, but we have a bunch of legacy code in PHP on a
server and a wee-bit of Python code for integrating GData google
calendar services. We now need to build a way of sending messages
between them. The general flow is:
PHP Web Page(on apache) ---Python Gdata Consumer -----Gdata
and then json is returned back like:
PHP Web Page<----json data---- Pthon Gdata Consumer
So I tried to convince my boss to let me use the python c extension to
write a native bridge but 'no dice'. He also does not want anything
'experimental' so pyphp is out. He'd like me to basically have them
communicate by passing the json via http/apache - so in essence, I'll
have to make (what I feel) are very expensive calls between two
objects that, in a perfect world, would be on the same machine in the
same language! I see this as a potential bottleneck. Any suggestions?
I have to start prototyping this today so the sooner the better, um,
please ;) Thanks gurus out there.
Use sockets. They are efficient and both languages have good implementations.
-Larry

Thanks Larry I'll look into going that route.
I wouldn't even try to reinvent the wheel in such a case. You are
going to use GData and yet consider HTTP over LAN to be expensive. Get
real, man. Save yourself a time by not developing and supporting your
own very special wheel. Your boss is not that stupid as he probably
seems to you.
Jul 1 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.