Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Web traffic using XSLT on HTTP server


This topic is 7270 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey all. I would like to script an XML import that uses an XSLT on an HTTP server and am wondering if anyone has any metrics on how much traffic i would expect my web server to see? I'm thinking no more than 10 hits a week (at most) on that xslt. The .xslt is about 22 KB; the average .xml file, maybe 50K, and never any more than 100K, i wouldn't think. I don't know what else would be relevant...

TIA,

Jerry

  • 3 weeks later...
Posted

I would think that what would be more relevent would be the size of the output from the XSLT - that's the traffic. Example: a simple, 3 field, 75 records XML list of 5k to an XSL (22k) that creates a fairly simple HTML file with a size of 44k.

Does that make sense?

Posted

Thanks for resurrecting my dead post!

Yeah, that definitely makes sense. I'm not sure i follow you on the size calculations-- is that a formula, or is it just a "for example"?

I think i failed to mention -- both the original XML file and the FMP file it is being pulled into are local on my machine. That is, there is no web serving going on, i am just using a web-stored xslt to make the transfomation (because i am told this is more reliable under FMP6). Do you think this makes a difference, or should i still count on the size of the resultant FMP file or FMP-style data as the traffic?

J

Posted

It was just an example that the size of the XSLT or XML file is irrelevant. For example a very small XML file and a small XLST file to transform the data to a WORD document. The DOC file would be HUGE compared to the 2 original files.

OK - I think that if you are only storing the XSLT on the website, then the size of the XSLT file would be your traffic in the time it takes your machine to download the file. It's the same setup that FM Inc uses for the FMPXMLRESULT import/export. The transformation would be local.

Hope that helps...

Posted

In the dead time between Christmas and New Year's Day, i've finally gotten around to testing this, and it turns out you're right, though maybe off by an unexpected factor of 2 -- allow me to explain:

I used some trialware i found at download.com to monitor uploads and downloads. The software i found, NetPeeker by Ming Jin, is really neat and allows you to monitor net traffic by application and/or process. I found it very useful.

Monitoring internet connection activity through the various stages of an XML import using an online (HTTP) XSLT file, i learned that the XSLT is called only at the point at which FM needs to transform XML data into an FM-importable file, that is, when i click "OK" on the "Specify XML and XSL Options" dialog to go to the "Import Field Mapping" dialog. This makes perfect sense, as it is at this point that FM would need to translate the local XML into local FMPXMLRESULT data.

What surprised me is that there are actually two downloads that occur at this point, both of exactly the same size. That size is, unsurprisingly, almost exactly equal to the size of the XSLT stored on the HTTP server. Why the two downloads, which occur less than one second apart, is unclear to me.

There is no further web traffic related to the XML import after this.

So, i think the answer to my intial question ("How much web traffic will an online XSLT generate?") is, 2 times the size of the XSLT file for each time that file is accessed.

I hope this is useful to someone.

J

Posted

hmmm... interesting in the double download...

Just off the top of my head - once the first download happens, the file is somewhere in the temp internet files and could be accessed from there.

It bears some investigation why the second download.

Posted

A puzzle for sure.

It seems that FM appends, or imports, or somethings, the XSLT into a file called XML.imp which can be found in the FM system folder. It then creates a file in the environmental temp directory called Out.xml. (I am not quick enough to test this, but i surmise that at this point, Out.xml is a blank file in FMPXMLRESULT grammar.)

Less than a second later, FM opens the local XML file and (again i surmise) begins to fill up the file Out.xml with data as it parses the original XML file. Because there is a second hit on the remote XSLT, i must guess that FM is again using the remote file to transform the original XML data into an FMPXMLRESULT. I am unable to detect a file on the local machine that could represent a downloaded XSLT.

It looks as if there were 66 writes to Out.xml in my example, a number which cannot be easily traced back to anything in the data (either lines or elements), but i'll keep trying. Each write was 1024 bytes.

Once all the original XML data has been transformed into FMPXMLRESULT, the HTTP server is no longer necessary and web communication ceases. At this point, Out.xml (the FMPXMLRESULT) exists until the user commits the import (that is, clicks the "Import" button in the dialog box).

I'm not sure where all this is taking us, but it sure is fun figuring it out. Maybe Stephen will give me the award for "Longest, Most Rambling, and Most Useless Post." smile.gif

J

PS I used a freeware utility called Filemon.exe from Sysinternals to monitor file creation/deletion and read/write activity if you're interested.

This topic is 7270 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.