Posts

Showing posts from December, 2008

Remote WoL

My initial Wake-on-Lan article is currently receiving more attention than any other page on this site. In addition, people seem to be particularly interested in how to send a magic-packet remotely over the internet or across subnet boundaries to enable cold power-up from virtually anywhere in the world.

The Problem Revisited: In my initial article I mentioned that getting the magic-packet with the target MAC address transmitted across subnets is technically impossible as the datagram needs to be sent to the reserved broadcast IP address of the subnet to which the target machine is physically connected to (this has to happen because the target machine does not have an IP registered in its network interface and is thus not directly addressable). A subnet broadcast datagram may only be sent by a machine within that subnet, which rules out any chance of direct remote WoL (i.e. sending the magic-packet from a machine and having it routed over the internet/intranet to the target subnet).

The …

Embedding Jetty Web Server

Jetty is a seriously cool product. If you’re not familiar with it, Jetty is a fully functional Web Server written in 100% pure java. The list of supported features is very comprehensive (still growing in each new release) and the web server is capable of pretty much anything Tomcat can do, and then some.

What makes Jetty even better is that it requires no install and is platform independent. This makes it highly ideal for deploying rapid proof-of-concept applications to say a kiosk system: simply put Jetty in a directory on a USB, deploy your web-app (html, php, j2ee, ruby, etc) to the directory tree, and then simply copy the structure on any machine you want to run it on.

Additionally, since Jetty is written as a pure Java web server, you are free to import the main jar libraries into your own J2SE Java application to enable web server like functionality. You could use this for complex projects to make your own web server built on top of Jetty with highly customized features, or you co…

Java Searching and Indexing

Efficient searching and indexing of digital information is a very complex computer science subject area. The most prominent example of this is Google or other internet based search engines. Google builds its search index by periodically scanning through all publicly viewable http resources and building a huge index of key-words and phrases. Building and maintaining an up-to-date index of such a large data set is a highly intensive and time consuming operation but essential for allowing fast querying of information.

Indexing: To build the index, you must first be able to extract meaning from the different types of resources made available over HTTP. The simplest and most basic form of internet data would have to be static plain-text HTML pages (or unstructured plain-text files linked from HTML pages). Dynamically generated HTML pages can be more complex to parse as they often implement user sessions through cookies and display different content based on sequences of user actions, user g…