Data Storage

Jan Schenkel janschenkel at yahoo.com
Sat Apr 5 02:17:04 EDT 2008


--- Dan Friedman <dan at clearvisiontech.com> wrote:
> Greetings!
> 
> If I'm using Revolution standalones on a series of
> clients, and I want to
> store semi-large to large amounts of data on a
> server and allow multiple
> users access to this data simultaneously, is my ONLY
> choice MySQL - on a
> server that allows remote SQL data access?  Are
> there any other options?
> 
> Thank you in advance,
> -Dan
> 

Hi Dan,

There's quite a few choices for multi-user databases:
MySQL, PostgreSQL, Valentina and if you have Rev
Enterprise, you get an Oracle connector as well.
However, believe me when I say you should avoid
connecting your client applications directly to the
remote database. Use some form of application server
instead.

One way of accomplishing this, is using the Revolution
CGI-engine. The Common Gateway Interface is a standard
extension mechanism used by Apache and MS IIS web
servers, where the web server starts command-line
applications and exchanges information using standard
input/output streams. 
Once the cgi-script has finished executing, the web
server will then send the output back to the client
computer. While this is mùostly used for web
applications, you can use Revolution 'get URL' and
'post to URL' commands to communicate with the server
without ever directly displaying the data in a web
browser. 

Another way of keeping the database communication
entirely on the server, is by writing a Revolution
standalone application that employs socket
communication to exchange data with the client
applications. 
You can think up your own protocol, or use the HTTP
protocol - that's up to your particular needs. For a
good example of how to implement this, head on over to
http://www.andregarzia.com/RevOnRockets/ 

The most important reasons not to directly connect
your client applications to the database are: 
- Security - fewer open ports on the server means less
ways for potential hackers to crack open the door (I
remember a particularly bad problem with an older
version of MS SQLServer, where a bug allowed worms to
bring entire companies to a grinding halt) 
- Scalability - if you have hundreds of clients, and
they all need a continuously open connection to the
database, that eats quite a few resources. Some
databases require a license per client, so if you can
just keep a small number of connections open on the
server, you pay less. 
- Version conflicts - when you update your
application, you have to install the update everywhere
at the same time. Forget a single client and your
database records may be filled with incorrect or
incomplete data. 

Just my two cents,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com



More information about the Use-livecode mailing list