Regarding flat files: txt Vs xml files, which is faster for performance?

Regarding flat files txt Vs xml files

Hello all,

In our projects we are extracting SMS messages and based on the

MISDN (Telephone number) of each SMS we are fetching the corresponding

account information (server name and password) from the database through (connecting through) webservice.

This webservice connection is slow/unreliable so a local copy of the

MISDN number and corresponding account information are stored/updated in flat files tp prevent repeated accessing through webservice.

My question is-which will be faster for accessing, using txt file or xml or a different format.

the other information is - there will be roughly 10,000 SMSs processed each day and we can expect around 100 flat file created and updated regularly.

regards,

Deepak.

[823 byte] By [angeshwara] at [2007-10-3 4:41:39]
# 1

> In our projects we are extracting SMS messages and

> based on the

> MISDN (Telephone number) of each SMS we are fetching

> the corresponding

> account information (server name and password) from

> the database through (connecting through)

> webservice.

The data is stored in the DB which you are accessing through a webserivce and that's too slow and unreliable so you are caching the results in a text file...

That's horrible. The party responsible for the webservice should be fixing it or you should rethink the architecture. All this extra complexity and basically it's just causing problems for you. You'd be better off just accessing the DB directly. I assume this is possible since you know there is a database. In a good SOA architecture, you should not know or care about where the data is persisted.

> This webservice connection is slow/unreliable so a

> local copy of the

> MISDN number and corresponding account information

> are stored/updated in flat files tp prevent repeated

> accessing through webservice.

>

> My question is-which will be faster for accessing,

> using txt file or xml or a different format.

I don't think it's going to matter much at all for the numbers you site, unless you are running this on a 20 year old PC or something.

But I think you are addressing the wrong problem.

dubwaia at 2007-7-14 22:45:44 > top of Java-index,Other Topics,Algorithms...
# 2

Thanks for the reply, the application was initially developed in C and C++

and is now moved to Java and the spec i got was the one implemented using C++, there is a possiblity that there were some performance issues when the d/b was repeatedly accessed through webservice.

i will discuss with my colleague and come back.

but irrespective of using the webservice or not - which will be better for performance text files or xml files or anyother format?

(with the assumption that data from the d/b has to be defenitely stored in a localmachine for local/internal processing)

(the other assumption that there will be many number of files created and again storing/retreiving them in a d/b is considered to be redundant)

angeshwara at 2007-7-14 22:45:44 > top of Java-index,Other Topics,Algorithms...
# 3

It's hard to say for sure but most likely the plain text will be faster because there will be less to write and less code involved. But again, I don't think you'll even notice the difference. Unless these are very large messages, 10,000 is a pretty unimpressive number. A handful of sand on the beach.

dubwaia at 2007-7-14 22:45:44 > top of Java-index,Other Topics,Algorithms...
# 4
> Unless these are very large messages...They are SMS messages. 140 bytes maximum, I think, or something like that.
DrClapa at 2007-7-14 22:45:44 > top of Java-index,Other Topics,Algorithms...