Steven D'Aprano wrote:
> I'm attempting to prototype a simple database application in Hypercard.
> What I'm planning is a client-server database (yes, I think big) and I
> was wondering whether Metacard might be better suited for my purposes.
> (Frankly, I doubt I can get Hypercard to do it without a database
> application behind it.)
> 
> My questions are:
> 
> Can multiple copies of Metacard access simultaneously a single stack
> with read and write access? I'll handle record locking myself.

No... the problem is that loading a stack means copying it into memory.
But once it is there, you won't find out some other process has written
to the stack file. You'll need the same mechanisms you'd implement for
record locking also for file locking.
And even when you have locked the stack, you'll need some timestamp
mechanisms for updating that data to the copies in memory of those other
processes. There are many problems coming up your way.

> If not, can I use a single Metacard stack to hold the database, with
> other stacks running as seperate sessions querying it?

This is essentially the same question [EMAIL PROTECTED] (La Mondaresca) asked:
> I developed a game similar to chess on Hypercard. Two players from
> different computers  move with the mouse some buttons and send data
> through the local network. I wuold develop similar stacks with Metacard
> for windows and linux.
> I wonder if it is possible to have people exchanging data through the
> Internet between two computers running metacard stacks.

The client side would be no problem in MC using the "get url ..." syntax.
But there is currently no possibility to make MC act direclty as a
http-server. I have suggested a syntax for generic socket access from
MC, but there has been no announcement when or even if it will be
implemented. There are too few people asking for this. Alas!

On Unix systems, MC can act as a cgi program though. Your http server
like Apache can start a MC engine to implement your script, and as it
does not need to have and must not have graphical output, only a special
smaller subset of the engine is started. You don't need a complete
stack, you only write one script into a file with the extension ".mt"
(MetaTalk). The first line must be "#!mc", so the server knows which
program to start for this file.

Apache on Windows works just that way, but the MC engine does not. For
stack files I have tried to write a small exe that starts MC and placed
it in "/bin/sh". This works well from the bash I use, but when Apache
starts it, MC does not return.

So my hope is a pure MetaTalk engine for Windows like it exists for Unix.


Steven again:
> And finally, as my least prefered solution, can a Metacard handle be set
> to run in the background? I doubt this is possible, without scripting
> something from "on idle" handlers, but I just thought I'd ask.

Yes it can: Look at the docu for the send command. You can send yourself
messages after certain intervals. But what does that help for your problem?

> Otherwise, if anyone can suggest a way I could use Metacard to develop a
> client-server application, I'd be greatful.

My suggestion is to use a real database. It is really really a lot work
to write a database engine, there are so many issues involved. We are
using an Oracle database to store our data and we are very happy with
it. We have started in HyperCard almost 10 years ago when Oracle
supplied XCMDs for accessing their database. Then we moved to Oracle
Media Objects (a HyperCard clone) so we could support Windows, but OMO
died. Now we are very successful with MetaCard with our own externals
that we have released in our open source program. You can download the
source or the binaries from www.mctools.com, but we can not support it.


Regards
      R�diger (still wants smtp, ftp, ldap, imap, https, etc... clients
and servers!)

P.S.: I tried to send this to the metacard list, but i got: "I'm sorry,
this list requires that you be a subscribed user to execute this command
or post to the list."... but we have a "group subscription" so our mail
server recieves the mailings once and everybody can subscribe to a local
IMAP folder. I understand that this may be a security issue, but then
the xtalk list is open.

--------------------------------------------------------------------
| Ruediger zu Dohna   GINIT GmbH   0721-96681-63    [EMAIL PROTECTED] |
| PGP-Fingerprint: F1 BF 9D 95 57 26 48 42 FE F8 E8 02 41 1A EE 3E |
--------------------------------------------------------------------

Reply via email to