Schlagwort-Archive: servlet

landing.page.-.reworked

as i moved the landing page from plain html to a framework-based construct, i picked  up bootstrap for this issue. having jquery and css prepared, is half the way to a nice site.  i had plain javascript under construction as well, but fiddling from scratch with a handful of methods or classes, was to slow and in the end sucking, so i was happy to get a proper toolkit to work with.

landing page screenshot
landing page – section: scope

using version 2 of bootstrap did the trick over the past year, but as i noticed, the new version 3 was on the door.  new fonts, a bunch of icons and all for free. okay, some features are hard to find, but the result is a fast page and the dom-tree is ready in something like 800ms. using the social plugin from g+ makes the complete page a bit slow, but the scoring for search engine optimization (seo) will give the return.

furthermore, i implemented blueimp-gallery, font-awesome, bootswatch, piecemaker and jquery(mobile) as backbone for that libs. that is quite a lot, but as i wanted the page delivered by a servlet, the  structure and usability was more in the focus. beside that nice modules, the result and presentation is it worth. it took me a while to grow the inner organisation of the topics, the documentation and examples for each package is less then expected.

landing page screenshot
landing page – section: service/tech

the next step is, to use lesscss as condenser for the bloated javascript and stylesheet files, and shrinking them to the objects, that are realy needed for the site itself.  so i need to stick into node.js, npm and other superglue for server-side javascript. its not my cupcake, but it looks like i need to dive into that. running that on windows would need cygwin and my experiences with that leads me to work on pure linux.

landing page screenshot
landing page – section: service/tech

anyhow, the raw stuff is done, finetuning, colors, text and tiny changes will come the next time. but all-in-all, its just to have a presentable domain by hand.

tomcatServer

as i have the rootServer, i can try and play niceley with my own coded stuff in java, running on tomcat. as the default-webserver just having the php stuff on it, i was looking for my own machine ( or at least for the chance to deploy my stuff ) since a long time.

with no big experience in the hosting field, iam not sure to put the tomcat naked onto the web, so i decide to hide the service behind a proxy/router. after i looked into the given examples, apache could be used therefore. thats to easy, i thought and i remembered some lighthttpd from my school, that one professor took for his page.

configuring the ports and the reverse-proxy was done quite quick, but having more then one subdomain means more then a single config-file. another thing is, that i want to play with load-balancing, so the config was done in three parts.  as example, the workflow of a domain like reporteer.ioioioio.eu

part 1:

reporteer.ioioioio.eu to localhost:80. the gateway with round-robbin load-balancing on a virtual host (server-0) in berlin and redirect to the server-1 in jena.

part 2:

redirect from port 80 on server-0 to server-1 port 80, where another lighty was running.

part 3:

redirect from port 80 to port 8080, where tomcat was running and targeting the servlet-path like http://server1:8080/reporteer/

caching on each layer for different filesizes and different file-types was done that way. as the commong filesize on the http level is mostly below 64 kilobyte ( to measure ) i passed files from the servlet between 64kb and 1mb as java-cache, smaller files on the lighty-instances, separated for images and js/css.  so, some css and some javascript ( lets say up to 8 ) per request was reasonable. a unbounded amount of images where handled by the servlet, beside tiny pictures, like thumbnails and icons.

so i felt a bit save for my tomcat, that exploits or my shity code wont run into a desaster for external incomming requests on port 80.  „the evil hacker“, who wanted to get inside the machine would have to overcome the multiple redirect-layers on the plain/vanilla web-server, to catch the tomcat. beside the fact, that i didnt used any php/cgi nor sql-engine, the chance to fail to quick was not my point anymore.

but the main aspect is, that i can run active code now on the machine. before that, i just made passive / xml based stuff with gwt to run on the vhost i had. now remote-procedure-calls ( rpc ) are possible, beside general httpRequest.