[Gambas-user] Changes in LINK

Christopher Brian Jack brian at ...1334...
Sun Oct 29 09:14:21 CET 2006


On Sun, 29 Oct 2006, Benoit Minisini wrote:

So is the moral of the story to use compression, base64 (since most DB
drivers aren't 8-bit clean) and a database driver, such as MySQL or
PostgreSQL, instead of files?

May require some lightning-fast MMX-optimized base64 encode/decode algs.
Base64 also solves 1001 of the security issues introduced in the DB if
attempting to use non-standard methods to store octet (8-bit clean) data
in DB fields.

I know the DB drivers support locking in the appropriate capacity.

> Date: Sun, 29 Oct 2006 10:01:20 +0100
> From: Benoit Minisini <gambas at ...1...>
> Reply-To: mailing list for gambas users
>     <gambas-user at lists.sourceforge.net>
> To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Subject: Re: [Gambas-user] Changes in LINK
>
> On Sunday 29 October 2006 00:54, Christopher Brian Jack wrote:
> > On Sat, 28 Oct 2006, Benoit Minisini wrote:
> > > You have the LOCK and UNLOCK keyword for locking/unlocking a file opened
> > > for writing.
> > >
> > > Maybe I should rewrite them so that they work on a path and not on a
> > > file. This will be easier to use: you choose a path file that will work
> > > as a lock, and you use LOCK and UNLOCK on it.
> >
> > There are times where locking is desirable for readers as well as writers
> > such as when access to one part of a file is an index to where other data
> > should be written.  If a race condition develops between two concurrent
> > accessors on the file and one changes the index between the time the first
> > app does it's read then reopens for write+lock there will definately be
> > file inconsistencies and a whole new insect kingdom of bugs--that the
> > programmer didn't even know existed--creeping in.
> >
> > Hopefully locks can be requested when the file is open FOR BOTH?
> >
>
> Actually the goal of LOCK and UNLOCK is not locking files (funny, isn't it?).
> It's a way for implementing a system-wide critical code section by using a
> file as a lock. LOCK/UNLOCK will ensure that there is only one process that
> run a piece of code at a time.
>
> Real file locking is a problem, as it depends on the underlying O.S., the kind
> of locks supported by the filesystem where the file to lock is located, if
> the file system is on a network, which system call you use, if the file is
> buffered...
>
> Look at 'man fcntl', 'man flock' and 'man lockf'. It is a real mess!
>
> Regards,
>
> --
> Benoit Minisini
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher





More information about the User mailing list