Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Python

Communication between Python and PHP

 
Jump to:  
 
nicodotti2
PostPosted: Wed Jun 25, 2008 6:05 pm    Post subject: Communication between Python and PHP
       
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 Wink Thanks gurus out there.
 

 
Larry Bates
PostPosted: Wed Jun 25, 2008 6:50 pm    Post subject: Re: Communication between Python and PHP
       
nicodotti2 wrote:
Quote:
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 Wink Thanks gurus out there.

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

-Larry
 

 
nicodotti2
PostPosted: Wed Jun 25, 2008 10:59 pm    Post subject: Re: Communication between Python and PHP
       
On Jun 25, 1:50 pm, Larry Bates <larry.ba...@websafe.com`> wrote:
Quote:
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 Wink 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.
 

 
nicodotti2
PostPosted: Wed Jun 25, 2008 10:59 pm    Post subject: Re: Communication between Python and PHP
       
On Jun 25, 1:50 pm, Larry Bates <larry.ba...@websafe.com`> wrote:
Quote:
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 Wink 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.
 

 
askel
PostPosted: Tue Jul 01, 2008 3:59 am    Post subject: Re: Communication between Python and PHP
       
On Jun 25, 6:59 pm, nicodotti2 <nicodot...@gmail.com> wrote:
Quote:
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 Wink 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.
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Filmy computer talk Boksy reklamowe Rapidshare bielizna