Very Very Good News!

Harbour, MingW related news.

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Very Very Good News!

Post by Roberto Lopez » Wed Sep 02, 2009 2:35 am

This message has been posted in the Harbour developers mailing list and it brings very very good news for all Harbour users:

Code: Select all

Revision: 12382
          http://harbour-project.svn.sourceforge.net/harbour-project/?rev=12382&view=rev
Author:   druzus
Date:     2009-08-31 22:56:45 +0000 (Mon, 31 Aug 2009)

Log Message:
-----------
2009-09-01 00:56 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
  * harbour/harbour.spec
  * harbour/harbour-win-spec
  * harbour/harbour-wce-spec
  * harbour/bin/hb-func.sh
  * harbour/contrib/Makefile
  + harbour/contrib/hbnetio
  + harbour/contrib/hbnetio/netio.h
  + harbour/contrib/hbnetio/netiomt.prg
  + harbour/contrib/hbnetio/netiocli.c
  + harbour/contrib/hbnetio/netiosrv.c
  + harbour/contrib/hbnetio/Makefile
    + added new library: HBNETIO.
      It implements alternative RDD IO API which uses own TCP/IP sockets
      to exchange data between client and server.
      This library contains client and server code and is fully MT safe.
      On client side it's enough to execute:
         NETIO_CONNECT( [<cServer>], [<cPort>], [<nTimeOut>] ) -> <lOK>
      function to register alternative NETIO RDD API and set default
      server address and port.
         <cServer>  - server addres       (default 127.0.0.1)
         <cPort>    - server port         (default 2941)
         <nTimeOut> - connection timeout  (default -1 - not timeout)
      Above settings are thread local and parameters of the 1-st successful
      connection are used as default values for each new thread.
      After registering NETIO client by above function each file starting
      "net:" prefix is automatically redirected to given NETIO server, i.e.
         use "net:mytable"
      It's also possible to pass NETIO server and port as part of file name,
      i.e.:
         use "net:192.168.0.1:10005:mytable"
      On the server side the following functions are available:
      create NETIO listen socket:
         NETIO_LISTEN( [<nPort>], [<cAddress>], [<cRootDir>] )
                                                -> <pListenSocket> | NIL
      accept new connection on NETIO listen socket:
         NETIO_ACCEPT( <pListenSocket> [, <nTimeOut>] )
                                                -> <pConnectionSocket> | NIL
      start connection server:
         NETIO_SERVER( <pConnectionSocket> ) -> NIL
      stop connection accepting or connection server:
         NETIO_SERVERSTOP( <pListenSocket> | <pConnectionSocket>, <lStop> )
                                                -> NIL
      activate MT NETIO server (it needs MT HVM):
         NETIO_MTSERVER( [<nPort>], [<cAddress>] ) -> <pListenSocket> | NIL

      To create NETIO server is enough to compile and link with MT HVM
      this code:

         proc main()
            local pListenSocket

            pListenSocket := netio_mtserver()
            if empty( pListenSocket )
               ? "Cannot start server."
            else
               wait "Press any key to stop NETIO server."
               netio_serverstop( pListenSocket )
               pListenSocket := NIL
            endif
         return

      NETIO works with all core RDDs (DBF, DBFFPT, DBFBLOB, DBFNTX, DBFCDX,
      DBFNSX, SDF, DELIM) and any other RDD which inherits from above or
      use standard RDD IO API (hb_file*() functions).
      Without touching even single line in RDD code it gives the same
      functionality as REDBFCDX in xHarbour but for all RDDs.
      It's possible that such direct TCP/IP connection is faster then
      file server protocols especially if they need more then one IP frame
      to exchange data so it's one of the reason to use it in such cases.
      Please make real speed tests.
      The second reason to use NETIO server is resolving problem with
      concurrent access to the same files using Harbour applications
      compiled for different platforms, i.e. DOS, LINUX, Windows and OS2.
      It's very hard to configure all client stations to use correct
      locking system. NETIO fully resolves this problem so it can be
      interesting alternative also for MS-Windows users only if they
      do not want to play with oplocks setting on each station.
      I'm interesting in user opinions about real life NETIO usage.

      Have a fun with this new toy  ;-) 

  + harbour/contrib/hbnetio/tests
  + harbour/contrib/hbnetio/tests/netiotst.prg
  + harbour/contrib/hbnetio/tests/netiotst.hbp
  + harbour/contrib/hbnetio/tests/data
    + added simple test code for NETIO. It activates NETIO MT server
      and then connects to this server to create and browse table with
      memo file and production index with few tags.

Modified Paths:
--------------
    trunk/harbour/ChangeLog
    trunk/harbour/bin/hb-func.sh
    trunk/harbour/contrib/Makefile
    trunk/harbour/harbour-wce-spec
    trunk/harbour/harbour-win-spec
    trunk/harbour/harbour.spec

Added Paths:
-----------
    trunk/harbour/contrib/hbnetio/
    trunk/harbour/contrib/hbnetio/Makefile
    trunk/harbour/contrib/hbnetio/netio.h
    trunk/harbour/contrib/hbnetio/netiocli.c
    trunk/harbour/contrib/hbnetio/netiomt.prg
    trunk/harbour/contrib/hbnetio/netiosrv.c
    trunk/harbour/contrib/hbnetio/tests/
    trunk/harbour/contrib/hbnetio/tests/data/
    trunk/harbour/contrib/hbnetio/tests/netiotst.hbp
    trunk/harbour/contrib/hbnetio/tests/netiotst.prg


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour
Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Post by Vanguarda » Wed Sep 02, 2009 2:39 am

