Re: [PHP-DB] Re: remote database exchange

2001-07-17 Thread Manuel Lemos

Hello,

Ken Sommers wrote:
> 
> thanks for info,
> 
> suppose I need to keep a Vendors' price list on MY site in my mysql database
> (PHP4/mysql on a hosting company)
> and would like to keep it up to date. I would like to know about dropped or
> new items and of course price changes.
> i will not need inventory quantities.
> What;s the simplest and easiest way to do it?
> 
> the vendors database  may or may NOT be online.. and may be of any variety?
> 
> first thing that comes to MY mind is to ask them for a comma-delimited text
> file,,and I could somehow jam that into my mysql
> 
> updates would NOT have to be up to the minute.
> 
> I would be using these prices to compare to other vendors.

Assuming that you can already figure the information you need using
database queries, this is a case where a RPC protocol like SOAP will
suit your needs.

You need to setup a SOAP server that can be basically a PHP script
running in a Web server that handles SOAP requests by parsing a SOAP
request message that is in SOAP specific XML format and extract request
parameters. Then you use the request parameters (if any) to execute the
necessary database queries and marshalls a SOAP response that is
basically outputting some XML that contains the information that you
want to return to the client.

On the client end you need to build a SOAP request XML message and
submit to the SOAP server sending it using the HTTP POST protocol. Then
you wait for the response and unmarshall the SOAP response data that is
basically parsing the SOAP response XML message to extract the 
response values and use them as you need.

This class can be used as base of your SOAP server. You just need to
create a subclass to handle the specific actions of you service.

http://phpclasses.UpperDesign.com/browse.html/package/251

This other package contains an example of how to sub class the class
above to develop a custom SOAP server.

http://phpclasses.UpperDesign.com/browse.html/package/177


For the client side, I don't have right now a SOAP client class at hand,
but one code be build with this other classes:

XML writer class
http://phpclasses.UpperDesign.com/browse.html/package/251

HTTP client request class
http://phpclasses.UpperDesign.com/browse.html/package/3

XML parser class
http://phpclasses.UpperDesign.com/browse.html/package/4


I know there are some SOAP client request classes out there, but I can't
recommend one because I haven't tried any.

Regards,
Manuel Lemos

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: remote database exchange

2001-07-17 Thread Ken Sommers

thanks for info,

suppose I need to keep a Vendors' price list on MY site in my mysql database
(PHP4/mysql on a hosting company)
and would like to keep it up to date. I would like to know about dropped or
new items and of course price changes.
i will not need inventory quantities.
What;s the simplest and easiest way to do it?

the vendors database  may or may NOT be online.. and may be of any variety?

first thing that comes to MY mind is to ask them for a comma-delimited text
file,,and I could somehow jam that into my mysql

updates would NOT have to be up to the minute.

I would be using these prices to compare to other vendors.

thanks,

ken


- Original Message -
From: "Manuel Lemos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Ken Sommers" <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 8:17 AM
Subject: [PHP-DB] Re: remote database exchange


> Hello,
>
> Ken Sommers wrote:
> >
> > Is it possible to exchange data on remote databases in PHP mysql?
> >
> > Suppose I had a MUSIC database that you wanted your site visitors to be
able
> > to query,and it was OK with me because you had a MOVIE database that I
> > wanted MY site visitors to be able to query,
> >
> > Could we swing this?
> >
> > what is the name of this process?
> > remote process serving?
> > remote database access?
> > relay exchange process server?
> >
> > IF it exists,,where are all the tutorials and docs on it?
>
> If I were you I would avoid remote database access at all costs for two
> reasons:
>
> - Security: opening a door for remote database access via the Internet
> is asking for trouble. Anybody with knowledge could compromise your
> database server in serious ways.
>
> - Performance: exhcanging remote database request data via the Internet
> is not very fast, not to mention the chances of having the connection go
> down due to temporary routing failures. Your data exchange should be
> reduced to a minimum and should be done over a reliable medium.
>
> What I suggest that you do is to use some HTTP based RPC (Remote
> Procedure Call) method to request just the remote data or execute the
> operations you need.
>
> One of most promissing solutions is to use SOAP protocol over HTTP. SOAP
> is a protocol for making RPC using XML formatted messages.
>
> You may want to try this PHP class that is a base for developing
> arbitrary SOAP servers in PHP without much knowledge of SOAP.
>
> http://phpclasses.UpperDesign.com/browse.html/package/251
>
>
> Here you may find an real example one of a SOAP server via HTTP. It is
> used to make remote requests to a mailing list manager (ezmlm in this
> case), such as like subscribing and subscribing users, verifying if a
> user is already subscribed and return a count of how many subscribers
> there are in a given mailing list.
>
> http://phpclasses.UpperDesign.com/browse.html/package/177
>
>
> Manuel Lemos
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]