Page 1 of 1

Creating XML from MySQL for FLASH

Posted: Mon Nov 07, 2005 3:27 pm
by kendall
Hello,

I am developing a project for which i am developing an application that collects smiple information from a visitor and enters it into a database which flash uses to demonstrate a graphical chart.

i have theorized the process as follow

user submits information via a form which is entered into a database using php/ mysql . Flash later calls php that dynamically generates a dynamic xml file from the mysql and fed back to flash.

my question arises from the flash aspect.
Now i am expecting at up to 10,000 entries for the database and i expect a considerable amount of traffic for the flash side.
I want to get some advice on what approach i should use considering the following factors of this process
  • I have a target of 10,000 entries. is it feasable to have a php process to generate xml content on the fly from the mysql data to feed to flash?
  • ok so im thinking to make an xml file before hand. this means that the xml file can get considerable big(10,000 entries). would it be feasable for flash to pull a file that may grow to a considerable amt?
  • if i am to make an xml file it means i have to keep the data consistant with the mysql data. should i do this on a per entry basis. or would it be wise to regenerate the xml on a periodical basis(CRON job)
  • in updating the xml file i have php 4.3.1. should i use a fwrite() and write to the file. or would the domxml functions be more suitable given the below point...
  • Now i believe updating the xml file on a per entry basis would seem more suited but how would this affect the flash thats loads the xml when php is in the process of updating...

Kendall
if any of this is confusing ill be happy to further explain it.

i hope to get some feedback on this.

Posted: Fri Nov 11, 2005 3:32 pm
by wtf
I doubt Flash will be able to parse 10K of records especially xml. You have to think about the final xml filesize and for 10K records that could be in MB.

What are you exactly trying to display. Why not crunch data with PHP and just give Flash what it needs to display charts???

Creating XML from MySQL for FLASH

Posted: Sun Nov 13, 2005 12:38 pm
by kendall
Wtf,

WEll have been thinking about that as well. The project is an HIV/ Aids promotion that is trying to promote aids awareness. it works by one person sending a chain letter inviting 10 visitors to join the fight. from then each visitors are allowed to invite 10 other people and create a tree that shows the relationship and other statistical information. This is where flash comes in. Flash is being used to show a visiual chart showing this progress. Flash s going to also be showing the simple stats on each indiivual. The main purpose right now is to b uil the tree structure showing the progress/relationship. The thing is i am having php make and xml file that contains the information.

With your advice i guess what i should do is probably omit the statisical info (which is common things like, name, email, location, etc.) and probably let flash load that individually on demand.

What i was looking at is having to hit the database. Im trying to keep it very minimal.

Im also thinking to probably make individual output xml for each person with their stats, but 10,000 xml files???

The main thing here is im trying to build this with as much empahsis on effective connectivity between the apps given the expected trafffic to be incurred.

Thanks for your advice doe.

Kendall