Working towards freeRouting as a service (FAAS) #195
Replies: 5 comments
-
So I started looking at what changes are needed in the Java code to run headless. I found this guide: https://www.oracle.com/technical-resources/articles/javase/headless.html So I tried: java -Djava.awt.headless=true -jar freerouting_jar -mt 1 -dl -de foo.dsn -do foo.ses and it threw an exception: Exception: java.awt.HeadlessException thrown from the UncaughtExceptionHandler in thread "main" So a lot needs to be done before I can run freeRouting on a headless server. |
Beta Was this translation helpful? Give feedback.
-
Great start! I'll check out that exception, hoping to learn from it. If you don't use the I think we would need to separate all the non-GUI parts into a library and build two executables that use that library. |
Beta Was this translation helpful? Give feedback.
-
Not an awful lot in freerouting.log.
|
Beta Was this translation helpful? Give feedback.
-
Here's a fork which is said to run headless from the CLI. Might be worth seeing what they did and whether freerouting can adopt some of the modifications. |
Beta Was this translation helpful? Give feedback.
-
I haven't looked into the code to see if freeRouting is using AWT, or the newer Swing toolkit. Probably the latter since the widgets don't look native. So I did a quick search for a Swing implementation that doesn't need a GUI and found this: https://github.com/CaciocavalloSilano/caciocavallo which renders to a virtual screen. Haven't looked to see what it does when input interaction is requested. |
Beta Was this translation helpful? Give feedback.
-
As discussed in the issue containing this comment: #151 (comment) I'm willing to look into wrapping a network server around freeRouting so that DSNs can be submitted over the network, and SES and log files returned.
To do this freeRouting has to be able to run without any GUI at all, as the execution environment will not have a GUI. Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions