Posts

subscribe via RSS

  • Zeroconf made easy: using Bonjour for Java, Part 1

    It's really easy. If you have some clue about network programming and Java, this shouldn't be extra hard to understand. It's about zero-configuration, the ability of devices to e.g. discover them independently of any server. There are several implementations, I choose to use Bonjour, which is provided and developed by Apple. The Java-Bindings are available for Windows and, of course, Mac.

    To use them, you have to install.. nothing on a Mac ( I actually don't know when they introduced it to be a part of OS X, but anyone not using a 10 year old Mac should be fine ), and Bonjour for Windows for Windows. Install your JRE prior to running the Bonjour installer, as it won't install the Java Bindings if it doesn't find a working JRE.

    Bonjour is one implementation of Zeroconf. It uses Multicast DNS in combination with DNS Service Discovery to allow for service browsing and discovery. Many Windows-Users may have wondered about the mDNSResponder.exe process running all the time. It's Bonjour.

    So, let's pretend you're writing a killer-network-application that wants to notify other instances of it running in the network of its existence. It would have to call it out, which is done quite simply as follows.

    First of all you have to do the import stuff, thats self-explaining i guess

    import com.apple.dnssd.*;

    now let's call the class thats responsible for announcing the service ServiceAnnouncer. The interface is as follows:

    public interface IServiceAnnouncer {
    	public void registerService();
    	public void unregisterService();
    	public boolean isRegistered();
    }

    It's quite simple and I intentionally didn't include any methods for setting the service' name etc. for simplicity. Now let's go over to the implementation part.

    public class ServiceAnnouncer implements IServiceAnnouncer, RegisterListener {
    	private DNSSDRegistration serviceRecord;
    	private boolean registered;
    
    

    Continue Reading...

  • Whats next - Sharer: Better File Sharing.

    Good morning. It seems I have to stay wake so i don't oversleep. Oversleeping would mean something like missing a flight, not really desirable. 

    Staying wake always makes me do weird stuff in the middle of the night. That is, reading all feeds I recently ignored, taking care of stuff that has to be taken care of ( that is university ) and scheduling my activities for the upcoming, lets say, 3 weeks. 

    Blogging is definitely a part of it, as I'm not exactly happy with the posts here. I'm working on it, to be more sepcific: I'm planning to do an article series on a .. secret topic. You'll see, but I still have to finish work on Sharer, my LAN-Filesharing utility. I'll tell you something about it. 

    Sharer is at the moment simply a damn simple binary protocol and a Application implementing it. The protocol structure is quiet simple. A connection between two clients is initiated by establishing a control-connection. Thats the one used to retrieve metadata like file information etc.. If a client wants to get a specific file, it requests a transfer connection. File is being sent over it. I'm still working on it, as it appears to be more work than I initially planned. 

    This whole project is based on the idea that simple file sharing that is decentralised and restricted ( or at least primarily designed ) for use in local networks is pretty much a lame topic. Every major company is proud to have some own protocol there, them being not compatible bla bla bla. So i decided to waste some time on this proof of concept. To make it really useful and simple to use ( remember \mycomputer or \192.168.0.12 ? that is _not_ user friendly! ), Sharer uses the Bonjour for Java Bindings provided by Apple. The Usage is quite straightforward, and it works well. I haven't checked out yet if these Bindings are also available for Linux, but I hope so. At least for Windows and Mac(!) they are. 

    I think I'll try to online check-in now. Window seat.

    Continue Reading...

  • Blogger.com won't let me undo "Delete Blog"

    Well, essentially thats it. I clicked that button, and normally there would be some kind of confirmation. Guess what. Nothing. Just vanished. That sucks, I really wanted to import it here. Really. Sucks. Argh. Anyway, if you are a blogger.com user, keep that always in mind. There is nothing between online and fully available and gone away forever. I'd be happy if someone could provide me with a dump of his rss-reader featuring the contents of my old blog. And no, I don't have any backups, and I hate myself for that. 

    With a new blog, and fairly excited because he's going to get a visitor tonight: Momo

    Continue Reading...

  • Legacy Olé!

     

    [caption id="attachment_41" align="alignright" width="300" caption="MacBook Pro Legacy Edition."]MacBook Pro Legacy Edition.[/caption]

    It is so funny, having the year 2008 and being forced to take of stuff like this:

     

    enabling the A20-gate to access more memory than usual a few hundred years ago, then reading through the interrupt documentation ( my favorite is actually "Read light pen position", int 10 ) to discover that actually all of it is completely outdated and that new standards were built on top ( VESA, e.g. ).

    But believe me, it is really interesting to learn that stuff, it gives you a really new way of seeing a computer.
    Anyway, i stuck at the A20 line. It's there for well-documented legacy reasons ( I toyed with the idea to link to wikipedia, but dropped it, everybody should be able to access wikipedia :-) ) and survived even the Apple PPC-Intel transition, so now its part of my mac. In fact its nothing really disturbing, just a few lines of code, and I think it shouldn't be considered a major flaw. It's just funny.
    Another thing that will maybe amuse you is the interrupt descriptions. Its just so not up-to-date, rather fits in a museum than on a mainboard, but well, still supported. Except maybe the light pen, though I like the idea.

    Continue Reading...

  • OS-Developing Challenge

    A good friend of mine, Max, studying computer science in Karlsruhe and I decided yesterday that all currently existing and established Operating Systems suck. This is nothing new. Really not, there are some million users knowing what I'm talking about.
    So our goal is to develop an Operating System without any legacy stuff ( No, no serial port support.. ) that is easily extendable and based on some kind of microkernel yet to be developed. And no, we don't have too much time, just too less fun. Anyway, I'll keep you updated here. I've gotta go back to reading Tanenbaum, great book.

    Continue Reading...

Newer Posts Older Posts