[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #13089 [Onionoo]: use an embedded web server/servlet engine for Onionoo
#13089: use an embedded web server/servlet engine for Onionoo
-----------------------------+----------------------------
Reporter: iwakeh | Owner:
Type: enhancement | Status: needs_revision
Priority: minor | Milestone:
Component: Onionoo | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
-----------------------------+----------------------------
Comment (by iwakeh):
Thanks, for all your suggestions!
>
> I made some tweaks in my
[https://gitweb.torproject.org/user/karsten/onionoo.git/shortlog/refs/heads/task-13089
task-13089 branch] that are supposed to be squashed with your commit.
>
This branch looks fine. I added two patches based on this branch.
> Here are some more comments for things I didn't fix/change yet:
> - Your first command line for the backend above should be `java
-Xmx4096M -jar dist/onionoo-1.1.1.jar`.
This is correct; I changed it in the INSTALL suggestions.
> - I didn't manage to start the server with your second command line.
Logs contain this line: "Web application not found onionoo-1.1.1.war".
Hmm. Maybe we're not supposed to create a .war for the front-end, but
also a .jar?!...
>
We don't need a jar here. I changed jetty.xml in such a way that the war
can be started and (this wasn't the case initially) the starting is
independent of the actual path, name, and version of the war.
> - Do you mind updating `vagrant/bootstrap.sh` by removing Tomcat
specifics and installing `libjetty8-java`? Anything else that needs
changing?
>
The package is named 'jetty8' here.
I think, this is not only an update. With the embedded-one-jar-one-war
setting
we are free to choose a new setup.
It might also be a good idea (with the upcoming mirrors in mind)
to make path setting for 'in', 'out', etc. configurable? => new task?
Should the vagrant-setup first of all reflect the main-onionoo server
or a good test setup or a general setup?
Maybe, the documentation should be extended to describe the possible
options.
Another new task?
> - Would you also want to update `INSTALL` by replacing the last section
with new instructions?
Patch with suggestions is attached.
> - It seems that the `run` Ant target is not required anymore, and
`bin/update.sh` needs updating, too.
I removed the 'run' task. And I think update.sh could be removed, too? You
decide.
> - Are really all `jetty8-*.jar` files required? Did you try taking out
some of them?
I think so, as I only added them incrementally; but no guarantee ;-)
> - I wonder if copying `logback.xml` can be avoided in `build.xml`. Or
if possible, is it possible to avoid copying it to directories which
otherwise contain files under version control (`etc/`)?
Removed the copying.
> - Can you explain why you switched from `<lib>` to `<zipgroupfileset>`
and from `<classes>` to `<fileset>`? I assume this is related to all-in-
one jars?
Yes, it's the classpath: we need some classes/jars in the initial startup
(e.g. jetty-stuff and logging) and inside the web-app. Adding them to the
initial classpath seemed the best way to have all classes and dependencies
in one place.
As we have an embedded server and only one web-app, this should be ok.
> - Should we exclude test classes from generated .jar and .war files? I
think I found test classes in both of them.
I only found some junit test classes in the war and added the necessary
exclusions.
> - Should both back-end and front-end really log to the same files, or
should we separate those?
Of course, they shouldn't ;-) Initially I thought they would be started in
different folders and hence have separate logs.
Now, I made the logbase path configurable on the command line (cf. INSTALL
patch).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13089#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs