mixing samba and netio RPC access to DBFs

320 views
Skip to first unread message

Francesco Perillo

unread,
Nov 22, 2016, 11:48:37 AM11/22/16
to harbou...@googlegroups.com

My software works flawlessy using a samba share on a linux server and several 7/8/10 clients. 99% of users actions are quick. The slow 1% includes reports or free-form queries that can't use indexes and since oplocks are disabled, speed is very low. When executed locally, a job takes 3 seconds, via lan up to 300...

I don't have time and probably not brave enough to port everything to netio but I'd like to improve the 1% moving all the action on the server.

I'd like to implement reports and queries directly on the NETIO server via RPC calls: i send to the server the report name and all needed parameters and it churns the data locally. It may create a PDF or temporary DBF file and return the path to it or return a JSON with the results.

So, what I'm really looking for is to understand if this concurrent access setup is supported and if anyone is using it in production:

- MS clients access DBF and index files via SMB/Samba (no oplocks) share with READ/WRITE/LOCK
- LINUX server opens DBF and index files locally as READ-ONLY to serve data via NETIO RPC access

There will never be, by design, the need to lock files/record from linux.

Is this sound? Does anyone have this setup?

Thanks,
Francesco

Ash

unread,
Nov 22, 2016, 1:03:32 PM11/22/16
to Harbour Users
Hello Francesco,

I do not have NetIO with RPC setup but found speed in LetoDB. Here is an example.

Customer aged balances report takes:

Samba Share   345 seconds
LetoDB              47 seconds

Hope this helps.

Regards.
Ash

Francesco Perillo

unread,
Nov 22, 2016, 1:12:07 PM11/22/16
to harbou...@googlegroups.com
Hi Ash,
I'm sure that LetoDB is a good choice and probably can solve some of my problems but I'm sure that NETIO RPC can be way way quicker.
Can you run the same job on local disks?

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Francesco Perillo

unread,
Nov 22, 2016, 6:53:31 PM11/22/16
to harbou...@googlegroups.com

Just one stat: a report running from a MS workstation via LAN on a samba share takes 37 seconds to complete. The same exact code compiled under linux and running on the local disks takes 0,25 seconds.

Yes, we are comparing apples and oranges and just examining one specific use case... but this report depends on user defined parameters and it is run - in a particular period of the year - at least 100 times.

Probably LetoDB can have such speedups too, but at the moment I'm not ready to give up old, proved, time-tested, reliable, standard dbf access.


Nenad Batoćanin

unread,
Nov 22, 2016, 9:23:29 PM11/22/16
to Harbour Users
LetoDB is a good solution, because it does not require any changes in the program. They just need to add a few commands to start. For example, I have one .exe which works with Letodb or shared folder, depending on the single directive in ini file:

Letodb = TRUE/FALSE

Speedup is not as on the local machine, but it is certainly faster than the standard LAN access. Also, there is server-side procedures that make it possible to further accelerate critical procedures. There are still some problems, but LetoDB was basically a very good product. Yes, the same program can run on the local disk without additional settings. 

Regards, NB

Ash

unread,
Nov 23, 2016, 7:33:39 AM11/23/16
to Harbour Users
Hello Francesco,

Report takes 6 seconds to complete when run from a local disk.

Regards.
Ash

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Ash

unread,
Nov 23, 2016, 7:35:10 AM11/23/16
to Harbour Users
Hello Nenad,

Can you share the issues you are having with LetoDB?

Thanks.
Ash

Abe Buchinger

unread,
Nov 23, 2016, 8:56:34 AM11/23/16
to harbou...@googlegroups.com
Hi,
LBM_DBSETFILTERARRAY not working is my showstopper.

*****************

proc main()
local x

REQUEST LETO
DBCREATE("//127.0.0.1:2812/Test", {{"F1","N", 10,0}}, "LETO", .T. , "test")
for x := 1 to 10
append blank
field->f1 := x
next
browse()  //sow all
LBM_DBSETFILTERARRAY( {2,4,6,8,10} )
browse() //show filtered
 
dbDrop( "test" ,,"LETO") 


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

marcelo.tavares

unread,
Nov 23, 2016, 8:57:02 AM11/23/16
to Harbour Users
Hi. I will post my issue here now. I hope some ideas or sugestions!


LetoDB is stable and run OK, basically!


My dbfcdx app in ssh Linux server by "putty" is OK. ( more than 20 machines ).

