History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRA-9160
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Igor Sereda
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JIRA

Add paging to RSS/XML view

Created: 26/Jan/06 06:23 AM   Updated: 22/Jan/08 04:08 PM
Component/s: Issue navigator
Affects Version/s: None
Fix Version/s: 3.7

Time Tracking:
Not Specified

Environment: Standalone, JDK 1.5.0, Windows XP
Issue Links:
Reference
 

Participants: Brad, Dylan Etkin [Atlassian], Igor Sereda and Scott Farquhar [Atlassian]
Since last comment: 25 weeks, 4 days ago
Resolution Date: 01/Feb/07 09:32 PM
Labels:


 Description  « Hide
RSS view for bugs collection currently lists N ("tempMax") bugs in no obvious order. While there is a way to set the N (http://jira.atlassian.com/browse/JRA-8214), it seems impossible to specify "start" issue, in the same way it is done in the issue navigator.

The reason I ask for this is that I need to download a large set of issues. One thing I can do is to set N high enough and then pray that Jira won't crash or throw OutOfMemory () – and there would be enough time for a prayer, because I'll be waiting at this side of the wire for quite a long time before first bytes come.

What I would rather do, is the set N to a fixed number, say, 100, and fire requests at the server with "start=0", "start=100", "start=200", etc. – in essense, paging through the result set. The response for each step is likely to come quicker and not to harm the Jira instance. (There could be problems with concurrent paging and modifications though...)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Scott Farquhar [Atlassian] - 09/Jun/06 07:17 PM
Igor,

If JIRA could give you the whole XML without memory problems, would that solve your issue? I'm working on rewriting the way that we do XML views to be much more efficient.

Scott


Igor Sereda - 10/Jun/06 04:13 AM
Scott,

Thanks - it would be great if JIRA's XML interfaces get development effort. We have currently developed a more-or-less effective way to download issues from JIRA using whatever means available (you can take a look at http://almworks.com/jiraclient ). But we still miss the functionality described in this issue.

Regarding your suggestion about the whole XML. We do care about the efficiency of download (total time spent, memory consumed on server, network traffic consumed). But even more we care about the "interactivity", as observed by the user of our application. That means we need to a) start getting issues fast; b) estimate total issues to be downloaded and measure progress; c) be able to cancel the download without extra cost.

Paging is a nice and somewhat reliable way to achieve these goals. By paging here I mean any way to download large amount of issues with a series of requests, each getting a fixed-size chunk.

Getting the whole XML in one request may also work, but it is less flexible and less reliable. For example, suppose that I'm downloading 10000 issues and while 9999'th issue is being transferred the connection is broken. I will then have to waste time and bandwidth to download 9998 issues before I get those two issues that have been left. Also, receiving a large XML from the network will require the usage of SAX parser without constructing the Document (which is fine, but will require more development effort).

I guess the best thing to do is to make it possible to get the XML with all bugs while preserving and enhancing the ability to do paging.
Please note also that we need to specify query conditions to download a subset of issues, as we do now with IssueNavigator and view=rss.

If I may also add, please please include more information in the XML or make it possible to request a more full XML. We currently miss all attachment data (without content, of course), subtask/supertask relationship, work log, change history, available workflow actions. Maybe installed JIRA plug-ins would like to add their content to the XML.

Sorry for being overly wordy This topic is crucial for us.

Cheers,
Igor


Scott Farquhar [Atlassian] - 04/Jul/06 08:16 AM
Igor,

I have added 'parent', attachments and subtasks. It should also be much simpler for you to create your own XML view if you wish.

I haven't added paging, but I have tested with very large datasets, and there is no out of memory. I will also enable gzip compression, so that we minimise the amount of data that travels across the network.

Will that work for you? Paging doesn't really work too well at a code level, so I would be interested to know if this solution will work for you.


Scott Farquhar [Atlassian] - 04/Jul/06 08:22 AM
I also took a look at the JIRA client - looks very cool!

You will be able to create plugins which produce 'content' for search requests or single issues. You can then create a 'view' that exactly matches what you need for your client. Here is the API (as it stands - this may change!)

public interface SearchRequestView
{
    public void init(SearchRequestViewModuleDescriptor moduleDescriptor);

    public void writeSearchResults(SearchRequest searchRequest, Writer writer);

    public void writeHeaders(SearchRequest searchRequest, RequestHeaders requestHeaders);
}

Cheers,
Scott


Igor Sereda - 14/Jul/06 03:53 AM
Scott,

Thanks, it's great that we'll have more information in RSS xml. (Starting from version 3.7, I guess?)

Regarding paging - probably this solution will work for us. I will check how fast do we start to get a reply from server if we ask for tens of thousands of issues. As I noted above, we need to have low latency replies from server to be interactive. For some time, we'll stick with our current implementation of paging via "updated" field to support older versions of JIRA, but in the future we will switch to non-paged requests if server performance allows.

By the way, why paging doesn't work well at a code level? Doesn't Issue Navigator implement paging? It might be something similar in case of rss.

Thanks also for the API - we probably write a plug-in someday, but currently we try to work with JIRA and with Bugzilla without any changes on the server side.

Regards,
Igor


Scott Farquhar [Atlassian] - 15/Jul/06 07:40 AM
Igor,

The response starts almost immediately, independently of how many issues you have. From my calculations, the RSS view is almost 2 times as fast (overall), with more content. YMMV.

There is no code-level problem with implementing paging, but it is more code that most of our customers would not be using.

I'll see what I can do in terms of a beta for you to test.

Cheers,
Scott


Dylan Etkin [Atlassian] - 01/Feb/07 09:32 PM
This has been added in JIRA 3.7 with the rewrite of the search request views (RSS/XML included). There is now a parameter, pager/start which will be used as the start index into the filter results, tempMax still has the same semantics.

Brad - 22/Jan/08 04:08 PM
The pager/start is a great help, thank you. Is this documented anywhere? I'm just thinking it would be helpful to others if they knew of all the optional parameters available.

Thanks.
-Brad