Author Topic: Peter, will Hybrid IM work with your IM?  (Read 9878 times)

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #30 on: April 02, 2014, 02:08:32 AM »
Yes, I did.
Oh my god, who the hell cares.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #31 on: April 11, 2014, 04:42:49 PM »
~Server now offline~ and it's back and gone.
« Last Edit: April 18, 2014, 07:17:18 PM by Peter »
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #32 on: May 06, 2014, 04:42:45 PM »
I have reconsidered and will probably post IM and ZBevo as revision release after the 2.47.02 package drop. I am considering getting mikenet and writing my own IM algorithm, as I see no progress on IM currently. But why should I if Peter wrote fully functional IM that works like a dream? I have been reading trough Peters code and trying to understand the algorithm for transferring robots. I am considering making one client that simply uploads a robot every 100ms and another client that simply listens for robots. Peter is doing something more advanced I realize but can not really figure it out. Is it upload and download up to 25 robots on every update? Not sure.

Another issue is the politics at darwinbots.com If I do indeed get a working IM what are the chances Shasta will review it over Peters? I am a complete newb when it comes to designing stuff to do with packet transfer. Lately, it feels like every time we need Shastas help he simply visits the forum for aprox. 5 minutes an leaves. Thank god at least he is keeping the website online minus the irc channel. I wonder if anyone uses our irc anymore.

This issues are upcoming, but why does everything have to be last minute? I should be done with whatever I am doing right now (yes, I realize it is a little top secret, but there are personal reasons behind that, like making my 10 years of work on this project worth while) So, there you go. Pretty much said everything I wanted to say at the given point in time. More later, league results soonish. Bots.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #33 on: May 07, 2014, 01:11:34 PM »
I have reconsidered and will probably post IM and ZBevo as revision release after the 2.47.02 package drop. I am considering getting mikenet and writing my own IM algorithm, as I see no progress on IM currently. But why should I if Peter wrote fully functional IM that works like a dream? I have been reading trough Peters code and trying to understand the algorithm for transferring robots. I am considering making one client that simply uploads a robot every 100ms and another client that simply listens for robots. Peter is doing something more advanced I realize but can not really figure it out. Is it upload and download up to 25 robots on every update? Not sure.
25 is the arbitrary limit on bots that are in the '/in' folder.

The basis is simple.

Client sends a request.
In that request, it signals if it's going to send a bot, wants to receive a bot or both. If sending it also sends how big the file is, so the server knows how much data it can expect.
If the client wants to receive a bot. The server sends a few bytes to state how big it is and then x bytes for the bot self.
That's done within a socket connection, using compressed files and code so it knows when to send/receive bots and where to save it.
A client just saving a bot/just sending bots ought not to be too hard. May fetch you a example when I have the time.

Not using irc, most times I was on irc noone was there.
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #34 on: May 07, 2014, 01:20:04 PM »
I think we just use PeterIM because it works!

What about file management on the server side? Does the server delete a robot after it transferred it to a random client? Does it transfer one robot to a random client at a time? etc.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #35 on: May 07, 2014, 02:01:29 PM »
Technically there isn't file management on the server. It's all in memory.

Had to take a look into the code for the latter questions. I wasn't sure I took care of race conditions, seems I did. Yay

Before the bot it send it's moved to a variable sendData in a object ConnectedClient then it'll send the bot. The bot will stay in there (but won't be touched) till the next bot it being send to that client.

Server will handle tcp packages one at a time. One it gets in, or when it's time to send one. It doesn't really deal with multiple clients at the same time, it can handle part of each client transmission in quick succession(it's single threaded). Like it received 2 packages from client A, and 1 to go, it received 3 from client B with 2 to go and it send 2 packages to Client C with 3 more to send.
Oh my god, who the hell cares.