This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

question about using the built-in web server


We've been working on a hypertext fiction authoring tool built in Kawa:
http://partechgroup.org/hypedyn. The system allows non-programmers to
write stories in hypertext, and then export them to be read on the web.

Currently the exported story is run within a "reader" applet, which is
also written in Kawa. We are now implementing a Javascript-based reader,
so that we can deploy the stories on smartphones and other platforms which
don't support Java. One problem with moving away from a Kawa-based reader
is that whereas we currently are able to let authors "debug" their stories
by running the story within the editor environment, with story state
displayed for debugging, once we move to a Javascript-based reader, the
reader is separate from the editor, making it unclear how to pass state
between the reader and the editor to support interactive debugging.

So, what I'm thinking of doing is using the built-in web server in Kawa to
serve up the Javascript story file locally, and then have debugging
functions within the Javascript code pass state information back to the
server, and from there display the state info in the editor UI. What I'm
not sure about is a) whether it is possible to simultaneously run the web
server and have an interactive UI, and b) whether the web server and the
UI code can communicate.

So far, I've tried a simple experiment by doing:
    kawa --http-auto-handler / . --http-start 8888 mycode.scm
where mycode.scm is
    (display "hi\n")
and although the web server starts, and is accessible at port 8888,
mycode.scm is never executed. This suggests that a) may not be possible.

I suppose one approach might be to start the web server as a separate
process, and then have the editor and the web server communicate through
sockets, but that seems a bit troublesome.

Does anyone have any suggestions as to how to get this to work?

thanks,
Alex  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]