Author Topic: A communication service  (Read 1216 times)

Zero

  • *
  • Mechanical Turk
  • *****
  • Posts: 196
  • Fictional character
    • AGI DEV LOG
Re: A communication service
« Reply #15 on: April 19, 2016, 08:01:06 PM »
Or maybe name it:
Code: [Select]
R E A D
E V A L
S E N D
S N A P

Or:
Code: [Select]
R E S S
E V E N
A A N A
D L D P
AGI DEV LOG [ In Goto We Trust ]

korrelan

  • *
  • Autobot
  • ******
  • Posts: 236
  • Look into my eyes! WOAH!
    • Main YouTube
Re: A communication service
« Reply #16 on: April 19, 2016, 09:58:39 PM »
Quote
korrelan, you're used to highly parallel systems, you got a comment on this?

I've only just noticed this  :P

In theory when your architecture is up and running any machine can exchange information or functions with any other machine.  There has to be some kind of synchronisation between the various elements.

I use a ram disk on a ‘master’ machine to control my cluster. Each of my six, four core nodes runs a standard bench mark (for load balancing/ some are doing other tasks/ vision/ etc) and then flags the master it’s ready for it’s first chunk. The master splits the data load into blocks appropriate to each nodes resources/ performance and allocates it to the node. A flag system on the master is updated by each node when it’s finished processing the data. When all nodes have returned they have finished, the time cycles for the task are re-calculated and adjusted appropriately and the next block is sent. Through load balancing optimum throughput is eventually achieved.

I have evening access to a 1500+ core cluster and the above method works great. Think of it as a botnet designed for parallel processing. Data transmission and local storage/ network speeds can make a big difference to a nodes performance so Load Balancing is key.  Parallel processing across nodes only becomes efficient over a certain work load; using fewer nodes can sometimes be more efficient when network latency is a governing factor to overall system performance.

You could use a similar method; each small application would register through TCP pipe with the master machine. You could either check on each overall program cycle for the synchronising of data transfer/ processing, or each node could also notify the master how many cycles it requires to complete an approximate task, this would drastically cut down on delay loops waiting for data.

A second similar method…

I've recently had to write a server-less network system.  Each node can exchange data with any other node with no central server.  So if a node gets destroyed the data within the network remains intact and the network looses no data/ functionality. All nodes seek other nodes in range and exchange encrypted data packets from any node to any other node.  Once a node enters the arena/ range it’s instantly updated with all network telemetry/ data. Once a node has received a packet it’s flagged as read, this again spreads across the network instructing nodes to delete that packet and stop transmitting it. Basically all nodes know all information at all times, as quickly a possible, and every node has complete picture of the state of the entire network. Also if a node stops responding, etc all other nodes are notified on a priority basis. It was a pain to write.

So the two methods are basically the same except one is server less… and much more complicated to code.

I suppose you could have a hybrid of the two methods, but keeping track of where the master synchronisation flag stack is as more nodes join and leave collections would be a nightmare.

Anyway… whether it is a single master or a globally shared metric, something some were has to keep track of available functions/ resources otherwise you are going to hit massive bottlenecks and waste a lot of processor cycles, one frozen node could bring the whole lot down.

Edit: Also once my nodes have been allocated their quota of cortical columns only the transient data between columns and a little extra for neurogenesis, etc is transmitted over the networks to other nodes. This usually forms a packet of a predictable size, ish.

Perhaps if you where to locally sync the nodes to master time pulse and then break any data down into a regular sized packet (10K), if each node only exchanged data at this set size but sent the full file size in the first packet other nodes could calculate how many system cycles would be required by each node to do a set job.

Hmmmm… Gonna need some more thought  :)

 
« Last Edit: April 19, 2016, 10:54:19 PM by korrelan »
It thunk... therefore it is!

Zero

  • *
  • Mechanical Turk
  • *****
  • Posts: 196
  • Fictional character
    • AGI DEV LOG
Re: A communication service
« Reply #17 on: April 20, 2016, 07:00:56 AM »
These 2 methods are interesting, and I'm excited about this system. A running network probably feels like a living thing (alive, she's aliiiive!)

The communication service is obviously inspired from various social networks, like Twitter. I had another idea, from SnapChat. Messages could be emitted with an expiration date (a few seconds). Beyond that, the message is considered irrelevant and deleted. The idea is: if it has not been treated soon enough, it probably means that the system had other fish to fry.

