Re: xml
| From: | Robert Munteanu | Date: | Mon, 17 Oct 2005 19:18:34 +0000 |
| Subject: | Re: xml | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21515@lists.php.net to get a copy of this message | ||
Jay Callicott wrote:
Hey Robert, Thanks for the help! In regards to your last comments, the updates don't have to be real-time, once a day is fine. I just want to "simply transfer the schema and information."Then you can use either DOM or SimpleXML ( simplexml is simpler :) ), not XMLReader as I had suggester ( it's a READER ).
Security isn't a huge issue but this is a paying service. I thought I might could use forms authentication or something to make sure ppl who are using the service are paying for it but that's not a huge issue.If you are using XML transport and willing to automate it, you're better off using XML-RPC / SOAP /whatever over HTTPS with basic authentication and IP-based restrictions. Also crypting the XML feed is an option, although it does complicate things.
Also performance isn't too much of an issue if this script is only going to run for a few minutes once a day. I don't want it running for an hour but a few seconds here and there doesn't matter. It will prob run at midnight every night. I will gladly consider any suggestions you have for sharing this data. Thanks!Database --> DB-neutral schema information ( MDB2 Schema ) -> Web Service Gateway -> HTTPS/Basic Auth over TCP -> Client That's the way I would do it at least. Robert
Jay ----- Original Message ----- From: "Robert Munteanu" <robert@rombert.is-a-geek.net> To: "Jay Callicott" <jrcallicott@gmail.com> Cc: <pear-general@lists.php.net> Sent: Monday, October 10, 2005 4:18 PM Subject: Re: [PEAR] xmlJay Callicott wrote:Hello Group,Hi Jay,I am running a web service and I would like to maybe broadcast the database in XML. I have using the RSS_Parser package before but I haven't ever played with exporting a whole database to XML. I was thinking of using the XML_Serializer package to serialize the database and save to file so that sites using the service could download the XML once a day and then convert that data into their own system's database.If your database is at least reasonably large, and performance is an issue, I suggest that you use the XML parsing extensions of PHP, and not PEAR packages. I would reccomend PHP5 with either DOM (faster) or SimpleXML (less memory-intensive).The idea behind this is making the database flexible so that different systems could read the data. I am kind of an XML newbie but am I right that SOAP is used to transport XML packets? Is that something I need to invoke manually or does that occur behind the scenes?You have multiple choices here, you can use XML-RPC, SOAP, REST ... . The first 2 are available as PEAR packages.I know with the RSS Parser I just give the link to the remote file and the parser handles all that for me. I don't know if XML_Serializer handles that as well. I don't even know if I'm going about this the right way. Does anyone have a suggestion of sharing my database in another way? I thought this would be helpful for people who don't necessarily want to use MySQL.In which way do you want to share it? Do you want to give others real-time updates or simply transfer the schema and the information? Is security an issue or do you simply need to send the data? Give us more details so we might help.Thanks! JayRobert