Hi,
I would like to have one clarion program send messages to another (clarion?) program for processing with the results sent back. The processor would be single threaded.
I tried searching for “message queues” and some other flavors but did not see a good fit.
Trying to avoid known issues and wheel re-creation.
Thanks.
EasyDotNet supports Message Queues .
Thanks. Has anyone used NamedPipes with clarion programs?
I have. Named Pipes is very powerful, but very “heavy” tool. There are a lot of security, synchronization, memory sharing etc. issues. That’s why it may be recommended only if you need networking.
IMHO, the best way for single computer is using SendMessage() API function for commands and File Mapping object for data.
Also, if you have up to 400 bytes of data (max. message size for single computer), Mailslots may be recommended.
Don’t rule out using sockets. Constantine has some good suggestions, but if you’re looking to implement this ASAP then you’re more likely to find a 3rd party socket solution quicker
Depending on the version of Clarion you’re using TCP/IP socket communications was added and an example app was included. \Examples\QuickSocket
This uses the ClaSocket.tpl
Thank you for this hint, Lee!
However… as so often with examples from SV, they are … hmmm, I better do not elaborate.
After installing I found this QuickSocket example and yes, it compiles.
It even runs!
You look at the program, get the impression that this is a rudimentary Chat-App, so you start the first instance as a server, then run a second instance as a client.
Okay so far.
You type some “Hello World” kind of stuff into one of the both instances.
Now what?
I mean, its a chat program. But this “Hello World” (or “blabla” for the intellecuatly challenged like me) never appears on ‘the other side’. Until you click on that friggin’ window and put the focus on it.
But thats not the way how chat programs work!
Does no one ever test the demo apps before thy deliver?
We all know other vendors, who are able to produce demo apps, which are thought through and through.
Please be assured that this rant is not against you. But since you mentioned this example…
Wolfgang
Just tried the QuickConnect example, but for me I am getting missing template errors Clarion11 Version, missing clw files and not being able to build it
Am I missing something obvious?
I was actually looking at how to use Named Pipes, but this post is the only one I find when searching for anything related to it.
I'll weigh in late on this thread, but our vuFileTools has Mailslots support built in for just this sort of thing. It works quite well, is simple to implement and is quite robust.
Docs on it here:
Info on vuFileTools here:
https://www.clarionproseries.com/html/vufiletools.html
Charles
I've used Memory Mapped Files (MMF)
And synch objects to signal something is ready to process. I've used that to work across the 32/64 but boundary.
Its quick, after it initialized, I've had a round trip conversation between the two programs return on the same clock tick in .NET that's one ten millionth of a second. But that's a bit inconsistent, I imagine it has to do with OS task scheduling