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

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Peter, will Hybrid IM work with your IM?
« on: March 14, 2014, 03:55:22 PM »
I have created a 'hybrid IM' option.

It uses both your 'PeterIM' and my 'LocalIM' together. I also instructed 'LocalIM' to let the user choose the 'Local' transfer rate.

All 'LocalIM' does is move files using the file move code from .NET as I explained before.

However, the last time I ran 'PeterIM', it seemed like it was looking for files that where already moved. Is this a big issue?

edit: Numsgil can correct me on this, but, I am pretty sure .NET does not move files that are currently open.
« Last Edit: March 14, 2014, 04:08:45 PM by Botsareus »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #1 on: March 14, 2014, 06:26:18 PM »
Sorry, I'm just slow on the uptake. What's the goal of the hybrid IM?
And what is it exactly doing?

How did it seem to be looking for files that were already moved?
It does put all files in a list and then processes it. If you mess with the files in between it'll whine.

In C# the way it runs would be translated to calling EnumerateFiles and then a File.open for each file.
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 #2 on: March 14, 2014, 07:51:46 PM »
Quote
If you mess with the files in between it'll whine.

Yes, this is the behavior I observed.

The goal of hybrid IM is to move robots from the "out" folder to the "in" folder at certain intervals and to use PeterIM at all other times.
Primary usage I envision is on internet enabled terminals running of one file system.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #3 on: March 14, 2014, 08:02:26 PM »
The goal of hybrid IM is to move robots from the "out" folder to the "in" folder at certain intervals and to use PeterIM at all other times.
To teleport the bots back into the sim it came from? If so, why?
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 #4 on: March 14, 2014, 08:11:48 PM »
Oh, not at all.

It is designed to work when you have more then one instance of Darwinbots running on a single computer or on terminals connected by the same file system.

Due to how the IM code works, each instance evenly distributes all robots across all simulations from the "in folder.'

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #5 on: March 14, 2014, 08:51:39 PM »
As discussed in pm. I'll add it to 'PeterIM', but I'm still wondering about the reasoning behind it. For instances that share any kind of file system. May be the same hdd, or a network drive you can just use the default teleporters(if I'm not mistaken)
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 #6 on: March 15, 2014, 10:24:30 AM »
Probably so.

But what if you have 10 local simulations running?

You can potentially put 20 portals on the screen, but,  most people will take shortcuts:

Now you end up running local IM and a Ukraine (buffer) simulation that teleports robots (using teleporters) between the local IM and the PeterIM. But what general conditions should the buffer simulation have?
« Last Edit: March 15, 2014, 10:35:38 AM by Botsareus »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #7 on: March 15, 2014, 01:01:59 PM »
Probably so.

But what if you have 10 local simulations running?

You can potentially put 20 portals on the screen, but,  most people will take shortcuts:
You want to transit from each sim to each other sim?
Easiest way, you add a inbound/outbound teleporter in each sim, each one pointed to the same directory. Would give the same effect as putting bots from /out into /in, would it not?

You could also run a instance of the 'PeterIMServer' at one computer, and connect the clients through that IP.

Now you end up running local IM and a Ukraine (buffer) simulation that teleports robots (using teleporters) between the local IM and the PeterIM. But what general conditions should the buffer simulation have?
:huh:

Just to make some stuff clear. How should the IM function work according to you? I had the idea that every client should be treated like it's completely separate(upper diagram). Each db instance got a own directory with their own in and out folders.
(in case sims got the same username they don't get bots from each other)

You want one client/computer, one out folder, one in folder and transmitting bots from out to in to transmit bots on the same computer, is that correct? (lower diagram)
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 #8 on: March 15, 2014, 02:48:31 PM »
Quote
I had the idea that every client should be treated like it's completely separate(upper diagram). Each db instance got a own directory with their own in and out folders.
(in case sims got the same username they don't get bots from each other)

So you can have more then one instance of PeterIM running on one computer and it should not whine? That's cool.

Quote
Easiest way, you add a inbound/outbound teleporter in each sim, each one pointed to the same directory. Would give the same effect as putting bots from /out into /in, would it not?

Damn, why did I not think of that? Good point.

Quote

1.) Also, if you are going to add this, it will not hurt to make sure that only one instance of PeterIM opens. That way every time the user clicks another IM button in another simulation a new PeterIM window will not open and potentially bunk the server.

2.) I think we can also agree that if n is equal to 1 no connection to the server is necessary.

edit: Completely ignore both points and the idea I had with that 'n' variable. Your reasoning is clear. I am  simplifying putting back old code.



Quote
Easiest way, you add a inbound/outbound teleporter in each sim, each one pointed to the same directory. Would give the same effect as putting bots from /out into /in, would it not?

I guess the clients have to configure teleporters for each sim. A little annoying but not a big deal.

« Last Edit: March 15, 2014, 03:19:48 PM by Botsareus »

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 #9 on: March 15, 2014, 03:14:44 PM »
Here is the readme file that will be shipped with 'LocalIM' from now on  :P

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #10 on: March 15, 2014, 03:31:16 PM »
So you can have more then one instance of PeterIM running on one computer and it should not whine? That's cool.
Now I understand why you wanted to make it hybrid. Good to have that cleared up. :)
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 #11 on: March 16, 2014, 01:54:38 PM »
New drop. Should fix some corner cases issues. And now prints out a nice stacktrace when it hits errors, which should make debugging easier when there are issues.
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 #12 on: March 17, 2014, 05:05:28 PM »
Does it happen at any time DB2 opens a .dbo after it has finished writing it?

Edit: ah, seems to be a bug in the client, this may be the serious bug that was causing some issues.
« Last Edit: March 17, 2014, 06:15:01 PM by Peter »
Oh my god, who the hell cares.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #13 on: March 19, 2014, 12:10:55 PM »
Hi! Just wanted to stick in here that I'm personally happy with how teleporters work between sims on the same computer, so it would be nice if your changes here don't affect that. I'm mentioning this because it was very hard to track down the  issue where this wasn't working. So it would be nice if this wasn't changed.

I also realize that I might be taking out my rear end since I'm a programmer nobe, so what I'm saying here might be irrelevant to what you're doing. If so just ignore and carry on.  :P
The internet is corrupt and controlled by criminally minded people.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Peter, will Hybrid IM work with your IM?
« Reply #14 on: March 19, 2014, 06:23:25 PM »
Nothing has to change. It's pretty much separate, it's just to connect a /outbound and /inbound folder with others.

It's possible to run DarwinbotsIM standalone (with the proper arguments at startup), connect the /outbound and /inbound folders with normal teleporters and it should behave in the same way as pressing the IM button.
Oh my god, who the hell cares.