Running a web server under JNode

We had a goal some time ago to try to set up a webserver under JNode. This was also considered as an important milestone for JNode. Based on the current poll it looks like this would be interesting for other people as well. Though there is more interest in JNode as a desktop OS, I think the requirements of a functional low end server OS could be met the earliest (without sacrifying the longer term goals of a usable deskotop OS).

Therefor I suggest to reinvestigate the possibilities of running a Java based web server under JNode.
Possible candidates can be Tomcat or Jetty using their older versions for a start.
For this to work JNode should support:
- a writable file system - ext2
- ServerSocket
- XML parsing (this might not be necessary for older versions)
- java compiler for JSP support

What is your opinion, how far are we from that?
What are the necessary steps to get there?

What I know, is that ext2 has read/write support but no file delete (for a simple setup might not be a problem), kjc and Sun javac (only for this experiment) work under JNode. The status of the ServerSocket and the XML parsing are the unclear topics for me at the moment.

Levente

In progress...

Hi,

Right now I'm working on this. After some googling I have found the Acme.Serve.Serve class which is a very minimal web server. I hope to get this working first, as it is a lot easier to see if the basic requirements for running a web server are met with this simple code. When it's running fine, I'll look into Tomcat or Jetty, as you suggested.

Andras

Any result?

Hi Andras,

What I your findings so far?
Any partial result you have would be interetsing as well...
(I'm pretty curious Smiling )

Levente

Not much

Not much yet. I fixed a bug in NetAPIImpl to make it possible to open a server socket on localhost so I can test within vmware 3 (as the lance driver is not working for me under vmware 3). Now I could open a ServerSocket and read from it (small pieces of data) but when I start the test web server and try to get a page, I have some problems with the TCP implementation. I think some packets are transmitted OK but then I get this on the debug console repeated over and over:

DEBUG [TCPProtocol]: Receive: 0 > 0: R 0:0(0), ack 1, win 0
DEBUG [TCPProtocol]: Port unreachable
DEBUG [TCPProtocol]: send(ipHdr, 0 > 0: R 0:0(0), ack 1, win 0)
DEBUG [ARPHetworkLayer]: getHardwareAddress(127.0.0.1, 127.0.0.1, loopback, 5000)

I'll look into this but I'm not really familiar with the networking stuff in JNode so anyone, please feel free to have a look at it Smiling

Andras

Fine

That seems to me like a very good approach, Andras!
Can't wait for the results... Smiling
Thanks,
Levente

...

would be an interesting showcase.

Ewout