[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Aug 16 23:20:58 2002 
Subject:web integration 
From:nico 
Volume-ID:1020816.01 

Hello everybody,

I'm a freelance programmer, used to work with Delphi
(http://www.borland.com/delphi/), an object-oriented version of Pascal.
A couple of weeks ago I was surprised to find that the language of my
dreams already existed. I have been studying the primer and browsing the
rest of the documentation and all seems very nice. I don't mind if
Pop-11 isn't a "mainstream language". I want to use the language that I
consider the best. On the other hand, nobody will complain, because I
plan to use it for web programming where this is a minor issue, and
there are versions for the two systems (Linux and Windows) that are the
most used to run web servers.

Anyway I need some kind of bridge to make Pop-11 work with existing web
servers. I'm writing in Delphi an Apache module and an ISAPI dll to
parse HTML, extract Pop-11 embedded snippets, send then to a stand-alone
"Pop-11 daemon", and get a response from it. The Delphi part is easy for
me. I've some doubts about the Pop-11 part of the
communication, though. I hope you can help me.

After thinking for a while (and a miserable failure trying pipes :-))
I've decided to use sockets. The idea is that a socket is open between a
Delphi webmodule and a Pop-11 process. Delphi webmodules are structures
to handle an incoming server thread: Apache and IIS spawns several
threads in a pool and Delphi creates a new webmodule to attend each. I
only need to run Pop-11 as a typical multithreaded server. Pop-11 should
fork a new process for every incoming connection. I will open a
connection from every Delphi webmodule. There's a 1:1 relation. So from
now on communication between a webmodule and a Pop-11 process handler
will be very similar as between an user and the Pop-11 console.

Snippets come as a character string. Server must receive the string
through the socket, and compile it or evaluate it and return some result
or status code also through the socket. The socket remains open between
conversations.

Now the problems:

1) I'm a complete beginner with Pop-11. When in a new house you can't
find things until they bite you. Please be patient :-) 
2) I don't know if there is socket support for NT. Or how could I
interface with winsock.h functions?.
3) I've found Pallantir. But I can't fully understand the server.p code in
http://www.poplog.org/scripts/cvsweb/packages/palantir/sys/lib/

Maybe because Palantir tries to do much more than I pretend. I leave all
the web-specific tasks in the hands of Apache and Delphi. Pop-11 will be
"the intelligence" of the web server. I will try to change server.p to
be simpler for me, but I would like to know if there is yet a little sample
of a multithreaded server anywhere, the kind of what I wrote for Delphi
(nicoaragon.com/sockets).

Also I'm curious about the development status of PopLog. Is someone
working maintaining and improving it?.  

--
Thanks in advance,

  Nico Aragón
  http://nicoaragon.com/