Two things are important here. First, the service is meant to run on a single machine, and even on a single thread since it's nodejs behind. 2nd, it's meant to run a mind. A mind can focus on something, forget things... It should work even without being perfect (like when a message is deleted).

It's hard to explain.
AGI DEV LOG [ In Goto We Trust ]

korrelan

  • *
  • Autobot
  • ******
  • Posts: 236
  • Look into my eyes! WOAH!
    • Main YouTube
Re: A communication service
« Reply #18 on: April 20, 2016, 08:24:41 AM »
Oooooh! I got the wrong end of the stick lol

All these small apps are going to run on just one machine.  You want to bolt small apps with specific/ limited functionally together to create new applications (or mind)… on the same machine.

I've been working on parallel networks tooooo long, everything looks like a network to me atm, lol.

So like a DLL library of functions, with a shared memory work space? Reminds me of Microsoft's Object Linking & Embedding (OLE ) architecture.

What advantage would this schema give over traditional programming with a good function library?  :)

I'm not trying to diss the idea, wouldn't this be using a methodology (programming) to recreate a less proficient copy of it’s self?

What kind of functions are the modules going to handle?  :)
It thunk... therefore it is!

Zero

  • *
  • Mechanical Turk
  • *****
  • Posts: 196
  • Fictional character
    • AGI DEV LOG
Re: A communication service
« Reply #19 on: April 20, 2016, 03:16:13 PM »

Actually, it's inverted, compared to a DLL library.

In a typical system, a function library is available, and it provides functionnalities: it can do things when you want it to. But it won't act by itself. It is just sitting here, waiting for orders.

Here, components are active. They watch other components, and they react to what they see. Components are more like non-player-characters in video-games. They follow other components, they receive their products, and they emit products that are received by other components, and so on.

If I'm not being clear, please forgive me and tell me it's not clear :)

The advantage I can see here is: when you add a new component to the system, the system can't be weakened, since you can't modify what other components do. You can only make the system smarter and slower. Since computers are getting faster everyday, the whole thing looks like a interesting path to... who knows!

Components can handle any kind of functions.

What do you think?

AGI DEV LOG [ In Goto We Trust ]

Zero

  • *
  • Mechanical Turk
  • *****
  • Posts: 196
  • Fictional character
    • AGI DEV LOG
Re: A communication service
« Reply #20 on: April 21, 2016, 03:22:05 PM »
WIP...

The following code:
Code: [Select]

<Write> <Extract> <tab> [|c| |b|]

<Assign>|tab|
<Associate>
[ |a| |b| |c| |d| |e| ]
[ (1) (2) (3) (4) (5) ]

<Write>|---|
<Write>|---|
<Write>|---|

<Square list>[(5)(6)(7)]

<Assign> |Square list| [<Distribute and interpret>[<Write><Square>]]

<Write>|---|
<Write>|---|
<Write>|---|

<Write> <My stack>

<Interpret list> <Cross> [<Square><Double>] [(2)(3)(4)]

<Write>|Ok|

<Assign> |Double| [<Multiply>(2)]

<Assign> |Square| [<Multiply><Duplicate>]

<Assign> |Distribute and interpret| [<Interpret list><Distribute>]

Outputs the following log:
Code: [Select]
==>|Ok|
==>[(4)(9)(16)(4)(6)(8)]
==>|---|
==>|---|
==>|---|
==>(25)
==>(36)
==>(49)
==>|---|
==>|---|
==>|---|
==>[(3)(2)]

Remember it reads backwards!
AGI DEV LOG [ In Goto We Trust ]

korrelan

  • *
  • Autobot
  • ******
  • Posts: 236
  • Look into my eyes! WOAH!
    • Main YouTube
Re: A communication service
« Reply #21 on: April 22, 2016, 08:33:47 AM »
Ok! Now I get it.

The small apps are a kin to collections of neurons with specific functions, the shared memory/ work space would represent the connectome.

I think you would have to format the memory/ work space in some way, so data of a specific nature is always located in the same areas, like a cortex map.

This would make it much easier/ faster to read/ write relevant data.

I think this is a cool approach to AI.  ;)
It thunk... therefore it is!

Zero

  • *
  • Mechanical Turk
  • *****
  • Posts: 196
  • Fictional character
    • AGI DEV LOG
Re: A communication service
« Reply #22 on: April 22, 2016, 09:21:41 AM »
Thank you  :)

Currently, there's no shared memory (I mean, inside the system, but it's fine to create shared mem outside of it).

For a component, data of a specific nature can be located by connecting to another component that produces this kind of data. It's almost geographical: a component requests a connection to a port of another component by naming it. Imagine a "hello world" component written in Pascal, in stdio mode:
Code: [Select]
program HelloWorld;

var s : string;

begin
  readln;
  writeln('<Connect me to> |Smith| |DATA OUT|');
  repeat
    readln(s);
    writeln('<Produce> {|Received|'+s+'}');
  until (s='|Die|');
end.
This component immediately requests a connection to the DATA OUT port of Component Smith, and then, everytime it receives <something> from Smith, it produces {|Received|<something>}. Until the <something> is |Die|.
AGI DEV LOG [ In Goto We Trust ]

korrelan

  • *
  • Autobot
  • ******
  • Posts: 236
  • Look into my eyes! WOAH!
    • Main YouTube
Re: A communication service
« Reply #23 on: April 22, 2016, 10:21:30 AM »
I presume this scripted language optimizations to allow other background tasks to function, otherwise the single repeat/ until loop would stop the others apps functioning.

How many repeat/ until loops can be running at once.  Does Pascal spread the processor load automatically, or is down to the OS?
It thunk... therefore it is!

Zero

  • *
  • Mechanical Turk
  • *****
  • Posts: 196
  • Fictional character
    • AGI DEV LOG
Re: A communication service
« Reply #24 on: April 22, 2016, 12:08:19 PM »
The OS does it.

Imagine you have 4 CLI-based applications running at the same time. You have a Lua REPL, a prolog REPL, an AIML chatbot, and Ed the old text editor.

So you have 4 consoles on your screen, showing 4 prompts. Each of them is waiting for user input. As long as you don't type anything, these applications don't eat CPU, right?

Now imagine their stdin is connected to the communication service. When one of these apps receive a message, it reacts accordingly. But while these apps don't receive any message, their execution is suspended by the OS, waiting for user input (which is actually comservice input).

Components should not be considered blocked when they don't receive messages: instead they should be considered available and currently unused, like a Prolog REPL waiting for user input.

Am I being understandable?

[EDIT] Sometimes I'd like english to be my mother tongue  :)
« Last Edit: April 22, 2016, 01:33:40 PM by Zero »
AGI DEV LOG [ In Goto We Trust ]

 

Welcome

Please login or register.



Login with username, password and session length
A sun becomes "white" twice this month
by Snowman (Video)
Today at 12:18:39 AM
The last invention.
by keghn (General Project Discussion)
June 30, 2016, 04:39:31 PM
Friday Funny
by Claude (General Chat)
June 30, 2016, 04:33:33 PM
Nancy the Automaton
by korrelan (AI in Film and Literature.)
June 30, 2016, 06:55:52 AM
The Athena Project
by Snowman (General Project Discussion)
June 30, 2016, 03:40:48 AM
mini a.i puzzles
by yotamarker (General AI Discussion)
June 29, 2016, 05:15:29 PM
detective algorithms
by yotamarker (General AI Discussion)
June 29, 2016, 02:57:54 PM
recognition of grids
by keghn (General Project Discussion)
June 28, 2016, 07:54:31 PM
Microsoft Research reveals significant advancements in gestural UI
by Tyler (AI News )
June 30, 2016, 05:00:05 PM
Meet Robert, the alien hunting AI: Smart software will scour exoplanets for signs of life
by Tyler (AI News )
June 30, 2016, 11:00:18 AM
Robot eyes and humans fix on different things to decode a scene
by Tyler (AI News )
June 30, 2016, 05:00:15 AM
What new technologies will improve customer service?
by Tyler (AI News )
June 29, 2016, 11:00:37 AM
Microsoft's Nadella says 'A.I. must guard against bias'
by Tyler (AI News )
June 29, 2016, 05:00:09 AM
The AI 'Top Gun' that can beat the military's best
by Tyler (AI News )
June 28, 2016, 05:02:27 PM
Anki's Cozmo: the Intelligent Robotic Toy You've Always Wanted, Maybe
by Tyler (AI News )
June 28, 2016, 11:00:09 AM
@smilevector can put unsettling grins on any celebrity face
by Tyler (AI News )
June 28, 2016, 05:00:07 AM

Users Online

18 Guests, 1 User
Users active in past 15 minutes:
ivan.moony
[Trusty Member]

Most Online Today: 28. Most Online Ever: 208 (August 27, 2008, 08:36:30 AM)

Articles