To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 1474
1473  |  1475
Subject: 
Re: GUI LUGNET streaming news client in Java (Was: Pseudo-streaming live news (was: Re: Monitor Page))
Newsgroups: 
lugnet.off-topic.geek
Date: 
Mon, 3 Apr 2000 21:01:16 GMT
Highlighted: 
(details)
Viewed: 
2360 times
  
In lugnet.off-topic.geek, Todd Lehman writes:
[...]
In addition to your cookie, here's what you wanna send via HTTP POST to
/news/rate.cgi, basically:

  RATE~newsgroup1:artnum1=rating1
  RATE~newsgroup2:artnum1=rating2
  RATE~newsgroup3:artnum1=rating3
  etc.
[...]

Oh!  Two other thing about the above...

First, don't worry about passing multiple data points for a single article --
only the last one listed is used.  The simplest thing to do for queueing up
outgoing ratings is probably just to write them out to a text file in append-
mode (flocking and fseeking to the end of course!).  Any time the user presses
a rating key, just stuff the rating onto the end of the queue without worrying
about duplicates or mind-changing.  In other words, if you send

   RATE~lugnet.foo.bar:1234=60
   RATE~lugnet.foo.bar:1234=70
   RATE~lugnet.foo.bar:1234=80
   RATE~lugnet.foo.bar:1234=70

that's OK -- all but the last are automatically ignored.

If your langauge of choice has persistent dequeues (I'm sure Java must have
this as part of the standard collection classes these days), then that's
probably much easier than appending to a file.  The consumer thread could
eat stuff off the consumer-end of the dequeue, passing it through an
associative array object to remove duplicates (if it wanted to) and then
submit these when it hit the end of the dequeue.  (It should also be careful
to put things back onto the dequeue if the submission fails due to a connect
error.)

Second, don't worry about accidentally passing two article-specification id's
for the same article when articles are crossposted.  For example

   RATE~lugnet.admin.general:5483=100
and
   RATE~lugnet.off-topic.geek:1410=100

both express an opinion about the same exact article.  Thus, it is sufficient
simply to pick any id-key from the 'Xref' header.

--Todd



Message is in Reply To:
  Re: GUI LUGNET streaming news client in Java (Was: Pseudo-streaming live news (was: Re: Monitor Page))
 
(...) Nope, that would put sensitive data into the httpd logs! Gonna hafta pass your cookie the regular way, not part of GET. In addition to your cookie, here's what you wanna send via HTTP POST to /news/rate.cgi, basically: (...) (24 years ago, 1-Apr-00, to lugnet.off-topic.geek) ! 

66 Messages in This Thread:























Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR