[bug report 2040] Vserver, NOTE 2. HOW TO write client/server apps

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Dec 12 11:52:43 CST 2006


Hi All,
Hi Charles,

In 2040 bug report Charles have write:

>   dim connection as new VConnection("localhost", "sa", "sa")
>   connection.Open
> 
>   dim db as new VDatabase(connection)
>   db.Open new FolderItem("testDB")
>   db.Close

And connection still is not closed.

May be this was result of my own confusing message...
But in short: 
    this is correct.
    DEVELOPER self must do  connection.close()

1) Agree this is quite natural from OO point of view design
   
    object1.open
            object2.open()
            
            object2.close()
    object1.close

Looking on this abstract notation, anybody will expect that object2, which
is LOWER by hierarchy will close object1? Of course not!

Does this clean explanation?


------------------
2) We want once again remind all and make this disclaimer:

    Of  course we do all our best to make sure that your code
    written and tested for single user LOCAL db will work on client/server
    with minimal changes.

    But we still expect from you as from developers quite deep understanding
    that CLIENT/SERVER programming is a little (:-) different.

    Here in game comes other users, network issues and exceptions,
    record locks and so on. All this REQUIRE from your code to get
    much more protections.

    In other words, the fact that your code works perfectly with LOCAL
    db do not means that it will be able works without any trouble in
    client/server. You will need most probably yet add more try/catch
    blocks, do some corrections in algorithms may be to avoid conflicts
    with other users ... I.e. Moving to SERVER you get a new WIDE area
    of new tasks to keep in mind.

Another advice. IF you ever plan move your app to client/server then you
should tend to use Vdatabase +- Vcursor + SQL mechanisms. Avoid to use
Vtable, Vsets, Vlink low-level classes except as may be define Class-way
structure.

----------------------
3) SQL was born for CLIENT/SERVER.

And here present clear trade/off:

    SQL is more effective for REMOTE server.
    API is more effective for LOCAL database.

Valentina just give you ways.
You need self decide where to pay and how much for this trade-offs


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list