🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by Tim Mavers Fri, 24 Jan 2003 17:21
Simple NNTP question on connect/disconnect
#63603
Author: Tim Mavers
Date: Fri, 24 Jan 2003 17:21
31 lines
1637 bytes
I am building a simple news reader in Java for a personal project.

NNTP seems to be a disconnected protocol (well at least somewhat). 
For example, someone could be reading a message on a server for many
minutes and if they are connected (socket wise), it's a waste of
resources).

That said, is it acceptable to connect/disconnect when communicating
with the nntp server?

For example:

GetNewsgroupList
----------------
Connect
GetGroups
Disconnect

GetArticleList
---------------
Connect
GetGroupList
Disconnect

While obviously there is more overhead in this approach on the client
site (and it takes a little longer), is this something that is
accepted, or is frowned upon?  Personally, I hate having open
connections just sitting there doing nothing.

Thanks,
Re: Simple NNTP question on connect/disconnect
#63611
Author: those who know me have no need o...
Date: Fri, 24 Jan 2003 20:09
29 lines
1994 bytes
in news.software.nntp i read:

>NNTP seems to be a disconnected protocol (well at least somewhat). 

actually nntp, itself, make no distinction between client types so has no
preconceived notion of how long a client will remain connected nor the way
it will `work'.

>For example, someone could be reading a message on a server for many
>minutes and if they are connected (socket wise), it's a waste of
>resources).
>
>That said, is it acceptable to connect/disconnect when communicating
>with the nntp server?

yes.  but if you do it too often the setup and tear-down of the tcp
connections will adversely impact the performance of your client and the
server, especially if the server has connection limits (i.e., you may not
be able to get a connection on-demand).

>While obviously there is more overhead in this approach on the client
>site (and it takes a little longer), 

way more, and on the server side too, especially if authentication is
necessary.

-- 
bringing you boring signatures for 17 years
Re: Simple NNTP question on connect/disconnect
#63613
Author: Dufus Systems
Date: Fri, 24 Jan 2003 20:12
21 lines
1957 bytes
webview@hotmail.com (Tim Mavers) wrote in 
<5bea1a50.0301240921.50017c6f@posting.google.com>:

My own experience is that while some news servers are very good about 
tracking client disconnects, others miss it and won't free up the 
connections until some timeout period elapses. The symptoms of this is you 
might have no connections to the server, try to connect and get an excessive 
connection error even though you disconnected minutes before. 

In my case, I cache the connections, watch the state of the connection and 
let several threads work with it. So, I might download an article, then 
release the connection to a general pool. When a thread needs the 
connection, it acquires it from the pool, makes use of it and returns it to 
the pool. There is an age factor built in too. If the connection gets too 
old without being used, it's closed.  

>
>That said, is it acceptable to connect/disconnect when communicating
>with the nntp server?
>
Re: Simple NNTP question on connect/disconnect
#63616
Author: Bert Hyman
Date: Fri, 24 Jan 2003 20:25
21 lines
1744 bytes
not-a-real-address@usa.net (those who know me have no need of my
name) wrote in news:m1ptqmuxej.gnus@usa.net: 

> in news.software.nntp i read:
> 
>>NNTP seems to be a disconnected protocol (well at least somewhat). 
> 
> actually nntp, itself, make no distinction between client types so
> has no preconceived notion of how long a client will remain
> connected nor the way it will `work'.

However, most servers, as a practical matter, will close a connection
after some period of idleness. 

My in-house server has only "trusted" users (my co-workers) so the
timeout is set at 1 hour. My ISP's server boots me off much more
quickly. 

-- 
Bert Hyman | St. Paul, MN | bert@visi.com
Re: Simple NNTP question on connect/disconnect
#63617
Author: Przemysław Maciuszko
Date: Fri, 24 Jan 2003 20:27
17 lines
2042 bytes
Tim Mavers <webview@hotmail.com> wrote:

> While obviously there is more overhead in this approach on the client
> site (and it takes a little longer), is this something that is
> accepted, or is frowned upon?  Personally, I hate having open
> connections just sitting there doing nothing.

Yep. Especially with some broken news readers doing connection atempt with
every 'article', 'group' or other. And connecting/disconnecting thousands of
times per day. Users sometimes simply don't care (or don't understand) about
system resources. They think - "oh yeah - i'll put 8 threads online - it'll
give me 5% better transfer rates than 2 threads" *sigh*


-- 
Przemys�aw Maciuszko
Re: Simple NNTP question on connect/disconnect
#63678
Author: David Ball
Date: Tue, 28 Jan 2003 13:38
44 lines
2300 bytes
On 24 Jan 2003 09:21:05 -0800, webview@hotmail.com (Tim Mavers)
wrote:

>That said, is it acceptable to connect/disconnect when communicating
>with the nntp server?
>
>For example:
>
>GetNewsgroupList
>----------------
>Connect
>GetGroups
>Disconnect
>
>GetArticleList
>---------------
>Connect
>GetGroupList
>Disconnect
>
>While obviously there is more overhead in this approach on the client
>site (and it takes a little longer), is this something that is
>accepted, or is frowned upon?  Personally, I hate having open
>connections just sitting there doing nothing.


I've seen one NSP (airnews) which limits the number of connections
you can make to the server per hour. This type of approach would go
through that rapidly.

http://www.airnews.net/airnews4.html#dt2

Airnews Classic has the following restrictions on connections

           You are allowed up to two simultaneous
           connections, and both must come from the same IP address.

           You may connect to the servers up to 30 times total 
           per hour. 


-- David

Re: Simple NNTP question on connect/disconnect
#63682
Author: J.B. Moreno
Date: Tue, 28 Jan 2003 17:42
14 lines
1537 bytes
In article <5bea1a50.0301240921.50017c6f@posting.google.com>, 
 Tim Mavers <webview@hotmail.com> wrote:

> NNTP seems to be a disconnected protocol (well at least somewhat). 
> For example, someone could be reading a message on a server for many
> minutes and if they are connected (socket wise), it's a waste of
> resources).

As long as it's going to be used before it times out, it's a better use
of /server/ resources to keep the connection open and reuse it at need.

-- 
J.B. Moreno
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads