I'm currently working on a Bot in Java that is to run on a Linux machine without any graphical capabilities (ie. No KDE or GNome or other XFree on it) - my question is neither specific to Java nor to Bots, but feel free to move it.
I want to make a User Interface that runs on a different computer (Windows) that accesses the Bot on the other machine - in other words, a Remote User Interface.
I have been thinking of two approaches, but I can't really seem to pick between the two:
#1 - Miniature Web Server. I create a module to my bot that listens on a specified port, and can be accessed using the HTTP protocol. This way I can access the bot with my browser.
#2 - Observer/Observable. My bot becomes the Observable, and my UI an Observer. I use a Socket to connect the two like so:
Bot Observable --- Bot Observer <--- Socket --> UI Observable --- UI Observer (The actual UI)
Any thoughts on this, or better ideas?
Implement both. The Web Server one will be useful where the only software on the client computer is a browser. On other hand, when you want more control of over your interface, you can use the custom client software.
Even expose something binary via port 80 that can be accessed with some kind of special protocol header. The nice thing about having port 80 open is that it's typically not blocked by firewalls; while B.net connections don't work from my workplace, a Web Service web application used to update my clan's website does.
The problem with port 80, however, is that you can't listen on it on Linux unless you're root.
I actually do both of those strategies for my Java bot. Have a look at http://javaop.clan-e1.net if you're interested. I have a web server and a telnet server.
Why not just write a graphical interface for your bot which runs if it detects the X Windows System.
Then you can just pass -X on an ssh command line to get a graphical session on the remote computer.
That works for systems the utilize X-Windows, but what about systems that do not?
Quote from: Tuberload on October 14, 2004, 03:13 PMThat works for systems the utilize X-Windows, but what about systems that do not?
Why would you want to use a system that doesn't have an Xserver?
Perhaps I should have noted that I'll only be using the Bot myself