Jump to content

Recommended Posts

S'up freaks  ;D

 

I will have 70 sites fetching data from one "master" website.

Each site will need different portions of the data.

 

The client wants to manage all the sites from one main control panel.

 

The data is a list of items, each record has data like (name,date,etc...)

Each item has one or some websites that will use it.

 

Each website will get it's corresponding items from the "master" website.

 

Is the right way of doing this is via XML?

Each website would request the feed like feed.php?site_id=10,

Then it would get it's specific data.

 

Now,

What are the best practices for doing this?

  • Caching the feeds and checking if there was an update?
  • Learning what the hell is XML-RPC?

 

Something I'm missing?

 

Thanks,

dror

Link to comment
https://forums.phpfreaks.com/topic/116480-is-xml-the-right-solution/
Share on other sites

You could do it with XML but the sole idea of using XML is that it is non platform specific so a site written in java or asp or any language could parse the XML and display the results identical on each.

If all your sites are php based then you could grant access direct to the database from each IP that your site is hosted on (setup good username and passwords) and make the queries direct. Essentially if you were to make an XML request it would be created by pulling data from your database anyway so using XML may just create extra work.

I'm going to say again... DB and Webservices. You wouldn't have to grant direct DB access to every client. The server code for the webservice would be all that needs to communicate with the database and then send the appropriate information back to the client... if for some reason you just want to parse XML, then have the webservice return XML, but use the database to manage the larger quantities of data more efficiently.

 

XML is great for small amounts of data and being platform independent (though damn near all languages can query databases with relative ease)... XML just can't compare to the speed and ease of search that databases provide.

I've been messing with Zend framework and some new stuff and this my new approach.

 

Each site will have it’s data on a locally stored XML file.

 

The master site can trigger an update on the client site,

which would make the client to get an update XML file and cache it.

 

This way The data is stored only on one database.

I'm going to say again... DB and Webservices. You wouldn't have to grant direct DB access to every client. The server code for the webservice would be all that needs to communicate with the database and then send the appropriate information back to the client... if for some reason you just want to parse XML, then have the webservice return XML, but use the database to manage the larger quantities of data more efficiently.

 

XML is great for small amounts of data and being platform independent (though damn near all languages can query databases with relative ease)... XML just can't compare to the speed and ease of search that databases provide.

 

 

So, do you basically mean a web API?  Kinda like facebook and a few other large sites do?  (Well, their system is obviously security tight, but you know what I mean.)

You could use it as an API if you wished to do so. I personally just like it as an integration tier. If you've got data and/or calculations that you need to share between different applications, you can leverage webservices for them to communicate. It provides a level of interoperability between different languages (ex, PHP could consume an ASP.NET webservice, and vice versa). There is also a level of security in that you don't have to give direct access to your DB, only certain information you want to share, etc.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.