• Welcome to Valhalla Legends Archive.
 

Remote UI

Started by TangoFour, October 14, 2004, 03:32 AM

Previous topic - Next topic

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?

dxoigmn

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.

MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

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.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


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.

Tuberload

That works for systems the utilize X-Windows, but what about systems that do not?
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Kp

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?
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

TangoFour

Perhaps I should have noted that I'll only be using the Bot myself