Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 68767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:28:05+00:00 2026-05-10T19:28:05+00:00

I am working on an implementation for RSS feeds for a collaboration platform. Say

  • 0

I am working on an implementation for RSS feeds for a collaboration platform. Say there are several thousands of different collaboration rooms where users can share information, and each needs to publish an RSS feed with news, changes, etc…

Using a plain servlet (i.e. http://www.site.com/RSSServlet/?id=roomID) is costly, every time an RSS client is calling the servlet (and this will happen say every 10 minutes for each user registered to an RSS feed on one of the thousand of rooms) this will trigger the entire servlet lifecycle, which is costly.

On the other hand, keeping a static XML file on the disk for each of the thousands of rooms is costly as well, in terms of hard disk space as well as IO operations…

One more limitation – using already existing frameworks might not be an option…

So, how would you implement RSS feeds in a Java envoronment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:28:05+00:00Added an answer on May 10, 2026 at 7:28 pm

    You say that a new http request to your servlet ‘will trigger the entire servlet lifecycle’, which as Alexander has already pointed out, isn’t exactly true. It will simply trigger another method call to your doGet() or doPost() methods.

    I think what you mean to say is that if you have a doGet/doPost method which contains code to build the data needed for the RSS feed from scratch, then each request triggers this fetching of data over and over again.

    If this is your concern, and you are ruling static content out, simply modify your Servlet doGet/doPost method to cache the RSS content that you would otherwise return, so that handling each request does not mean re-fetching all of the data all over again.

    For example

    public void doGet(HttpServletRequest request, HttpServletResponse response) {     //build the objects you need for the RSS response     Room room = getRoom(request.getParameter('roomid'));     //loadData();     //moreMethodCalls();     out.println( createRssContent(...) ); } 

    becomes

    Map rssCache;  public void doGet(HttpServletRequest request, HttpServletResponse response) {      //Map is initialized in the init() method or somewhere else         String roomId = request.getParameter('roomid');      String rssDocument = rssCache.get(roomId);     if (rssDocument == null) {          //build the objects you need for the RSS response         Room room = getRoom(roomId);         //loadData();         //moreMethodCalls();         rssDocument = createRssContent(...);         rssCache.put(roomId, rssDocument);     }     out.println( rssDocument ); } 

    If you only want to store items in a ‘cache’ for a certain amount of time you can use one of a dozen different caching frameworks, but the idea here is that you don’t reconstruct the entire object graph necessary for your RSS response with each http request. If I am reading your original question right then I think that this is what you hoping to accomplish.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 93k
  • Answers 93k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The obvious one is that the user might have disabled… May 11, 2026 at 6:40 pm
  • Editorial Team
    Editorial Team added an answer jQuery has the contains method. Here's a snippet for you:… May 11, 2026 at 6:40 pm
  • Editorial Team
    Editorial Team added an answer Mohammed's response covers the n-Tier part of your question. The… May 11, 2026 at 6:40 pm

Related Questions

I have been looking at various dependency injection frameworks for .NET as I feel
I am working on a very large scale computing library that is using STL
I am working on a GUI (OpenG Builder). How can I merge the Save
I am working on a WPF application which has a treeview that represents an

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.