VXCMD local and remote together

Robert Brenstein rjb at rz.uni-potsdam.de
Wed Feb 18 21:54:33 CST 2004


>  > It seems that we look not at SWITCHING from local to client mode but
>>  supporting BOTH modes in parallel. For switching, yes, you are right.
>>  But the best that Valentina offers here is working with both modes in
>>  the same program.
>
>Yes, this will be big plus.
>It seems any other db do not offer such feature.
>
>
>>  In each mode, there are different errors to handle (it is a waste of
>>  time to check for connection errors in local mode, for example) and
>>  possibly different handling of requests (what was that discussion
>>  about client versus server side cursors?).
>
>Agree on errors.
>
>Client-side and server side cursors can still be used in LOCAL mode, just
>they will be the same.
>
>>  Besides, even when switching, at least in MC/Rev making a global
>>  rename of function call is not a big deal. And having functions that
>>  explicitely remind us whether they work locally or remotely makes
>>  more self-documenting code.
>
>Okay.
>
>Function
>
>     Cursor_GetRecordCount()
>
>Why you must differ it for LOCAL and REMOTE???
>
>Its logic is the same for all modes.
>And name must be the same.
>
>And this is true for 99% of method IMHO.
>
>Only BIG difference -- Database object creation.
>

But, but, but... Ruslan... you talk at a different level now. Kernel 
functionality is one thing, calling it from Transcript is another.

Nobody said there should be a difference with syntax of kernel 
functions. What we talk about is the transcript-level coding. Using 
your example above:

in local mode

get Valentina("Cursor_GetRecordCount",cursorRef)

in client-server mode

get Valentina_Server("Cursor_GetRecordCount",cursorRef)

The part in parenthesis is the SAME (as it was in my original 
example). The difference is only in using a different external. 
Whether these externals use the same or different libraries is 
totally irrelevant to us (as long as it works :)

This si why I said that when I have a program that calls "Valentina" 
and I want to SWITCH it to using only server, I just make a global 
change of "Valentina" to "Valentina_Server" and add all the 
server-related stuff.

If I support both modes, I can immediately see which parts of my code 
deal with local database and which with remote.

Robert


More information about the Valentina mailing list