BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Possibly OT: Transactions in XML/CSV

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
Jeffrey A. Wormsley
Guest





PostPosted: Wed Feb 02, 2005 4:34 pm    Post subject: Possibly OT: Transactions in XML/CSV Reply with quote



I've been researching OPF's, and many of the examples I see use XML and/or
CSV because it is simple to use. The one I've looked at most recently is
tiOPF, and just reading through it, it struck me that all of the talk about
transactions doesn't apply to XML or CSV, the first two backends covered.
Also in the whitepaper about tiOPF, the Factory pattern was discussed with
reference to compression of data, and that got me to thinking. If your XML
or CSV data were to be stored compressed in a ZIP or Zlib file, then
opening a table would be in effect unzipping it. Starting a transaction
would be updating the ZIP to the current table state. Committing a
transaction would be the same. Rolling back a transaction would be
throwing away the table files and unzipping the file again. Obviously,
this is single user/single transaction, but it could be useful for small,
local data, as well as for proofing out your transaction code for example
apps. I suppose in memory tables could do the same with saving to file.

Just something that came to me last night. Possibly of use to no one.

Jeff.
Back to top
Peter Morris [Droopy eyes
Guest





PostPosted: Wed Feb 02, 2005 5:03 pm    Post subject: Re: Possibly OT: Transactions in XML/CSV Reply with quote



Quote:
Just something that came to me last night. Possibly of use to no one.

Including yourself ;-)

Zipping would be very slow. In fact, for a lot of data even XML / CSV would
be very slow and unusable. For single-user I'd choose FB-Embedded.


--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/



Back to top
Jim Cooper
Guest





PostPosted: Wed Feb 02, 2005 11:19 pm    Post subject: Re: Possibly OT: Transactions in XML/CSV Reply with quote




Quote:
In fact, for a lot of data even XML / CSV would
be very slow and unusable.

Hmmm, dunno. Depends on your parsing code I suppose. In general for
single user use it is much much faster to load data from a file than a
database. This really only starts to become a problem with very large
amounts of data.

Have you seen Prevayler? Works quicker than a database, mostly.

Cheers,
Jim Cooper

__________________________________________

Jim Cooper [email]jcooper (AT) tabdee (DOT) ltd.uk[/email]
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________

Back to top
Peter Morris [Droopy eyes
Guest





PostPosted: Thu Feb 03, 2005 9:31 am    Post subject: Re: Possibly OT: Transactions in XML/CSV Reply with quote

Quote:
Hmmm, dunno. Depends on your parsing code I suppose. In general for single
user use it is much much faster to load data from a file than a database.
This really only starts to become a problem with very large amounts of
data.

That's my point really. 100 objects would be pretty instant, whereas 100
million would take 10 minutes. The benefit of a "real" db is that it works
with sub-sections of the data rather than the whole database.


Quote:
Have you seen Prevayler? Works quicker than a database, mostly.

Yes, but that works mainly in memory and has a periodic backup to disk in a
separate thread. That's not the same approach as reading/writing all data
from/to disk each time you work with a transaction :-)


--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/



Back to top
Jim Cooper
Guest





PostPosted: Thu Feb 03, 2005 10:04 am    Post subject: Re: Possibly OT: Transactions in XML/CSV Reply with quote



Quote:
That's my point really. 100 objects would be pretty instant, whereas 100
million would take 10 minutes.

There is a cut-off point, of course. But how many single-user apps use
100 million records? None that I know of :-)

It is a viable option most of the time. However, if you ever want it to
scale...

Quote:
Yes, but that works mainly in memory and has a periodic backup to disk in a
separate thread. That's not the same approach as reading/writing all data
from/to disk each time you work with a transaction Smile

You only ever have to write to disk for a transaction Smile And Prevayler
does read everything in at the beginning. It's a cool system, and there
are stats somewhere on their site that show where the cross-over to a
database becomes quicker.

Cheers,
Jim Cooper

__________________________________________

Jim Cooper [email]jcooper (AT) tabdee (DOT) ltd.uk[/email]
Tabdee Ltd http://www.tabdee.ltd.uk

TurboSync - Connecting Delphi to your Palm
__________________________________________

Back to top
Jeffrey A. Wormsley
Guest





PostPosted: Thu Feb 03, 2005 4:41 pm    Post subject: Re: Possibly OT: Transactions in XML/CSV Reply with quote

"Peter Morris [Droopy eyes software]" <pete (AT) remove (DOT) this.droopyeyes.com>
wrote in news:420107fc$1 (AT) newsgroups (DOT) borland.com:

Quote:
Zipping would be very slow. In fact, for a lot of data even XML / CSV
would be very slow and unusable. For single-user I'd choose
FB-Embedded.

Certainly. But for small sets, such as used in examples or demos, it would
be fine. More of a learning tool for transactions, than a production
environment. Some small apps where the expected data volume is small (a
few tens of K, perhaps) might could get by with it. Certainly nothing to
use in a large or even medium scale app.

Jeff.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.