Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
RDS-1.01.zip | 2024-06-24 | 12.1 MB | |
README.md | 2024-06-24 | 2.7 kB | |
Totals: 2 Items | 12.1 MB | 0 |
Rust Development Studio - CGI
Purpose
The modern home is a complex network with dozen and sometimes even hundred different devices. It includes wired up to 10Gb speed and wireless connection utilizing up to WiFi 7. Certainly, you can't imagine to use only one PC at home. However, more likely only one computer will be suited for an actual development. If you very rarely use a PC development at work having a powerful Cloud computing network, you still connected only to one computer at home. So, purpose of the project to eliminate the gap and also utilize Rust technologies.
Architecture
The client part is a quite obvious and utilizes CSS and JavaScript. But the server part resurrects the forgotten CGI technology which is perfectly suitable for using Rust. The terminal functionality implemented using Websocket and it still relays on Java. So the project is a hybrid of Rust, JavaScript and Java.
Implementation
It's a really compact with a footprint below 10 MB. All web requests are handled by one Rust executable. The terminal is a websocket endpoint represented by one Java class. There is no servlet.
Config
You need to add to TJWS aliases.properties file the lines reflecting the location of the CGI script like below:
from=/rustcgi;dir=/home/dmitriy/projects/rust_util/src/rust/rustcgi
from=/cgires/resource;dir=/home/dmitriy/projects/rust_util/src/rust/rustcgi/resource
Note that the resource directory has to be a subdirectory of the script directory.
And then specify aliases.properties in the TJWS starting command as:
-a aliases.properties
The new /rustcgi mapping has to be a CGI aware when start TJWS using the command line argument below:
-c /rustcgi
Make also sure that the directory, where rustcgi accessed from, contains the file .home with one line containing the user HOME directory or other directory where rustcgi will look for settings in the sub directory .rustcgi.
/home/john
The following property has to be added the starting starting TJWS command:
-Dtjws.websocket.container=true
to assure the terminal works properly.
An acceptor with a channel for non blocking IO is also requiring for the correct terminal work. For example:
-acceptorImpl Acme.Serve.SelectorAcceptor
Packaging
Although you can configure the development studio yourself accordingly a web server and other components, the packaging recommend TJWS as a webserver. The following jars are required:
class-scanner.jar
javax.servlet-api-4.0.1.jar
javax.websocket-api-1.1.jar
rds.jar
webserver.jar
wskt.jar
Two underline OS executables written in Rust:
rb
rustcgi
Any JVM from 8 to 22 can be used. HTTPS is supported.