OMG, Master!!!!! :o

It is a very good news.... :)

Thanks for sharing this info with us,

regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/

User avatar
luisvasquezcl
Posts: 1025
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 11 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Wed Sep 02, 2009 3:06 am

Hi Roberto,
realy is a very good news.
Best Regards,
Luis Vasquez

User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Post by swapan » Wed Sep 02, 2009 4:44 am

Seems to be good news!
Actually not had gone so deep into HMG or Harbour. Would appreciate if in future Roberto Sir comes up with a write up on this with a working example using HMG.
Thanks & Regards,
Swapan Das

http://www.swapandas.com/

User avatar
karweru
Posts: 149
Joined: Fri Aug 01, 2008 1:51 pm
Contact:

Post by karweru » Wed Sep 02, 2009 5:44 am

Thank you very much Master for the good news. And many many thanks to Przemyslaw Czerpak for this functionality. Kudos!
Kind regards,
Gilbert.

ClaudioGalera
Posts: 47
Joined: Tue Jul 14, 2009 1:14 pm
Location: Mar del Plata, Argentina

Post by ClaudioGalera » Wed Sep 02, 2009 1:29 pm

Hi !
This is clearly an alternative or replacement to tools as Letodb, no?
Roberto Thanks for the info and for this great HMG. :)

Regards.
Claudio

User avatar
gfilatov
Posts: 511
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 7 times
Been thanked: 52 times
Contact:

Post by gfilatov » Wed Sep 02, 2009 3:03 pm

ClaudioGalera wrote:Hi !
This is clearly an alternative or replacement to tools as Letodb, no?
...
Hi Claudio,

Kindly take a look for Przemek's answer in the Harbour developer forum below:
On Tue, 01 Sep 2009, Ernad Husremovic wrote:

Hi,

> Hello hb community.
> A few days ago, we started porting our clipper solutions to LETODB RDD.
> Today I read about new Przemek great contribution: NETIO RDD.

To clarify. It's not RDD but only alternative RDD IO API library so
it allows to switch transport layer in all RDDs which uses hb_file*()
interface.

> Reading Changelog, NETIO is also good candidate for our default RDD.
> Our main goal is to provide multiplatform (linux, windows) solution

NETIO RDD resolves the problem with sharing database files between
different OS-es so it can be usefull in such cases.

> which is not vulnerable
> to data corruption caused by direct file access.

But here it will not help you in noticeable way.
It's not client server solution for database and index file processing.
They are still updated by the local station not the server so station
crash may leave index not fully updated.
NETIO replaces only transport layer.

> In some earlier conversation, Przemek wrote:
> > BTW it's not exactly client/server solution like in ADS or NETRDD if I finish it.
> I would like to hear community comments about the optimal choice of (opensource) RDDs in the client/server arena.

For sure full server side table and index processing is much better solution.
ADS and LETO are such servers. I haven't used any of them so I cannot say
too much about them. ADS is commercial project with very good user opinion.
LETO is opensource project but I do not know user experience about using it
in larger installations. I also cannot say too much about its internals
and if it's safe or not to use it with Harbour multithread programs.

best regards,
Przemek
I hope that give you an idea :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

ClaudioGalera
Posts: 47
Joined: Tue Jul 14, 2009 1:14 pm
Location: Mar del Plata, Argentina

Post by ClaudioGalera » Wed Sep 02, 2009 4:44 pm

Hi gfilatov,
gfilatov wrote :

I hope that give you an idea :idea:

Ok. Now I understand how it worked, thank you :)

User avatar
karweru
Posts: 149
Joined: Fri Aug 01, 2008 1:51 pm
Contact:

Post by karweru » Fri Sep 04, 2009 8:14 am

gfilatov wrote:
ClaudioGalera wrote:Hi !
This is clearly an alternative or replacement to tools as Letodb, no?
...
Hi Claudio,

Kindly take a look for Przemek's answer in the Harbour developer forum below:
On Tue, 01 Sep 2009, Ernad Husremovic wrote:

Hi,

> Hello hb community.
> A few days ago, we started porting our clipper solutions to LETODB RDD.
> Today I read about new Przemek great contribution: NETIO RDD.

To clarify. It's not RDD but only alternative RDD IO API library so
it allows to switch transport layer in all RDDs which uses hb_file*()
interface.

> Reading Changelog, NETIO is also good candidate for our default RDD.
> Our main goal is to provide multiplatform (linux, windows) solution

NETIO RDD resolves the problem with sharing database files between
different OS-es so it can be usefull in such cases.

> which is not vulnerable
> to data corruption caused by direct file access.

But here it will not help you in noticeable way.
It's not client server solution for database and index file processing.
They are still updated by the local station not the server so station
crash may leave index not fully updated.
NETIO replaces only transport layer.

> In some earlier conversation, Przemek wrote:
> > BTW it's not exactly client/server solution like in ADS or NETRDD if I finish it.
> I would like to hear community comments about the optimal choice of (opensource) RDDs in the client/server arena.

For sure full server side table and index processing is much better solution.
ADS and LETO are such servers. I haven't used any of them so I cannot say
too much about them. ADS is commercial project with very good user opinion.
LETO is opensource project but I do not know user experience about using it
in larger installations. I also cannot say too much about its internals
and if it's safe or not to use it with Harbour multithread programs.

best regards,
Przemek
I hope that give you an idea :idea:
Oh Dear! So close!
Kind regards,
Gilbert.

Post Reply