Valhalla Legends Forums Archive | General Programming | Remote UI

AuthorMessageTime
TangoFour
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?
October 14, 2004, 8:32 AM
kamakazie
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.
October 14, 2004, 2:16 PM
Myndfyr
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.
October 14, 2004, 3:16 PM
iago
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.
October 14, 2004, 5:08 PM
K
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.
October 14, 2004, 8:10 PM
Tuberload
That works for systems the utilize X-Windows, but what about systems that do not?
October 14, 2004, 8:13 PM
Kp
[quote author=Tuberload link=topic=9150.msg84414#msg84414 date=1097784797]That works for systems the utilize X-Windows, but what about systems that do not?[/quote]

Why would you want to use a system that doesn't have an Xserver?
October 14, 2004, 11:54 PM
TangoFour
Perhaps I should have noted that I'll only be using the Bot myself
October 15, 2004, 12:51 PM

Search