• August 18, 2022, 05:56:39 am

Author Topic: Soutien Bot  (Read 9444 times)

Punk

  • Addict
  • *****
  • Posts: 168
Re: Soutien Bot
« Reply #25 on: October 31, 2010, 06:58:28 pm »
Seems rather pointless, why don't you just run the "local bot" on the server and, then allow "webbots" to view/control it?

I think you're missing the point to this and I'm not about to revise it.


@DavidK
Yes, it could be for that even. Matter of fact, it could also be a starting ground for game hosting like GHost++, StarBot, etc...

Punk

  • Addict
  • *****
  • Posts: 168
Re: Soutien Bot
« Reply #26 on: November 25, 2010, 10:32:38 am »
So, I have put a hold on the project as usual. I've ran into some obstacles that Ed and I have been trying to dissolve. The sad part about it is that there is no viable solution to it...

Here is whats going on... Okay, I've been able to keep the socket alive and maintain a solid connection to battle.net (which I originally thought wouldn't give me problems). Now, the tricky part is being able to relay data back to the client web interface (which is what all of you have seen so far). Since HTML4< has no true method of pushing data to a browser, trying to make a real-time chat bot (with an interface) was needless to say, not possible.

Yes, there are solutions to this, but like I stated there is no "true" method of pushing data to a browser. There is something calling comet programming which simulates pushing but in reality, it is polling. This is what I want to avoid because it could leave the client with overhead that I don't want to bear on them.

So my solution is this: Even though HTML5 is still a working draft, most browsers to this day (Chrome, Firefox Beta, Opera, Safari Beta, and a few others) offer a critical feature with HTML5 - being able to derive a websocket straight from the browser. This allows realtime data to be shared between a remote socket, and the client. Therefore, I can actually execute ajax procedures (which is what SoutienBot's front end is written in) remotely to your client. This is what we call actual pushing.

Anyway, my solution has worked but now I must change my framework of the bot to be compliant with WebSocket. This won't be hard, it'll just take a little bit of my time to perfect it.

Any suggestions, let me know!

pikachu

  • Administrator
  • Hero Member
  • *******
  • Posts: 3,344
Re: Soutien Bot
« Reply #27 on: November 27, 2010, 03:28:38 pm »
Any suggestions, let me know!


http://php.net/manual/en/function.pfsockopen.php
http://en.wikipedia.org/wiki/Comet_(programming)

If you set a minimum interval between responses, the overhead will be negligible.

BaDaSs

  • All Your Base Are Belong To Us.
  • Addict
  • *****
  • Posts: 101
Re: Soutien Bot
« Reply #28 on: March 03, 2011, 04:30:07 am »
Could you push data to a local file and have php read from the file and an ajax script to update the browser?
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity.
-Op N1 @USEast-
http://networkone.dyndns.biz

pikachu

  • Administrator
  • Hero Member
  • *******
  • Posts: 3,344
Re: Soutien Bot
« Reply #29 on: March 03, 2011, 04:37:00 pm »
Could you push data to a local file and have php read from the file and an ajax script to update the browser?

You forgot to mention the component that pushes data to the local file...as in, a whole bot implementation.  He's talking about using just php or html5 to keep a live connection to bncs.

BaDaSs

  • All Your Base Are Belong To Us.
  • Addict
  • *****
  • Posts: 101
Re: Soutien Bot
« Reply #30 on: March 03, 2011, 04:43:28 pm »
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity.
-Op N1 @USEast-
http://networkone.dyndns.biz

pikachu

  • Administrator
  • Hero Member
  • *******
  • Posts: 3,344
Re: Soutien Bot
« Reply #31 on: March 03, 2011, 05:03:04 pm »
I think you're missing the point.  There's no difference from a flat file implementation than one in an rdbms.  This is pretty old anyways.

BaDaSs

  • All Your Base Are Belong To Us.
  • Addict
  • *****
  • Posts: 101
Re: Soutien Bot
« Reply #32 on: March 03, 2011, 06:18:04 pm »
Yeah I really should read shit.
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity.
-Op N1 @USEast-
http://networkone.dyndns.biz

 

newBalance by DzinerStudio