I run in some machines ( 1 , 2 or 3 machines ), a Windows version of my software via SAMBA, open share, because hardware direct acess is needed.

LETODB SAVE MY LIFE BECAUSE I CLOSE MY APPLICATION ( NO MORE SAMBA SHARE, NO MORE MAPPED DISK ). THANKS A LOT.

Now, Leto OK for me with letodb.ini:

Share_Tables = 0
Cache_Records = 0

My Linux and my Windows app use LETODB RDD.

 
I wonder! My Dream!!!!! is:

Share_Tables = 1

My Linux app direct acess with DBFCDX. ( Speed e management facility ).
My Windows app acess with RDDLETO

The issue:

Cache of LetoDB return old values when same data record is posted by DBFCDX.

The issue can be solved by alternate method:

In LETODB/Windows APP, run:

 SKIP; SKIP -1

 or

  DBGOTO( RECNO() )

before read/access record in dbf file.


My app is big. I can't do ALTERNATE solution!


Sorry my poor english!

Regards, MGT

Nenad Batoćanin

unread,
Nov 23, 2016, 8:24:36 PM11/23/16
to Harbour Users
Hello Ash, 

I use Letodb several months on multiple installations (more than 100 workstations). There were various problems, but I solved them thanks to Tsarenko and Alkresin. There are still some unsolved problems.Occasionally occurs internal error (Unrecoverable error 6005: Exception error) in the commands like SKIP, RecNo(), etc. without a visible reason. This only happens on some computers. There are also various limitations. For example, transactions have serious limitations if you use a greater amount of data. SET FILTER can not use other working areas.

Regardless of these problems, I am very pleased with the Letodb. 

Regards, NB

Nenad Batoćanin

unread,
Nov 23, 2016, 8:28:56 PM11/23/16
to Harbour Users
I think that this feature require BMDBFCDX/BMDBFNTX driver. 

regards, NB

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nenad Batoćanin

unread,
Nov 23, 2016, 8:32:06 PM11/23/16
to Harbour Users
Absolutely true. Users (and viruses!) can no longer from a workstation damage or delete dbf tables od server. 

Regards, NB

elch

unread,
Nov 29, 2016, 4:55:08 AM11/29/16
to Harbour Users

Hi,


you have to understand, that there is the data at server, and a copy of the data at client side ( == your application ).

To get changed data from server, you have to request for that with a DbGoto() or DbSkip().


--

* unfortunately DbSkip(0) will never! fetch new data *


For other DbSkip( != 0 ) the default hotbuffer timeout is 1 second.

It can be changed by using the 5. param of:

leto_Connect( "//IP:port/", /*user*/, /*password*/, /*timeout*/, 1 /*hotbuffer*/ )

Minimum: 1

Do not use 0: that is infinite caching.

Default: 100 == 100/100 == 1 second.


--

At server, minimum:

Cache_Records = 1


regards

Rolf

elch

unread,
Nov 29, 2016, 5:00:19 AM11/29/16
to Harbour Users
Hi,

LBM_DBSETFILTERARRAY not working is my showstopper.

re-compile server AND client with __BM flag for rushmore index support.
Study the readme.txt how to do.

elch

unread,
Nov 29, 2016, 5:12:26 AM11/29/16
to Harbour Users
Hi Nenad,

 
There are still some unsolved problems.Occasionally occurs internal error (Unrecoverable error 6005: Exception error) in the commands like SKIP, RecNo(), etc. without a visible reason. This only happens on some computers. There are also various limitations. For example, transactions have serious limitations if you use a greater amount of data. SET FILTER can not use other working areas.
 
try LetoDBf-ork 8-)

Rolf

Mario H. Sabado

unread,
Nov 29, 2016, 6:33:56 AM11/29/16
to harbou...@googlegroups.com

Hi Rolf,

Would you mind sharing the downlink of LetoDBf-ork?

TIA,
Mario


--

elch

unread,
Nov 30, 2016, 10:57:16 AM11/30/16
to Harbour Users
Hi Mario,

the 'f' for fork, but without 'ork'.

https://github.com/elchs/LetoDBf

I will prepare an own thread for that, as months of mine work therein ...


best regards

Rolf

Mario H. Sabado

unread,
Nov 30, 2016, 10:54:12 PM11/30/16
to harbou...@googlegroups.com

Sorry for that Rolf. Thanks!


--
Reply all
Reply to author
Forward
0 new messages