“Kevin Stallard” <kevin@fffflyingrobbbotsss.com> wrote in message
news:b9dld1$rnn$1@inn.qnx.com…
Hi Igor,
“Igor Kovalenko” <> kovalenko@attbi.com> > wrote in message
news:b9cu0l$1ep$> 1@inn.qnx.com> …
“Kevin Stallard” <> kevin@fffflyingrobbbotsss.com> > wrote in message
news:b9cim1$jit$> 1@inn.qnx.com> …
Ron,
You’ve just had a rare and very distinguished honor placed upon
you…you’ve been Igor’d > ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
Actually, he was not. You however are about to be. As they sing, ‘you
had
it
coming’… Pop, click, squish, Cicero…
Wwwhhhhooooeeee…hang on boys, we’re in for a ride! > ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=9)
Fasten your seat belts and stop smoking that stuff ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
Asyncronous messaging isn’t as good as it sounds. If you want
multiple
clients wanting the same data, you have to manage that yourself.
Ever heard of multicast?
Yeah, but does the QNX stack support it? And I’m speaking from an
embedded
perspective…it would require a fair amount of additional overhead.
It is supported.
Btw, I am just curious how do you do something like that with QNX messaging?
And what that has to do with being synchronous vs asynchronous…
Also, the
client doesn’t have control over the rate at which the messages are
comming,
In synchronous case, clients implicitly do flow control by means of
reply.
In asynchronous case either buffering or protocol-level flow control
(e.g.,
TCP) takes care of that.
I didn’t mean flow control. I was referring to applications that need to
know just how fast data is arriving, or that don’t need data at the same
rate as other applicatons. Digital filters need to know how fast data is
arriving. It is useful to have this. It is a pain to implement it on the
server side of a server that takes the initiative of sending the data…
I don’t understand what you mean at all. It must be too early for me ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
How else do you control the rate at which data is coming if not by flow
control? And how do you ‘know’ that rate when you use QNX messaging?
Further more, asyncronous is fine for me if it’s streaming audio,
but for more critical things…I’ve seen an example where a programmer
has
struggled with the continious nature of data arriving with regards to
state
behavior.
As russian saying goes, ‘there flew two flies - one was green, the other
flew to the right’. Meaning you’re confusing/mixing two things. Lack of
message boundaries has nothing to do with communication being
asynchronous.
UDP has message boundaries, being asynchronous. There are funky
protocols
like LAPD-over-UDP for people who don’t want boundary-lessness of TCP
but
need reliability (so they can’t use plain UDP).
This was kind of my point. TCP/IP can get complicated. I don’t have to
add
Well haven’t you just ranted about how easy it is to learn stuff? So how
hard it is to learn to use TCP/IP? Beyond being able to select stream or
packet-oriented mode of operation, it is not that much different from coding
perspective…
additional code to help mitigate the boundary-lessness of TCP/IP with QNX
low level message passing and QNET. Again, I’m speaking from an embedded
perspective here…
What’s there to ‘mitigate’? In most cases you can simply stuff a header into
all your messages and use it to define message boundaries on the application
protocol level (vs transport level, like with QNX messaging or UDP). You
usually have to stuff a header into QNX messages as well.
As with UNIX domain sockets, they don’t work in the network case (i.e.
you
can’t find them across the network).
You can use AF_INET domain for network/local communication and AF_UNIX
for
local, whichever suits you. UNIX domain has some distinct advantage for
local communications. Better security for example. In both cases you use
very much the same API (sockets).
Again…this was my point. I don’t have to do any of this in the QNX
case.
It is the same, regarless of a local or remote case.
And it was my point too. AF_INET code will work for both local and remote.
Having choice of AF_UNIX does not make things worse, does it?
You have would have to use DNS and
know the port to which you need to connect. It’s just a lot more
complicated.
Connecting to a remote server over IP has nothing to do with DNS. DNS is
a
name resolution service, which is merely a convinience and is not
required
for communications at all. And if you’re uncomfortable with port
numbers,
what stops you from defining a service name and then translating it into
a
port using getservicebyname()?
It does if you don’t know on which server the service resides. This is
what
I mean by a distributed environment.
Right. Too bad this does not actually work with QNET. It worked in QNX4, but
they never bothered to implement it for QNX6, AFAIK.
A client that doesn’t know where the
service is can be useful.
And equally dangerous. Ever thought of security implications? Who’s the guy
you’re talking to, huh? Is he really who you think he is? By ‘distributed
environment’ you actually mean a bunch of ‘tightly coupled’ nodes with no
security between them. Which is simply not the case for most real-life
distrubuted environments.
You also obviously mean ‘homogenous network’ because the whole network
transparency thing simply does not work for nodes with different endianness.
That is a limitation of the resmgr layer, rather than QNET per say but who
cares who’s limitation it is?
But if you have to hard code everything, then it
makes a design less flexible. So yeah…you have DNS, but you still have
to
resolve a service to a port address. Which means you have to assign one,
which means problems if you have to move it.
You totally lost me again. DNS in classical sense does not tell you where
the service is. It tells you how to translate a name into IP. The word
‘service’ is not related to IP really, it is usually associated with port
number. And you don’t use DNS to find out port numbers. You use
/etc/services and getservicebyname(). Of course you have to assign a name,
but don’t you have to do that with QNX messaging?
OTOH, there are ways to use DNS to do something neat. DNS can resolve a name
to one of a pool of IPs, randomly so that you distribute the load
transparently between identical servers. There’s nothing like that for QNET.
I am reluctant to ask also if you perhaps heard of RPC which makes the
whole
thing more or less transparent (you can make remote function calls).
Yeah…I know about RPC, but there is a lot of stuff between the client
and
server to make it work…which means a lot of stuff that can go wrong.
For
an embedded application, it doesn’t make a lot of sense for me to use it.
Actually it means less stuff can go wrong. RPC effectively encapsulates all
the protocol-level work from network application designers (including
endianess issues, mind you). That alone will shave off 80% of complexity in
networked design and practically eliminate communication-level bugs. There’s
a reason why NFS has been implemented that way.
On the other hand, QNX low level messge passing , the resource manager
framework and QNET allow you can write an app and have it communicate
over
the network or in the local case w/o programming changes.
Ughm… Cough… cough… cough. Right. Only there’s no global name
service.
Sure there is, it’s called the pathname space, and it works, I use it.
Well that would be some news. Last time I checked, the namespace was not
GLOBAL across multiple nodes. Am I wrong?
And you can’t send remote pulses (not until 6.2.1). Don’t get me wrong,
I
don’t want to just diss QNX messaging. It has its use. However picturing
it
as superior to IP is wishful zealous thinking.
For my uses, it is because it is smaller, easier to use. It takes a lot
of
stuff to make IP do what QNET can with regards to the whole QNX node
transparency thing. While TCP/IP is very reliable, it takes a lot of work
to make it do the things I enjoy using with QNET.
Practical applicability of the ‘node transparency’ thing is quite overvalued
by QNX fans. Sure, it is neat, but so what? How exactly it is something that
you can ‘sell’ to your customers? They generally don’t care about geek stuff
like that, do they? Unless it creates security issues (see below) and then
they don’t want it at all.
And about difficulty of implementing it with IP… we have networking setup
@ work where all NFS shares get automounted on all other machines under
/net/<machine_name-or-IP_address>. Works like a charm and every node can
actually control what portion of its namespace it wants to publish, to which
clients and with what permissions. Unlike QNET, where it is ‘everything or
nothing’ and a root on any node can easily get root access for every other
node.
The only real advantage QNX networking has when it is used for realtime
communications over a suitable bus, such as CAN or another fieldbus or some
kind of deterministic network like Arcnet. The reason is, for realtime
communication deterministic responce time is much more important than the
bandwidth considerations, so you actually want to avoid buffering. QNX4
native networking was popular for this reason in industrial environments
that used Arcnet and various fieldbuses, until QSSL essentially abandoned
that market quite to dismay of its supporters. QNX6 is apparently starting
to reap those benefits now in the automotive designs, where CAN networks are
becoming popular to tie various components together. I am glad they found
some good use for their networking technology, but that’s definitely a
tightly coupled system, rather than a ‘distributed environment’ in general
sense.
On the contrary, synchronous
IPC design does not lend well to networked designs at all, simply
because
network medium in most cases is neither deterministic, nor reliable
(granted, when there is a suitable medium, QNX IPC would be better for
realtime communications, but I somehow doubt that is the case implied
here).
Actually it is…> ![:slight_smile: :slight_smile:](/images/emoji/twitter/slight_smile.png?v=9)
The case implied here is Ron’s, not yours, so it is up to him to say that ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
That is what I mean. Further more, with switch
ethernet, things are more deterministic, although there are still
problems.
Still for ease of use and much simpler implementation of network
communciation, QNET is nice.
It isn’t hard to make things work using an unreliable medium (i.e. radio
modems) with QNET, and because I don’t have to add yet another layer (i.e.
PPP) I am able to use its limited bandwidth more efficently, and it’s one
less thing to debug.
You’ve missed the point. Sure, it can be ‘made to work’. However you still
can lose replies, which means you still gonna have [unkillable] clients
indefinitely blocked on remote servers. I don’t actually know how to kill
such clients in networked case. In the local case the only way is to kill
the server… I just hope that would not be the case for networked scenario
![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
And… see below about the bandwidth issue.
There’s nothing more annoying in real life than clients, which hang
indefinitely on requests that are not going to be answered. Gets twice
as
annoying when you also can’t even kill them (which happens a lot in QNX
case).
I had problems with this at first (6.1) but they seem to have gone away.
They are still there in 6.2. Have to find out about 6.2.1 yet…
…snip…
Wanna have a wager on speed of a file copy using QNET and TCP? How much
you
wanna bet?
The speed of QNET isn’t reflected in using cp. You don’t have control
over
the message size. A more accurate test would be using a socket compared
to
MsgSend() with the same message size. Further more, file copying use
TCP/IP
means you are using some network file system, which I’m sure has code to
optimize the data transfer…add that kind of layer between the you and
the
node you are transfering the file to under QNET and I bet you’d see
otherwise.
LOL. Now you’re talking… So you kinda have to add something to the QNET to
copy files efficiently, huh? And we thought QNET has nice ‘node
transparentcy’ that makes everything simple, bandwidth-efficient, etc and
TCP/IP was complicated and wasteful, no?
Btw, copying a file does not neccessary means network file system. It can
mean FTP or RCP or SSH for example. And actually even if you just send large
amount of data (not one packet) over a socket and over QNET using
ethernet-size packets, you still might find socket being faster. The reason
is, a reply for every damned packet does not have to fly over the damned
wire. The local stack gives you reply on each node, buffers the data and
then uses more suitable protocol to pass it over the wire to the remote
stack. That I think saves more network bandwidth than is being spent on
TCP/IP headers overhead so in the end you might waste more bandwidth with
QNET actually.
Even then, sockets could have been faster yet, if they weren’t based on QNX
IPC at all. Having to reply every damned packet even locally hurts
performance due to excessive context switches. And FYI, they know about it
and AFAIK are planning to do something about it (shhh!!! don’t tell
anyone!!!).
…snip…
BEGIN RANT:
Ok…ok…there is the notion that there would be a learning curve for
new
programmers on a project, but give me a break…how hard is QNX
message
passing compared to TCP/IP? And just how much time would a new
developer
have to spend learning this stuff in order to be productive? I mean,
really…the hardest thing about the resource manager framework for me
were
the docs, as soon as I had a couple of examples, I was ok. So now,
not
only
does the new developer have the docs, he’s got an entire system based
on
the
resource manager framekwork, Quelle example!
END RANT:
Have you tried to teach a team of 20-30 people of different backgroubds
and
skills level how to use QNX messaging properly? Let alone how to write
resmgrs… You should try.
I don’t work on teams of 20 or 30 people, I work on teams of at most 4 or
5.
20 to 30 is just too big…
It is quite enlightening experience, believe me.
Now, “you’ve been Igor’d”.
Nice hearing from you Igor, hope things are going well for you…take
care,
Thanks Kevin. At least you’re taking it like a man, unlike some people did
in the past ![:wink: :wink:](/images/emoji/twitter/wink.png?v=9)
Regards,
– igor