Spliting - Sharing Database: best structure?

F

Fjordur

Hi,
I am developping a application that will be used multiuser (1 to 5 user,
say), deplyed in several sites.
What's the differences, in terms of
- user experience
- data management (backup...)
- application management
of the 3 following stuctures:
1. application split: data on network shared folder; application (forms
etc..) duplicated on each client PC (then we must maintain multiple
clients); this seems to be the recommended solution if I understand
correctly the sites and docs I've read
2. application split, both data and application part sitting on a shared
folder (only one place to maintain both data and application, launch of
application maybe a bit slower than solution above)
3. application not split, sitting on a shared folder (difficult to maintain
the app independant of client's data)
I tend to see structure #2 as best, am I right?
 
B

Biz Enhancer

I am assuming that being "deployed over several sites" does not mean multiple
backend requiring syncronisation, but that these far flung sites all have
access to the same shared drive.

For my money go with scenario 1. I use this structure in preference to any
other.
Distribute one mde file to the users. They can't change the application,
only use it. As you will have the mdb original there is no need to backup any
mde copy. You only need to backup and maintain the backend tables on the
server/network drive.
Any changes to the frontend just redistribute a new version of the mde file.

The main user issue is to link the front end to the tables. Dev Ashish has
written a nice piece of code that removes a lot of the hassle See:"Tables:
Reconnect linked Access tables from code" at
http://www.mvps.org/access/index.htm

Scenario 2. What do you gain? If your frontend is an mde file you don't need
to back it up. This scenario just costs speed.

Scenario 3. Lets just say that disaster looms with speed issues and data
corruption risks.

That's my opinion anyway.

Best of Luck.

Nick.
 
T

Tony Toews

G

George Nicholson

lol, are the kind words better (or as good as) money? I was just thinking
about writing you a check...
 
F

Fjordur

Albert D.Kallal said:
the problem with #2 is that multiple users are running the same software.
I explain in detail here why you don't want to do this:
http://www.members.shaw.ca/AlbertKallal/Articles/split/index.htm
Hmmm.... I am entirely sold to the concept of splitting, of course.
The case you make for distributing the FE is another story, and I think I
may lack some information about how Windows runs applications from a
network. Can you, or anyone, tell me more about the following:
- if I build a FE mde file, does it need the Access runtime to run, or is
the mde file really independant, as an exe is?
- if an mde needs the runtime, then I must distribute both the runtime
(once, as it never changes) and the FE (each time a new version is issued),
right?
- if I understand correctly (hope I do but English is not my language :),
you state that running for ex. Word from a server is a risk as users may
modify each other's preferences or options, or if one user's Word freezes
then all users' Words may freeze too. This is a very disturbing thought to
me: do you mean that launching an app from a server runs that app in the
context of the shared folder? in my mind the code would be running on the
client PC's memory, freezing only that PC, and (if the developpers did their
homework) saving preferences on the client PC. To be technical, is the code
reentrant or not? I mean it in the sense of
http://www.pcmag.com/encyclopedia_term/0,2542,t=reentrant+code&i=50332,00.asp
- running a FE does not modify that FE itself, right? So I imagine that
having the FE file sit on the server and clicking it would first copy it
into the client PC's RAM then run it, accessing the shared data. This should
not be a problem, apart from the network load which is another story. What's
wrong in my reasonning, if the FE file is not modified by being run? or is
it?

Thanks for your help, and for the link to autofe
 
A

Albert D.Kallal

The case you make for distributing the FE is another story, and I think I
may lack some information about how Windows runs applications from a
network. Can you, or anyone, tell me more about the following:
- if I build a FE mde file, does it need the Access runtime to run, or is
the mde file really independant, as an exe is?

You need the runtime files to be installed...
- if an mde needs the runtime, then I must distribute both the runtime
(once, as it never changes) and the FE (each time a new version is
issued),
right?

Correct. Just like when you use VB, you must distribute the VB runtime. And,
now we have .net, and you need to distribute the .net runtime.

So, be it the VB runtime, the new .net runtime, or the ms-access
runtime..they are all the same in concept..and ONLY need to be installed
once...

After that, you STILL INSTALLED YOUR SOFTWARE ON EACH COMPUTER!!!!!
- if I understand correctly (hope I do but English is not my language :),
you state that running for ex. Word from a server is a risk as users may
modify each other's preferences or options, or if one user's Word freezes
then all users' Words may freeze too.

Ah but in the above you are NOT RUNNING WORD on the server. However, the
problem about users
settings etc. is correct as you state above.

However, in point, the above is talking about a document..and NOT a
application
This is a very disturbing thought to
me: do you mean that launching an app from a server runs that app in the
context of the shared folder?

I simply said is that you normally install your software on each computer. I
quite sure that you installed word, and excel on EACH computer in your
office. The additional issue that software today has MANY settings. Default
printers...temporary files for storing stuff...it is quite a long list.

So,
there is two issues here. If you mess up the settings for word..you can
really make it run poor..but at least everyone else will still be able to
run their copy of word (along with the many many settings and config
files). Software today is complex, and has MANY settings.

The WHOLE POINT of my article is that ms-access is a tool that CREATES
software...and thus it should be placed on each computer like all other
software.
in my mind the code would be running on the
client PC's memory, freezing only that PC

Well, the problem is that more then just memory is used. There is temporary
tables, filters...all kind of stuff that is saved in the application. Word
can remember my margin settings, my default printer...my user name...stuff
to run on startup....there is TONS of settings. Most of these settings are
not a problem..but sharing them most certainly would be...

So, there is MANY MANY things that occur here, and MUCH of it is not just
memory based. It would be great if we were talking about a small little
stand alone .exe.).

When you start talking about larger and complex systems like word or a
database program..then there is ZILLIONS of settings and parts and pieces
are not necessary in RAM.
, and (if the developpers did their
homework) saving preferences on the client PC. To be technical, is the
code
reentrant or not?

very good point.

This is much of the problem. In fact, the runtime code (msaccess.exe) is
re-entrant, those mde files are not. Thus, if a system could isolate
that temp stuff for each user..then you would eliminate the many problems.
- running a FE does not modify that FE itself, right?

Well, that is the problem......it does!

However, lets assume that the FE does NOT modify it self. You STILL want to
install the mde on each workstation. The reason is network load.

The fact of the matter is you increase the load on the network when you
share
the mde file on the server. A car engine might have a 7000 rpm red line..but
that does not mean you can run the car at 7000 rpm limit all day long (it
will break!!).

The same concept applies to the network. So, when you place the mde on the
network share..you increase the load on the network..and hence increase
errors and collisions, and load on the network. IT is REALLY that simple!!
So I imagine that
having the FE file sit on the server and clicking it would first copy it
into the client PC's RAM then run it, accessing the shared data. This
should
not be a problem, apart from the network load which is another story.
What's
wrong in my reasonning, if the FE file is not modified by being run? or is
it?

Again...you point out well the issue "apart from the network load".

As mentioned, when you increase the load on the network, the number of
errors
on the network goes up. Further, some of the mde is modified, and all kinds
of temp tables..and data does often get changed. (but, even if it did
not..you still increase the network load..and reduce reliability of the
system).

So, the problem is two problems...some things do change in the file, and
even if they did not, you are still INCREASING the network load....and thus
increase the chance of errors. Remember, the problem here is that a mdb file
share is VERY sensitive to network problems.

I explain with a diagram as to why ms-access files corrupt here:

http://www.members.shaw.ca/AlbertKallal//Wan/Wans.html

While the above article is related to a broken connections, it simply
remains
a fact that file share databases are VERY sensitive to network problems. So,
by placing the mde on EACH computer, you reduce the network load, and in
fact keep the traffic rate BELOW that of were collisions and problems will
occur.

A file transfer protocol like FTP has error checking..but "pieces" of the
file are never spread into memory like a mdb file is on a share. So, mdb
files are MUCH more sensitive to network problems.

You CAN run a mde file on the server..and share it. Go ahead..do it.....It
will work...but you will simply reduce the reliability of the system. Try
it...some posters here have said they done this for years. Others have said
they had nothing but problems..and when they split...all errors and
problems went away. It likely depends on how good the network is setup (do
you use switches in places of hubs for example).

There is used to be doctors that did not believe that washing hands makes a
difference. Some doctors actually used to smoke cigarettes during
operations.
And some people don't want to listen to auto machines that tell them it a
good idea to change the oil in the car. (and, if you don't change the oil
tomorrow..your car will not necessary break tomorrow either).

At the end of the day, this really come down to how reliable of a setup
you want. Further, as you can see, a mde database is VERY sensitive
to breaks and network problems...much more so then a excel, or word
documents..as those documeneats ARE transferred into memory.

So, placing the FE on each computer simply reduces the load..and reduces
those errors.

When you look at that diagram, and how sensitive file systems are to
network, you will begin to understand why a SIZEABLE portion of the computer
industry does NOT even believe in file share database systems (they suggest
to use a server based system).
 
F

Fjordur

Albert,
Thanks for the interesting discussion.
The key point is the fact that, as you say, mde code is NOT reentrant. So it
just CAN'T be shared reliably. Period.
I agree w/ you about the network load and reliability, too, but that wasn't
my primary focus here.
 
A

Albert D.Kallal

mde code is NOT reentrant

Well, only if you use temp tables...and such....

To be fair, you did point out that a "copy" is loaded into ram on each
computer. So, in a sense, the actual issue of the code being re-entrant
never comes into play. (and, some have actually tried setting the FE to read
only...and apparently this works - but, you still increase the network
load).

And, to really be fair..since the p-code engine, and runtime libraries ARE
re-entrant..then one should actually be able to share a mde file...but it
just the network load..and *most* of the time some temp tables etc are used.

However, from a straight technical point of view...I don't believe the issue
of the code (in the mde) being re-entrant every come into actual play here
(It would not be a issue...since the code is local to each computer). The
real answer is the network load...and use of temp tables etc...
 
F

Fjordur

Albert D.Kallal said:
Well, only if you use temp tables...and such....
Waht d'you call temp tables? tables that the programmer defines and use for
temporary data? or tables used by Access outside of programmer's knowledge?
To be fair, you did point out that a "copy" is loaded into ram on each
computer. So, in a sense, the actual issue of the code being re-entrant
never comes into play. (and, some have actually tried setting the FE to read
only...and apparently this works - but, you still increase the network
load).
Network load for the FE is entirely a memory management problem. One can
expect the runtime to load the FE in memory once at launch and never use the
network for the FE again, only for data. Or at least to page it efficiently.
As you correctly pointed above, reentrancy is really a problem of safe,
concurrent, multiple use of a program in RAM. The question of sharing safely
the FE on a network is "does running the FE on a client modify the FE file
on the server?" (hence the read-only you just mentionned). Where do we get a
100% reliable answer to that? didn't find it in MS docs.

Also, what do people here think of NOT splitting some reference, read-only,
tables, so they're included in the FE. (ex.: country codes). This would
increase slightly the size of the FE, but would lessen the network load,and
make accessing those tables faster.
 
T

Tony Toews

Fjordur said:
Network load for the FE is entirely a memory management problem. One can
expect the runtime to load the FE in memory once at launch and never use the
network for the FE again, only for data.

But that's not how it works. If you start using an MDE the date/time
on the MDE gets updated. And it increases it's size slightly when in
use..
As you correctly pointed above, reentrancy is really a problem of safe,
concurrent, multiple use of a program in RAM.

If it was an .exe I'd agree with you.
The question of sharing safely
the FE on a network is "does running the FE on a client modify the FE file
on the server?" (hence the read-only you just mentionned). Where do we get a
100% reliable answer to that? didn't find it in MS docs.

All I can suggest is try it yourself and see if the date/time and size
gets changed.
Also, what do people here think of NOT splitting some reference, read-only,
tables, so they're included in the FE. (ex.: country codes). This would
increase slightly the size of the FE, but would lessen the network load,and
make accessing those tables faster.

Sure that'd work. My only problem is that you lose relational
integrity with that but if it works go for it.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top