f



Is it possible to understand the subjects of 2nd volume of UNIX Network Programming with APUE book?

Is it possible to study second volume of Unix Network Programming - 
Interprocess communication (by Stevense) with Advanced Programming in 
Unix Environment by the same author?

I've got the idea that the topics/subjects in second volume has more to 
do with non network programming hence it seems more appropriate to be fit 
(as an extended part) with APUE book.

Could you please give me any hint. I don't understand. Do I need to study 
it with APUE or after the first volume of Unix Network Programming.
0
vectrum
8/17/2016 6:11:07 AM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

6 Replies
581 Views

Similar Articles

[PageSpeed] 25

On Wed, 2016-08-17, vectrum@rediffmail.com wrote:
> Is it possible to study second volume of Unix Network Programming - 
> Interprocess communication (by Stevense) with Advanced Programming in 
> Unix Environment by the same author?

I have had all three for many years, but never read the IPC and
threads volume much.

> I've got the idea that the topics/subjects in second volume has more to 
> do with non network programming hence it seems more appropriate to be fit 
> (as an extended part) with APUE book.
>
> Could you please give me any hint. I don't understand. Do I need to study 
> it with APUE or after the first volume of Unix Network Programming.

You may be right. On the other hand, IPC and networking are often used
together in programs.

I'd be a bit careful when reading.  I suspect the IPC volume has aged
more than the others, with interfaces and techniques becoming obsolete
or un-trendy, while new ones have shown up.

For network programming today, my first-hand choice is to use the
Boost.Asio C++ library, with nonblocking sockets and no threads.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .
0
Jorgen
8/17/2016 11:03:30 AM
vectrum@rediffmail.com writes:
> Is it possible to study second volume of Unix Network Programming - 
> Interprocess communication (by Stevense) with Advanced Programming in 
> Unix Environment by the same author?
>
> I've got the idea that the topics/subjects in second volume has more to 
> do with non network programming hence it seems more appropriate to be fit 
> (as an extended part) with APUE book.
>
> Could you please give me any hint. I don't understand. Do I need to study 
> it with APUE or after the first volume of Unix Network Programming.

They're mostly indepdendent of each other so any combination covering
the subjects you're interested in should be fine. Eg, I own APUE and the
first volume of UNP because primarily interested in network programming
and found the IPC-related information in these two and the available
system documentation sufficient for my needs.
0
Rainer
8/17/2016 1:36:57 PM
Jorgen Grahn <grahn+nntp@snipabacken.se> writes:

[...]

> For network programming today, my first-hand choice is to use the
> Boost.Asio C++ library, with nonblocking sockets and no threads.

Half-live period of this information: 0.001ms. In this time, fifteen
different C++ networking libraries will have been released, 6.8 of them
written by various combinations of the authors of the Boost library as
they encountered naming problems they couldn't agree on and the most
recent of the 3.141 C++ standards published during the same period will
be sufficiently obsolete that the draft of the draft standard supposed
to be standardized after the current draft standard has been standarized
is considered authoritative for the next 0.000457s.

Putting this in other words: There are C++ groups.
0
Rainer
8/17/2016 1:40:30 PM
On Wed, 17 Aug 2016 14:36:57 +0100
Rainer Weikusat <rweikusat@talktalk.net> wrote:

> > Could you please give me any hint. I don't understand. Do I need to
> > study it with APUE or after the first volume of Unix Network
> > Programming.
> 
> They're mostly indepdendent of each other so any combination covering
> the subjects you're interested in should be fine. Eg, I own APUE and
> the first volume of UNP because primarily interested in network
> programming and found the IPC-related information in these two and
> the available system documentation sufficient for my needs.

Seconded.  I read them "in order", starting with APUE, and then the
trilogy.  I found APUE and volume 1 most useful because I'm not
interested in writing my own TCP stack.  

These days, The Linux Programming Environment is my go-to source.  It's
probably a better reference, and careful to point out the parts that
are specific to Linux.  

--jkl

0
James
8/19/2016 1:22:15 AM
On 17 Aug 2016 11:03:30 GMT
Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:

> For network programming today, my first-hand choice is to use the
> Boost.Asio C++ library, with nonblocking sockets and no threads.

Didn't see that coming.  That wouldn't be my last choice; it wouldn't
even make the list of choices.  I'd rather open a fruit stand. =20

Unix already *is* an abstraction.  Nonblocking sockets and select(2)
get a lot of work done.  Better to adapt them directly to the
application at hand than to muddy the waters with another layer of
abstraction. =20

Finns det n=E5gonting mer att s=E4ga? =20

--jkl

0
James
8/19/2016 1:22:18 AM
On Fri, 2016-08-19, James K. Lowden wrote:
> On 17 Aug 2016 11:03:30 GMT
> Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
>
>> For network programming today, my first-hand choice is to use the
>> Boost.Asio C++ library, with nonblocking sockets and no threads.
>
> Didn't see that coming.  That wouldn't be my last choice; it wouldn't
> even make the list of choices.  I'd rather open a fruit stand.  
>
> Unix already *is* an abstraction.  Nonblocking sockets and select(2)
> get a lot of work done.  Better to adapt them directly to the
> application at hand than to muddy the waters with another layer of
> abstraction.  

That aspect of Boost.Asio /is/ annoing, yes.  Plus it's IMO not well
documented; you have to know BSD sockets already, and map that
knowledge to similarly-named things in the Asio API.

Still, for an unthreaded server, there are a lot of things you need to
implement which Unix doesn't (and shouldn't) provide, e.g. timers and
protocol-specific buffers.  It took me many years to find out how. I
haven't seen the literature describe how to do it well, either.

But the above was really meant more as a data point than advice.
Except, if the alternative is the OP getting lost quickly in the
pthreads jungle, I honestly think Asio is preferable.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .
0
Jorgen
8/20/2016 7:29:58 AM
Reply: