Ai Dreams Forum

Member's Experiments & Projects => AI Programming => Topic started by: Zero on September 07, 2017, 09:47:36 am

Title: IPC on Windows 10
Post by: Zero on September 07, 2017, 09:47:36 am
Hi guys, don't hit me  ;D

How would you share data in windows efficiently?

Shared memory via file mapping?

The aim would be to connect heterogeneous programs, each of which would be providing some part-of-mind service, and unify it all around a (hopefully) conscious core.

I have this page:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx

Any thought? (I mean, beyond the inevitable "switch to some real OS")
Title: Re: IPC on Windows 10
Post by: Art on September 07, 2017, 12:29:30 pm
Zero,

Interesting page.  Are you wanting this structure or construct to remain only locally available to just one network or one person or for it to be / become much larger or even on a Cloud level, across various divides?

Sounds like so many possibilities are in the mix.

One thing that always concerns me is Security (or lack of), especially when exchanging or adding to the data flow within the construct.
(hackers be everywhere)
Title: Re: IPC on Windows 10
Post by: korrelan on September 07, 2017, 01:15:13 pm
Shared Ram Drive perhaps? Or write a custom encrypted network protocol?

 :)
Title: Re: IPC on Windows 10
Post by: Zero on September 07, 2017, 02:48:26 pm
No, that would be local to the machine, so no cluster, no LAN, no nothing. I'll go even further: I always want my stuff to work fine offline.

No it's really: how do I share among processes on 1 machine, at very high speed. On windows. Tough stuff for me, I'm completely new to this.

I want to avoid bottlenecks, but I want to be open to existing works that would eventually "plug in" to this system. For instance NLP in python, ivan's works on grammar and parsing, Korrelan's nnets (ok the thing is too huge to fit, but maybe a derived system), an upper ontology thing à la Cyc, ...etc. I want streams between parts, and feedback to the core.
There's ROS on linux and other alternatives. I'm also considering message oriented middlewares like ZeroMQ.

Very open question, I know. Maybe too open, sorry.
Title: Re: IPC on Windows 10
Post by: korrelan on September 07, 2017, 03:44:40 pm
Writing efficient muti-thread code can be a pain especially when developing software from scratch.

Perhaps write for a fast single thread with an fast network protocol. Use something like oracle virtual machines to simulate a 4 core/ 4 PC network on one machine. The same tech can then easily be expanded to cover real network machines when required. This is similar to what I've done.

 :)
Title: Re: IPC on Windows 10
Post by: keghn on September 07, 2017, 04:37:38 pm
This logic, IPC, would have to be on the same slab of silicon. Because if you have 20 cpu on this chip then they would need 20 access point in to one memory location. the all write to this location at one time it could be a problem. But all cpu's or gpus's
 reading from on location at one time would not be a problem. This would be very high speed. But it is a more complex.
 I would thing AMD or INtel would be more behind this then MicroSoft.
Title: Re: IPC on Windows 10
Post by: Zero on September 08, 2017, 08:02:44 am
I want a software solution, because it should be possible to install it simply on any windows 10 machine. You know, the windows way: download, one-click install, icon appears on the desktop.

Libuv (the networking machinery behind nodejs) is a possible path. And, it's C.
Title: Re: IPC on Windows 10
Post by: ranch vermin on September 08, 2017, 11:11:14 am
share data between windows applications?   im not sure what you are wanting.
Title: Re: IPC on Windows 10
Post by: Zero on September 08, 2017, 11:35:13 am
What's not clear?

EDIT: I'll try to expand.

Nobody found the whole AGI solution yet. But I believe there are parts of solutions here and there, implemented in different languages. And there might be, in the future, other parts of solutions implemented in various languages. I want to create a message-oriented middleware, on Windows, that could unite several stand-alone programs, no matter what they're made of, around a core that would be simultaneously message broker and think machine. I'll make the core, and try to make it conscious (always feeling what's happening inside of itself) and self-aware (knowing that itself is a specific part of the world). That's the plan. Back to reality, I want fast data sharing between processes. That could be using named pipes, file mapping, or simply TCP, or anything else. I post here, hoping to receive advices from more experienced devs.
Title: Re: IPC on Windows 10
Post by: keghn on September 08, 2017, 04:12:29 pm
Basic Guide of Interprocess Communication and Pipes: 

http://technotif.com/basic-guide-interprocess-communication-pipes/
Title: Re: IPC on Windows 10
Post by: keghn on September 08, 2017, 05:27:25 pm

Socket Programming Tutorial In C For Beginners | Part 1: 
https://www.youtube.com/watch?v=LtXEMwSG5-8
Title: Re: IPC on Windows 10
Post by: Zero on September 08, 2017, 07:27:20 pm
Basic Guide of Interprocess Communication and Pipes: 

http://technotif.com/basic-guide-interprocess-communication-pipes/

Nice link, thank you.
Title: Re: IPC on Windows 10
Post by: Zero on September 09, 2017, 02:52:13 pm
Maybe I should stick to node-ipc (https://github.com/RIAEvangelist/node-ipc). Maybe I'm fooling myself, pretending to search the right tech for the job, when in fact I'm screwin around to avoid, or at least delay, the big jump.

It's a war on yourself.
Title: Re: IPC on Windows 10
Post by: korrelan on September 09, 2017, 05:27:14 pm
Ahhh… I’m back at my main machines so I can type comfortably… I hate typing on a phone lol.

Use FREE Oracle VirtualBox…

https://www.virtualbox.org/

To create a sand boxed local network of virtual M-XP machines. 

Micro XP is a cut down version of XP that runs much faster and uses far fewer resources.  You can get the MXP.iso at the link below. (Go to main YouTube page)

https://www.youtube.com/watch?v=HdMM1_FbhUk

Once you have your XP network established on your single machine you can experiment with using pipes/ TCP/ UDP protocols safely to create your software. 

If you share a RAM drive on the Host machine and connect the virtual machines over the simulated network you can quickly exchange data (MPI and flagging) between the groups.

If you write your code to efficiently share & utilize the sand boxed virtual windows machines on this network then you can later easily expand to a real network of machines.

This approach will give you a FREE easy way to develop your network based systems.

Cheap four core machines are readily available these days for as little as £40 (UK) so you could quickly and cheaply build a cluster or connect existing networked infrastructures.

(https://i.imgur.com/ECJxcBV.jpg)

 :)
Title: Re: IPC on Windows 10
Post by: keghn on September 09, 2017, 05:31:29 pm
 I am interested in IPC  because of the failure of USB easy to use software. I need to communicate with may Raspberry PI 3
boards. Can not wait for the Raspberry to upgrade to gigabit  Ethernet  on next board.
Title: Re: IPC on Windows 10
Post by: ivan.moony on September 09, 2017, 07:13:04 pm
I don't know if this might be of the interest, but you might want to check out a popular opensource OpenCog AGI framework. It is basically a bunch of command line tools covering a variety of areas of AGI (automatic logic reasoner, NLP, some chatbot try, some other areas I don't understand, ...) What could be interesting is its user interface that might be wise to investigate, because it is based on server that communicates to client branch utilitites. It also has a google groups community that is ready to quickly answer all the questions related to AGI. But be careful, that framework is extremely complicated thing to set up and to use it, and you have to compile it from source code (c, scheme, python and other languages). Oh, one more thing: OpenCog is based on Linux, I don't know is this a bad thing for you, but as it embodies client-server architecture, I suppose you can run server on a Linux machine and contact it from Win machines or anything else, even over web, I think. I don't know any firm documentation link and prepare for a mess if you are going to investigate it on your own. The supporting community (numerous programmers) is pretty diffuse and I think it would benefit from some solution that would centralize overall use cases. Strangers often ask questions in the group, somehow manage to install the whole utility set, but then they lose interest in the forest of command line applications. Maybe a whole career could be built upon connecting OpenCog pieces together, but I'll say nothing more, as it perfectly fits the description of your plan (if this solution interests you).

There are also competition AGI utility sets, but I only heard about them, I don't even remember their names.
[Edit] I remembered one, I think its name is NARS, I think it was of a guy who wasn't satisfied with OpenCog, so he made a branch of it, or something
Title: Re: IPC on Windows 10
Post by: Zero on September 12, 2017, 09:46:49 am
Hi!

Thank you guys for your valuable inputs.

It might sound strange, but I'm now investigating MQTT (http://mqtt.org/), an internet-of-things communication protocol. Designed for small messages, on low-power devices, it could be a wise choice to glue huge swarms of tiny executables providing part-of-mind services. For instance, on Nodejs, mosca would be backed by node-ipc, with a layer of self-sensors for a consciousness-ready network of processes.

EDIT: I was on my smartphone, now I'm on my computer for a longer reply.

So yes, I wasn't clear enough about what I precisely want to achieve. What I want is a system that works on only 1 machine (offline, no LAN). And this machine should run Win10. Here is why.

I believe that working on AGI is not only about magical algorithms. It's also about making it available to a really wide audience. Sure, I could go Linux/ROS, actually I'm dual boot Win10/Ubuntu on my main laptop. But people aren't! Most people simply can't go linux, or don't want to. I know the flaws in Win10, as everybody does. We have less control in Windows, and we miss POSIX, notably. But on the other hand, it would be unfair to say that MS guys are stupid or unable to build clever things properly.

As I said several months ago in another thread, even if you come up with a really working AGI, if it doesn't look (or feel) like an AGI, nothing will happen. People would say "yeah, yet another computer-scientist useless AI-related stuff". What people want is Siri-like or Cortana-like interfaces. They want to feel that the computer (or home device) is aware and intelligent. Simply put, they want to give orders in natural language, and expect the computer to understand not only the orders, but also the underlying goal of the user. I'd be happy to hear about what you think people want, even here in this very thread.

Another thing is, I believe programmers should be able to contribute even if they're not AI ninjas. There's a language called Scriptbasic. In the homepage, the authors says "There are a lot of people who can program BASIC and only BASIC. There are many people, who can not really program. Those who do not really know what programming is, and still: they write their five-liners in BASIC to solve their simple problems". I really love this way of seeing things. AI should be (also) made of simple (but useful) things. So, why not a Scriptbasic part-of-mind service provider?