4Dv6 Stored Procedure
Class Notes
We have some stream-of-consciousness notes from the 4Dv6 Stored
Procedure class:
- Stored procedures in 4D are not the same as in other SQL-based
systems. The stored procedures are actually full-blown processes,
which execute asynchronously. SQL stored procedures execute
synchronously.
- All of the 4D language is supported on the server, except for
those commands that present a window on the screen. Externals are
supported, and external windows are supported at this time, but
will go away in the final build.
- The design philosophy of the new server is this: the client
initiates communications with the server, but the server doesn't
initiate communication with the client.
- Domi intimated that there would be a new 4Dv7 at this time
next year.
- SET PROCESS VARIABLE and GET PROCESS VARIABLE, which works
just fine with BLOBs, are the mechanism by which a very robust
interprocess communication method may be implemented.
- Domi noted that the SET/GET PROCESS VARIABLE is much more
robust than Outside call in that Outside call depends on the
execution cycle. Also, S/GPV is fully asynchronous and won't
"lose" messages like Outside call sometimes did.
- Q: What sort of performance penalty is there? A: It depends,
of course. You have to test.
- Q: Is a SP like another user? A: No, it depends on the loading
of the task; it's totally dependent on what the process is doing.
Don't think of
- Q: How will tracing work on the server? A: Exactly like it
does on the client! Q: You might be going back and forth between
two keyboards? A: Yes! But, we have thought of an answer for that.
We will be working on a memory-based network component so that it
will be much more efficient to run Server and Client on the same
machine. The only problem then might be to figure out to which one
a trace window belongs! (Laughter)
- Q: Will SET/GET PROCESS VARIABLE work in interpreted mode? A:
Yes; if the variable doen't exist it is created just like in
interpreted mode.
- Q: Will CALL PROCESS work for server processes? A: Yes.
- Q: Can you send printing commands to the server? A: Yes. Now,
is it a good idea... (laughter)
- Domi showed an example of a window on a Mac client controlling
a thermometer on a Windows server process. Pretty cool. When he
showed us the code behind the demo, the client process had only
one line of code: SET PROCESS VARIABLE.
- Q: Can you get a variable from a client from the server? A:
No. This would in effect halve the bandwidth of the current
client-server architecture, which provides only a half-duplex
channel. Making the connection go both ways would make it half as
fast.
Back to the DEVCON Update Page...