comp.lang.ada
 help / color / mirror / Atom feed
* Re: ADA client/server
  2000-08-19 17:58 ADA client/server jill
@ 2000-08-19  0:00 ` Marin D. Condic
  2000-08-23  4:38   ` UML Model for Ada95 predefined packages Matt Brennan
  2000-08-20  0:00 ` ADA client/server Simon Wright
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Marin D. Condic @ 2000-08-19  0:00 UTC (permalink / raw)
  To: jill <jlgoh43@

jill wrote:
> 
> hi,
> is it possible to build a client/server model in ADA?
> if so, how do i fork a new process (child)?
> need a reply urgently.
> thanks.

This is, of course, operating system dependent. To spawn a new process
will vary somewhat from one OS to another. I believe the GNAT compiler
has some interfaces which make this somewhat platform independent. On my
Ada page at http://www.mcondic.com/ there is an example piece of code
which will do this on WinNT. Also some examples of TCP/IP communication
between processes which may be of use to you.

MDC
-- 
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Take away the punchbowl just when the party gets going" 

        --  William McChesney Martin, Former Fed chairman, explaining 
            what a sound central bank must always do. 
======================================================================




^ permalink raw reply	[flat|nested] 11+ messages in thread

* ADA client/server
@ 2000-08-19 17:58 jill
  2000-08-19  0:00 ` Marin D. Condic
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: jill @ 2000-08-19 17:58 UTC (permalink / raw)


hi,
is it possible to build a client/server model in ADA?
if so, how do i fork a new process (child)?
need a reply urgently.
thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-19 17:58 ADA client/server jill
  2000-08-19  0:00 ` Marin D. Condic
@ 2000-08-20  0:00 ` Simon Wright
  2000-08-20  0:00   ` Larry Kilgallen
  2000-08-20  0:00 ` Bobby D. Bryant
  2000-08-21  0:00 ` Ted Dennison
  3 siblings, 1 reply; 11+ messages in thread
From: Simon Wright @ 2000-08-20  0:00 UTC (permalink / raw)


"jill" <jlgoh43@ > writes:

> is it possible to build a client/server model in ADA?
> if so, how do i fork a new process (child)?

You may find you only need a new task. Tasks are usually built on your
OS's native threads.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-20  0:00 ` ADA client/server Simon Wright
@ 2000-08-20  0:00   ` Larry Kilgallen
  2000-08-20  0:00     ` Marin D. Condic
  0 siblings, 1 reply; 11+ messages in thread
From: Larry Kilgallen @ 2000-08-20  0:00 UTC (permalink / raw)


In article <x7v3dk05hds.fsf@pogner.demon.co.uk>, Simon Wright <simon@pogner.demon.co.uk> writes:
> "jill" <jlgoh43@ > writes:
> 
>> is it possible to build a client/server model in ADA?
>> if so, how do i fork a new process (child)?
> 
> You may find you only need a new task. Tasks are usually built on your
> OS's native threads.

Then again, "forking", "multiple processes" or "tasks" are not
a required part of a "client/server" design.  In some applications
a "single server queue" is adequate.  In some operating systems
the effect of a "multiple server queue" can be achieved without
"forking", "multiple processes" or "tasks".  It may not be your
chosen design technique, but it certainly makes it "possible to
build a client/server" program in Ada.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-20  0:00   ` Larry Kilgallen
@ 2000-08-20  0:00     ` Marin D. Condic
  0 siblings, 0 replies; 11+ messages in thread
From: Marin D. Condic @ 2000-08-20  0:00 UTC (permalink / raw)


Larry Kilgallen wrote:
> Then again, "forking", "multiple processes" or "tasks" are not
> a required part of a "client/server" design.  In some applications
> a "single server queue" is adequate.  In some operating systems
> the effect of a "multiple server queue" can be achieved without
> "forking", "multiple processes" or "tasks".  It may not be your
> chosen design technique, but it certainly makes it "possible to
> build a client/server" program in Ada.

Well, for that matter, you could build a client/server program in just
about any language. All it requires is the ability of one program to
request services from another program and get back results. You can
manually fire up both programs and as long as a communication path is
available - voila! - you've got client/server.

I'd suspect the original questioner ("jill" <jlgoh43@ >) had in mind
some means by which she could write code that would initiate another
program from within Ada. I don't think that a fork is the most natural
way in Ada to do that since there is no "fork" language feature. Using
OS calls gets the job done, but it depends on exactly what is the job.
If there's no requirement to run the client and server on two separate
machines and the only goal is to achieve some degree of parallelism,
then maybe tasks are the better approach? Otherwise, one would be
looking at compiler specific libraries or OS calls to initiate the
server.

MDC
-- 
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Take away the punchbowl just when the party gets going" 

        --  William McChesney Martin, Former Fed chairman, explaining 
            what a sound central bank must always do. 
======================================================================




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-19 17:58 ADA client/server jill
  2000-08-19  0:00 ` Marin D. Condic
  2000-08-20  0:00 ` ADA client/server Simon Wright
@ 2000-08-20  0:00 ` Bobby D. Bryant
  2000-08-21  0:00 ` Ted Dennison
  3 siblings, 0 replies; 11+ messages in thread
From: Bobby D. Bryant @ 2000-08-20  0:00 UTC (permalink / raw)


jill wrote:

> is it possible to build a client/server model in ADA?
> if so, how do i fork a new process (child)?
> need a reply urgently.

If you just need another process (as opposed to a fork per se), and if
you are using GNAT, you can use GNAT.OS_Lib.Non_Blocking_Spawn to start
the child process(es).  It lets you specify the name of the program or
script to run in the process, and also lets you pass an argument
string.  I believe it is supposed to be OS-independent.

Bobby Bryant
Austin, Texas








^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-19 17:58 ADA client/server jill
                   ` (2 preceding siblings ...)
  2000-08-20  0:00 ` Bobby D. Bryant
@ 2000-08-21  0:00 ` Ted Dennison
  2000-08-21  0:00   ` David Starner
  3 siblings, 1 reply; 11+ messages in thread
From: Ted Dennison @ 2000-08-21  0:00 UTC (permalink / raw)


In article <399ec91e@usenet.per.paradox.net.au>,
  "jill" <jlgoh43@ > wrote:
> is it possible to build a client/server model in ADA?
> if so, how do i fork a new process (child)?

To get a new thread of control in Ada, you don't "fork" your current
thread (then jump through several more hoops). You use Ada's tasking
features. If you don't know about that, you *really* need to get and
study a good Ada reference text. This is pretty basic to the language.

I often wonder what kind of drugs the folks at AT&T were on when they
thought up "fork" and "exec" as good ways to do multi-tasking. Some of
the stuff in Unix is just brilliant, while some of it is worthy for
inclusion in INTERCAL.

(see http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?INTERCAL )

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-21  0:00 ` Ted Dennison
@ 2000-08-21  0:00   ` David Starner
  2000-08-21  0:00     ` Ted Dennison
  0 siblings, 1 reply; 11+ messages in thread
From: David Starner @ 2000-08-21  0:00 UTC (permalink / raw)


On Mon, 21 Aug 2000 14:25:15 GMT, Ted Dennison <dennison@telepath.com> wrote:
>I often wonder what kind of drugs the folks at AT&T were on when they
>thought up "fork" and "exec" as good ways to do multi-tasking. Some of
>the stuff in Unix is just brilliant, while some of it is worthy for
>inclusion in INTERCAL.

Can you elaborate? I'm not very familar with multitasking, but the little
I've read about it puts heavy weight (fork) and light weight (thread)
processes as complementary tools, each having its own use. 

I really don't see what you're going to replace exec with. A shell, for
example, would have to use an exec like feature. It's also useful for
calling external processes. What would be the replacement? Will it make
a trivial shell (< 100 lines of code) easier or harder to write?

-- 
David Starner - dstarner98@aasaa.ofe.org
http/ftp: x8b4e53cd.dhcp.okstate.edu
It was starting to rain on the night that they cried forever,
It was blinding with snow on the night that they screamed goodbye.
	- Dio, "Rock and Roll Children"




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: ADA client/server
  2000-08-21  0:00   ` David Starner
@ 2000-08-21  0:00     ` Ted Dennison
  0 siblings, 0 replies; 11+ messages in thread
From: Ted Dennison @ 2000-08-21  0:00 UTC (permalink / raw)


In article <8nrrpd$aik1@news.cis.okstate.edu>,
  dstarner98@aasaa.ofe.org wrote:
> On Mon, 21 Aug 2000 14:25:15 GMT, Ted Dennison <dennison@telepath.com>
wrote:
> >I often wonder what kind of drugs the folks at AT&T were on when they
> >thought up "fork" and "exec" as good ways to do multi-tasking. Some

> Can you elaborate? I'm not very familar with multitasking, but the
> little I've read about it puts heavy weight (fork) and light weight
> (thread) processes as complementary tools, each having its own use.

...spoken like someone who's never accidentally set off a fork-bomb on a
multiuser machine. :-)

Sure, fork and exec have their uses. They are essential in Unix for
creating processes (also termed "heavyweight threads" once lightweight
threads were introduced to Unixes much later). But that's only because
Unix was set up that way. Why not just have an OS call to create a
process (like is typically done with lightweight threads)? Its rarely
useful to have a program that can replicate copies of itself, and doing
it without errors is difficult (particularly when there are opened files
and such). It would take some real thought to come up with a method of
creating processes which is more mind-boggling and error-prone.

Of course the folks working on multi-threaded INTERCAL probably
succeeded with their multiple CAME FROM facility. But remember that
INTERCAL has had the worlds most twisted minds working on the problem
for years. :-)

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* UML Model for Ada95 predefined packages
  2000-08-19  0:00 ` Marin D. Condic
@ 2000-08-23  4:38   ` Matt Brennan
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Brennan @ 2000-08-23  4:38 UTC (permalink / raw)


Is there a public domain (or proprietary) UML model of Ada95's
predefined language environment (Ada, System, Interfaces etc) suitable
for import into Rational's Rose?

Unfortunately, I don't have a reverse engineering capabilty (no APEX) to
suck in my own.

Thanks,

  matt

--
-- Matt Brennan || Vision Systems Ltd || +61 8 8300 4686
--



^ permalink raw reply	[flat|nested] 11+ messages in thread

* UML Model for Ada95 predefined packages
@ 2000-08-24  2:47 zschub
  0 siblings, 0 replies; 11+ messages in thread
From: zschub @ 2000-08-24  2:47 UTC (permalink / raw)


Is there a public domain (or proprietary) UML model of Ada95's
predefined language environment (Ada, System, Interfaces etc) suitable
for import into Rational's Rose?

Unfortunately, I don't have a reverse engineering capabilty (no APEX) to
suck in my own.

Thanks,

  matt b


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2000-08-24  2:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-19 17:58 ADA client/server jill
2000-08-19  0:00 ` Marin D. Condic
2000-08-23  4:38   ` UML Model for Ada95 predefined packages Matt Brennan
2000-08-20  0:00 ` ADA client/server Simon Wright
2000-08-20  0:00   ` Larry Kilgallen
2000-08-20  0:00     ` Marin D. Condic
2000-08-20  0:00 ` Bobby D. Bryant
2000-08-21  0:00 ` Ted Dennison
2000-08-21  0:00   ` David Starner
2000-08-21  0:00     ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2000-08-24  2:47 UML Model for Ada95 predefined packages zschub

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox