comp.lang.ada
 help / color / mirror / Atom feed
* Anyone Have a Working Example of CGI Using the GNAT GPL Library
@ 2015-05-10 20:11 brbarkstrom
  2015-05-10 20:51 ` Jeffrey R. Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: brbarkstrom @ 2015-05-10 20:11 UTC (permalink / raw)


I've not been able to get even the example of the 2013 version
of the AdaCore GPL Gnat Compiler Components for GNAT.CGI that's
embedded in the introductory comment lines to this package to work
at all.  It isn't clear whether the problem lies in my Windows XP
configuration, the version of my Apache Server (2.22), the age
of my IE or Firefox browsers, or some other disconnect.  I have avoided
connecting my XP system to the internet for several years, just to
maintain a stable writing and programming platform, so I'm not really
anxious to update it.  I couldn't get the previous (non-GPL) version
of the Ada CGI package to work either.

Any suggestions would be welcome.

Bruce B.


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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-10 20:11 Anyone Have a Working Example of CGI Using the GNAT GPL Library brbarkstrom
@ 2015-05-10 20:51 ` Jeffrey R. Carter
  2015-05-10 21:44   ` brbarkstrom
  2015-05-11  2:29 ` gautier_niouzes
  2015-05-17 21:27 ` Luke A. Guest
  2 siblings, 1 reply; 10+ messages in thread
From: Jeffrey R. Carter @ 2015-05-10 20:51 UTC (permalink / raw)


On 05/10/2015 01:11 PM, brbarkstrom@gmail.com wrote:
> 
> Any suggestions would be welcome.

What are you trying to do that you can't do with Gnoga?

-- 
Jeff Carter
"What I wouldn't give for a large sock with horse manure in it."
Annie Hall
42

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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-10 20:51 ` Jeffrey R. Carter
@ 2015-05-10 21:44   ` brbarkstrom
  2015-05-11  0:55     ` Jeffrey R. Carter
  0 siblings, 1 reply; 10+ messages in thread
From: brbarkstrom @ 2015-05-10 21:44 UTC (permalink / raw)


On Sunday, May 10, 2015 at 4:51:50 PM UTC-4, Jeffrey R. Carter wrote:
> > 
> > Any suggestions would be welcome.
> 
> What are you trying to do that you can't do with Gnoga?
> 
> -- 
> Jeff Carter
> "What I wouldn't give for a large sock with horse manure in it."
> Annie Hall
> 42

Avoid having to learn a new interface that's different from GPS.
I have enough technical difficulties with my code that I want to
avoid distractions of that type.  In the later stages, these will
include concurrent processing of user selections.  Right now I 
need Web access.

I've also used the previous instantiation of CGI for Ada, which
I think David Button provided.  That would be fine and is actually
neater than the new GNAT library - particularly since I can reuse
code from previous iterations at this problem.  [Sedgwick's book
on Algorithms, Ed. 4, comments that changes to systems should avoid
introducing changes to existing contracts with the users.  The new
GNAT libraries certainly violate that part of the contract.]

I'm also aware of AWS - and would be tempted to use that if I were
developing on my Ubuntu Linux machine.  I'd like to get over the
basic working of my algorithms before I make that transition.  Again,
it's the time sink of learning new interfaces when the real problems
lie in the algorithms themselves.

Bruce B.

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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-10 21:44   ` brbarkstrom
@ 2015-05-11  0:55     ` Jeffrey R. Carter
  2015-05-11 11:53       ` brbarkstrom
  0 siblings, 1 reply; 10+ messages in thread
From: Jeffrey R. Carter @ 2015-05-11  0:55 UTC (permalink / raw)


On 05/10/2015 02:44 PM, brbarkstrom@gmail.com wrote:
> 
> Avoid having to learn a new interface that's different from GPS.
> I have enough technical difficulties with my code that I want to
> avoid distractions of that type.  In the later stages, these will
> include concurrent processing of user selections.  Right now I 
> need Web access.
> 
> I've also used the previous instantiation of CGI for Ada, which
> I think David Button provided.  That would be fine and is actually
> neater than the new GNAT library - particularly since I can reuse
> code from previous iterations at this problem.  [Sedgwick's book
> on Algorithms, Ed. 4, comments that changes to systems should avoid
> introducing changes to existing contracts with the users.  The new
> GNAT libraries certainly violate that part of the contract.]
> 
> I'm also aware of AWS - and would be tempted to use that if I were
> developing on my Ubuntu Linux machine.  I'd like to get over the
> basic working of my algorithms before I make that transition.  Again,
> it's the time sink of learning new interfaces when the real problems
> lie in the algorithms themselves.

Instead you choose the sink of getting GNAT's CGI working for you.

The advantage of CGI is that you only write the new functionality and attach it
to an existing web server.

The problem with CGI is that it involves spawning a new process, which is a
known source of security vulnerabilities.

With AWS or Gnoga you write a custom web server in Ada, so it doesn't have the
security vulnerabilities of general-purpose ones that you can plug things into.
Rather than spawning a new process, you can create a new task. But it does
involve a bit more work.

-- 
Jeff Carter
"What I wouldn't give for a large sock with horse manure in it."
Annie Hall
42

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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-10 20:11 Anyone Have a Working Example of CGI Using the GNAT GPL Library brbarkstrom
  2015-05-10 20:51 ` Jeffrey R. Carter
@ 2015-05-11  2:29 ` gautier_niouzes
  2015-05-11 11:44   ` brbarkstrom
  2015-05-17 21:27 ` Luke A. Guest
  2 siblings, 1 reply; 10+ messages in thread
From: gautier_niouzes @ 2015-05-11  2:29 UTC (permalink / raw)


Here a very simple but working example with CGI (not exactly the same package):

http://sf.net/p/cbsg/code/HEAD/tree/live.adb

HTH
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada 
NB: Pour une réponse directe, adresse e-mail valable par le lien ci-dessus


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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-11  2:29 ` gautier_niouzes
@ 2015-05-11 11:44   ` brbarkstrom
  0 siblings, 0 replies; 10+ messages in thread
From: brbarkstrom @ 2015-05-11 11:44 UTC (permalink / raw)


> Here a very simple but working example with CGI (not exactly the same package):
> 
> http://sf.net/p/cbsg/code/HEAD/tree/live.adb
> 
> HTH
> _________________________
> Gautier's Ada programming
> http://gautiersblog.blogspot.com/search/label/Ada 
> NB: Pour une réponse directe, adresse e-mail valable par le lien ci-dessus

Thank you very much.  I've downloaded it and
will explore how it works.

Bruce b.

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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-11  0:55     ` Jeffrey R. Carter
@ 2015-05-11 11:53       ` brbarkstrom
  2015-05-11 16:31         ` brbarkstrom
  0 siblings, 1 reply; 10+ messages in thread
From: brbarkstrom @ 2015-05-11 11:53 UTC (permalink / raw)


On Sunday, May 10, 2015 at 8:55:36 PM UTC-4, Jeffrey R. Carter wrote:
> > 
> > Avoid having to learn a new interface that's different from GPS.
> > I have enough technical difficulties with my code that I want to
> > avoid distractions of that type.  In the later stages, these will
> > include concurrent processing of user selections.  Right now I 
> > need Web access.
> > 
> > I've also used the previous instantiation of CGI for Ada, which
> > I think David Button provided.  That would be fine and is actually
> > neater than the new GNAT library - particularly since I can reuse
> > code from previous iterations at this problem.  [Sedgwick's book
> > on Algorithms, Ed. 4, comments that changes to systems should avoid
> > introducing changes to existing contracts with the users.  The new
> > GNAT libraries certainly violate that part of the contract.]
> > 
> > I'm also aware of AWS - and would be tempted to use that if I were
> > developing on my Ubuntu Linux machine.  I'd like to get over the
> > basic working of my algorithms before I make that transition.  Again,
> > it's the time sink of learning new interfaces when the real problems
> > lie in the algorithms themselves.
> 
> Instead you choose the sink of getting GNAT's CGI working for you.
> 
> The advantage of CGI is that you only write the new functionality and attach it
> to an existing web server.
> 
> The problem with CGI is that it involves spawning a new process, which is a
> known source of security vulnerabilities.
> 
> With AWS or Gnoga you write a custom web server in Ada, so it doesn't have the
> security vulnerabilities of general-purpose ones that you can plug things into.
> Rather than spawning a new process, you can create a new task. But it does
> involve a bit more work.
> 
> -- 
> Jeff Carter
> "What I wouldn't give for a large sock with horse manure in it."
> Annie Hall
> 42

You mistake my intent with CGI.  In terms of my process, it's a temporary
work around to explore the assembly of the production version and get some
idea about whether the web interface is presenting the material I want.
The long term intent is to move the Web interface to an Ada Web Server
on a Linux Beowulf cluster.  As a precursor to the CGI, I may even create
a procedure that uses just standard input and output, just to clarify the
operation of the algorithms and some fairly complex data structures.  The
point is that at this stage, I'm conducting research on what I'm trying
to accomplish - and research is not a sensible stage for writing formal
requirements and specifications.  Also, I'm a lone wolf - meaning I don't
have a system administrator.

Bruce B.


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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-11 11:53       ` brbarkstrom
@ 2015-05-11 16:31         ` brbarkstrom
  0 siblings, 0 replies; 10+ messages in thread
From: brbarkstrom @ 2015-05-11 16:31 UTC (permalink / raw)


I made a mistake - basically I forgot how to turn on my Apache server.
Sorry for any confusion - and thanks to those who did respond.
I'll try to avoid this kind of problem in the future.

Bruce B.


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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-10 20:11 Anyone Have a Working Example of CGI Using the GNAT GPL Library brbarkstrom
  2015-05-10 20:51 ` Jeffrey R. Carter
  2015-05-11  2:29 ` gautier_niouzes
@ 2015-05-17 21:27 ` Luke A. Guest
  2015-05-18 14:40   ` brbarkstrom
  2 siblings, 1 reply; 10+ messages in thread
From: Luke A. Guest @ 2015-05-17 21:27 UTC (permalink / raw)


Matreshka has a FastCGI package.


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

* Re: Anyone Have a Working Example of CGI Using the GNAT GPL Library
  2015-05-17 21:27 ` Luke A. Guest
@ 2015-05-18 14:40   ` brbarkstrom
  0 siblings, 0 replies; 10+ messages in thread
From: brbarkstrom @ 2015-05-18 14:40 UTC (permalink / raw)


On Sunday, May 17, 2015 at 5:27:47 PM UTC-4, Luke A. Guest wrote:
> Matreshka has a FastCGI package.

Thanks.  I'll see if I can use it.

Bruce B.


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

end of thread, other threads:[~2015-05-18 14:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-10 20:11 Anyone Have a Working Example of CGI Using the GNAT GPL Library brbarkstrom
2015-05-10 20:51 ` Jeffrey R. Carter
2015-05-10 21:44   ` brbarkstrom
2015-05-11  0:55     ` Jeffrey R. Carter
2015-05-11 11:53       ` brbarkstrom
2015-05-11 16:31         ` brbarkstrom
2015-05-11  2:29 ` gautier_niouzes
2015-05-11 11:44   ` brbarkstrom
2015-05-17 21:27 ` Luke A. Guest
2015-05-18 14:40   ` brbarkstrom

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