Mapped Drive or UNC

This forum is for eXpress++ general support.
Message
Author
User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Mapped Drive or UNC

#1 Post by RDalzell »

I have the attached as the manner which I currently use to open databases & indexes running the application from a server location.
A new installation has issues with connectivty speed and I am looking to load the application at the client and direct to the database/index locations.

Is it better to store in a configuration the location of the databases/indexes like G:\_Psst or use the UNC \\ServerName\_Psst ?

It has been easy to simply update a single application location (server), rather than determine if an update is available, then download to the client the updated application.
But speed is speed.

Code: Select all

#include "Collat.Ch"

PROCEDURE MvFile (oSay1, oSay2)

  SET EXCLUSIVE OFF

  SET DEFAULT TO \_Psst\Mv
  Mvf100(oSay1, oSay2)                                        // OrdMst
  Mvf100a(oSay1, oSay2)                                       // AltOrdMst
  Mvf110(oSay1, oSay2)                                        // CompDtl
  Mvf125(oSay1, oSay2)                                        // DebtMst
  Mvf150(oSay1, oSay2)                                        // HearMst
  Mvf175(oSay1, oSay2)                                        // AssocMst
  Mvf185(oSay1, oSay2)                                        // BatchMst
  Mvf200(oSay1, oSay2)                                        // CashMst
  Mvf300(oSay1, oSay2)                                        // CrtMst
  Mvf400(oSay1, oSay2)                                        // StatMst
  Mvf450(oSay1, oSay2)                                        // MemoDtl
  Mvf475(oSay1, oSay2)                                        // DigiMst
  Mvf500(oSay1, oSay2)                                        // SeizMst
  Mvf510(oSay1, oSay2)                                        // SeizChg
  Mvf525(oSay1, oSay2)                                        // SeizHear
  Mvf550(oSay1, oSay2)                                        // SeizDtl
  Mvf575(oSay1, oSay2)                                        // DebtSeiz
  Mvf700(oSay1, oSay2)                                        // RedMst
  DocFile(oSay1, oSay2)                                       // Document

  MvLog(.t.)                                                  // System Access Log

  SET DEFAULT TO \_Psst\Cm
  Cmf110(oSay1, oSay2)                                        // AltMst
  Cmf125(oSay1, oSay2)                                        // LocMst
  Cmf850(oSay1, oSay2)                                        // CodeDtl
  Cmf855(oSay1, oSay2)                                        // CodeRate
  Cmf950(oSay1, oSay2)                                        // RcptMst

  SET DEFAULT TO \_Psst\Pe
  Pef000(oSay1, oSay2)                                        // PersMst
  Pef025(oSay1, oSay2)                                        // PersGrp
  Pef050(oSay1, oSay2)                                        // PersDtl
  Pef075(oSay1, oSay2)                                        // GroupDtl
  Pef200(oSay1, oSay2)                                        // CodeMst
  Pef200a(oSay1, oSay2)                                       // CodeAlt

  SET DEFAULT TO \_Psst\Pt
  Ptf700(oSay1, oSay2)                                        // CityMst

  SET DEFAULT TO \_Psst\Vr
  Vrf250(oSay1, oSay2)                                        // MakeMst

  SET DEFAULT TO \_Psst
  Appt(oSay1, oSay2)                                          // Appt
  CalMemo(oSay1, oSay2)                                       // CalMemo
  ToDo(oSay1, oSay2)                                          // ToDo  SET DEFAULT TO C:\

  IF Valtype(Set_MainWindow()) == 'O'
    SetAppWindow(Set_MainWindow())
  ENDIF

RETURN
Thanks,
Rick

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Mapped Drive or UNC

#2 Post by Tom »

Sharing folders (esp. local folders!) as drives can slow down everything dramatically, since the Windows redirector tries to repeatly synchronize somehow in this situation (a drive is in use two times!). This gets heavy if the shared folder is on a local drive of a workstation in the network. Using UNC-pathes instead can increase speed by factor 10 or even higher.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Mapped Drive or UNC

#3 Post by bwolfsohn »

Tom,

Your message has generated a long discussion here at our place w/ roger and our tech department...

The open question is:

If you are opening all files using unc, does the mere existence of a drive mapping to that unc still slow down the networking speed ?

thanks
Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Mapped Drive or UNC

#4 Post by Auge_Ohr »

bwolfsohn wrote:If you are opening all files using unc, does the mere existence of a drive mapping to that unc still slow down the networking speed ?
i guess we speak about Win7 / W2K8r2

MAP drive will use LanManager over NetBIOS using UDP Port 135 - 139 which we called SMB(1). if you look into Network Monitor you will see a strait line at same Level when transfer data.

Win7 / W2K8r2 like to use SMB(2) over Port 445 where data will be compress ( and crypt if enable ). If you look into Network Monitor you will see "burst packet" which is 10x bigger.

Win7 / W2K8r2 can use SMB(1) OR SMB(2). as i can say it will use that connection where it got "first Answer" ... and it will stay !!! re-boot does not help, you have to "flush" DNS on every Workstation.

read more about "Opportunistic Locking" (Server) and "Read Caching" (Client) on http://support.microsoft.com/kb/296264/en-us

!!! Note : XP did not know about SMB(2) so it will not search on other Ports than UDP 135 - 139 without NLA Hotfix
KB922120. it will include a new "Responder" and open a new Port > 1000
read more about "SMB2 Client Redirector Cache" at http://technet.microsoft.com/en-us/libr ... 10%29.aspx
greetings by OHR
Jimmy

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Mapped Drive or UNC

#5 Post by bwolfsohn »

Jimmy,

I'm wondering about all operating systems, not just windows7.

We disable smb2 in windows7. (we may also do it in vista.. not sure)..

We also make the registry entries to disable directory caching, etc..

Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: Mapped Drive or UNC

#6 Post by RDalzell »

This just brings me to the "Chicken or the Egg" - which came first.

If I want a configuration parameter to be set and read within the database, I need to access the database to read and maintain the configuration. If I have a configuration file within the locally installed application, this file requires to be updated at each client.

Is is a best practice to have an .ini file with the database location (UNC or mapped drive) on each client and upon initial application start, when the .ini file is empty or defaulted to "NEED TO BE DEFINED", prompt the user for the database location?

Anybody care to offer a suggestion is everybody else running the application from the same location as the databases reside?

Thanks,
Rick

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Mapped Drive or UNC

#7 Post by bwolfsohn »

Rick,
We've run our apps from a local drive ever since DOS... speed speed speed..
(I noted from your message the other day you're getting to that config now)..

We have a system.ini file located locally in the same dir as the app..

it contains drive paths, or unc's to all the database locations...

Brian

P.S. Will i see you in october ??
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: Mapped Drive or UNC

#8 Post by RDalzell »

Hi Brian,

Would be wonderful to see everybody again.

Sounds like a plan, would like to possibly extend a day or two for a strictly eXpress Devcon to really make use of the travel and opportunity.

Thanks for the input.

When I get it working, I will make certain to post the code should others desire to move in the same direction.

Best regards,

Rick

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Mapped Drive or UNC

#9 Post by bwolfsohn »

Roger & i talked about an additional day for express only when he was here last week..

That's what i'm envisioning...

Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Mapped Drive or UNC

#10 Post by Tom »

Hi, Rick.
Is is a best practice to have an .ini file with the database location (UNC or mapped drive) on each client and upon initial application start, when the .ini file is empty or defaulted to "NEED TO BE DEFINED", prompt the user for the database location?
"Best practice" is the solution that fits your needs. ;)

We provide several solutions. The database path can be added as a parameter to the application link - this is the most simple solution and fits for most of the cases. The app resides locally (in most situations), the database is somewhere on a server, which can be the same computer, but a different path! If there is no parameter or there is no database at the place to where the parameter points (IF FExists(<a_db_which_should_be_there>)), the app asks for the database path. If selected, it is stored to the registry (current_user). If not, the selection pops up again. After the third unsuccessful attempt, the app starts scanning for special database files or the data dictionary. If found, the path is stored (registry). If not, the data dictionary (XML) is created locally in a temporary folder, the database files are created there and so on. There also may be an INI-file (application path) which contains the db-path-information, but we stopped writing any data to the application path, so this is an absolute exception. So, the best way for me is: Registry. If no data is found, prompt. And reverse.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply