7 Replies Latest reply on Oct 27, 2003 5:11 AM by julien1

    NNTP Access

    raja05

      Would anyone be interested in implementing NNTP Access for the forums(if its not done already).
      I dont have a lot of information about doing NNTP for forums but i am reading the RFC1036 - Which is the NNTP Protocol document.
      http://www.mibsoftware.com/userkt/rfc1036/index.html
      Is this the right approach?If we have all these messages formatted according to RFC1036 and we have a NNTP Server, would that be enough to render the forums using NNTP?

      Let me know if im way off base.

      TIA
      Raj

        • 1. Re: NNTP Access
          raja05

          Looks like James(http://james.apache.org) has a NNTPServer as well as an API to create NNTP Articles . They dont have all the Features specified in the Spec. but i guess it would be a good point to start.

          Anyone got any other implementations?

          -Raj

          • 2. Re: NNTP Access

            that would be a good thing. BTW, I've just checked in the forum code tonight. You can look at jakarat commons.net which has an NNTP Client protocol handler. So it is possible to fetch messages from a newsgroup.

            I don't know if james is able to be a newsgroup provider.

            julien

            • 3. Re: NNTP Access
              raja05

              Julien,
              James provides a NNTP server and we can register a few newsgroups to it. Can you tell me if my approach is correct?
              1) James is started and it creates a NNTP server on port 119
              2) we need a mechanism to create Articles out of the messages that are posted in the newsgroups.
              There has to be a interceptor before the messages are stored in the database?

              3) Any news reader should be able to read these messages.

              Is this approach correct? where would commons-net come into play? Im new to this, so let me know if im wrong.

              Thanks
              Raj

              • 4. Re: NNTP Access

                > Julien,
                > James provides a NNTP server and we can register a
                > few newsgroups to it. Can you tell me if my approach
                > is correct?
                > 1) James is started and it creates a NNTP server on
                > port 119
                > 2) we need a mechanism to create Articles out of the
                > messages that are posted in the newsgroups.

                The forum is designed that way, each action on the forum is a command and there is an interceptor chain that see the command go back and forth. It allows an easier implementation of the search engine update and the email notifications. It could be easy to write an interceptor that would feed a newsgroup maybe.

                In that case you have to intercept two commands :

                org.jboss.nukes.addons.modules.bb.commands.NewTopicCommand and org.jboss.nukes.addons.modules.bb.commands.ReplyTopicCommand

                the interceptor package is org.jboss.nukes.addons.modules.bb.interceptors

                > There has to be a interceptor before the messages are
                > stored in the database?
                >
                > 3) Any news reader should be able to read these
                > messages.

                I am not very familiar with NNTP, so you can try it.

                >
                > Is this approach correct? where would commons-net
                > come into play? Im new to this, so let me know if im
                > wrong.
                >

                my idea was the other way. There are two way to collaborate with news group :

                #1 the way you say : serving newsgroup, that's a good thing.

                #2 the converse way : being a client of a newsgroup and poll a newsgroup to insert messages from that newsgroup in a forum (like it is done is the actual jive (juha's playground)

                for #1 you will have to implement a newsgroup server according to the protocol (and thus redo what james is doing). I don't know if it is easy to do or not. I hope you are going to do that, it would bring a lot to the forum.

                > Thanks
                > Raj

                • 5. Re: NNTP Access
                  raja05

                  the interceptor approach should be perfect to insert hooks to write to the newsgroup.
                  My initial thought is to use James for the server (as it provides most of the spec). Right now, Im trying to create a test newsgroups(com.test.mynewsgroup) and then write a message into it.
                  I then configured Outlook express to listen to nntp://locahost:119 and then retrieve the messages that i sent to com.test.mynewsgroup.

                  If this works, we can create newsgroups for each of the forums here(for e.g. org.jboss.EJB, org.jboss.JMX) and the interceptor would write to the groups for every message posted into these groups and we can use Outlook express/Mozilla/whatever to read messages.

                  You think this would work?

                  • 6. Re: NNTP Access
                    raja05

                    Just an update on my earlier post, i was able to send a message to a created newsgroup and also locate the message within Outlook Express.
                    I can use this approach and create a NNTP for the forums using the new code that you checked in.
                    If this approach is okay with you, let me know and i can start off.
                    We might need to create a different implementation than James as James stores all the messages under a single folder. For e.g. all messages for com.test.mytest is stored in a folder called com.test.mytest. If the number of messages keeps growing(and with the popularity of JBoss, it sure will!!), storing 50000 msgs under a folder will be a bad decision atleast under Windows. For the pilot phase, i can use James and i will look at other ways of implementing it.

                    -Raj

                    • 7. Re: NNTP Access

                      > Just an update on my earlier post, i was able to send
                      > a message to a created newsgroup and also locate the
                      > message within Outlook Express.

                      this is a good beginning

                      > I can use this approach and create a NNTP for the
                      > forums using the new code that you checked in.
                      > If this approach is okay with you, let me know and i
                      > can start off.

                      go

                      > We might need to create a different implementation
                      > than James as James stores all the messages under a
                      > single folder. For e.g. all messages for
                      > com.test.mytest is stored in a folder called
                      > com.test.mytest. If the number of messages keeps
                      > growing(and with the popularity of JBoss, it sure
                      > will!!), storing 50000 msgs under a folder will be a
                      > bad decision atleast under Windows. For the pilot
                      > phase, i can use James and i will look at other ways
                      > of implementing it.

                      yes I want to be independant of James. You will write an NNTP module later. You can use EJBs for the storage, it will work fine.
                      For the moment I have 70000 messages in my test forum.

                      julien