[JAVA-182] Portable cursor Created: 09/Oct/10  Updated: 08/Feb/17  Resolved: 07/Feb/17

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: 2.2
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Allow (notimeout) cursor to be used outside of the initial jvm.

This means we need a way to create a DBCursor from a cursorId (plus other options like start/getnum), disable automatic cleanup (killing) of the cursorId (on finalize) and expose the cursor in a portable (serialized as a string?) way. Maybe it would be best to create a CursorBookmark object to encapsulate the information and so that a DBCursor can be constructed from it.

In some applications it may be more useful to do this rather than to construct a new query based on the current query parameters (copy + skip). The CursorBookmark could work in two ways potentially; one as a copy of the query (plus skip/position) or as a reference to the cursorId as described above. For this issue I will just address the second (cursorId) case.



 Comments   
Comment by Lorenzo Bolla [ 08/Feb/17 ]

+1 for this ticket to be re-opened and feature implemented.
(I don't seem to be able to vote: maybe because the ticket is closed?)

Comment by Jeffrey Yemin [ 07/Feb/17 ]

Yes, I closed it due to lack of demand. We can consider re-opening if it gets more votes, but if we do it it would end up first as a drivers specification that we would implement in all of our drivers, not just the Java driver.

Comment by Jason R. Coombs [ 07/Feb/17 ]

This feature would still be very useful to us. Was it closed because it doesn't have enough demand? Or is it perhaps inaccurately filed in the Java driver whereas a server feature would need to exist first? Would it make sense to re-open this request as a server ticket?

Comment by Jason R. Coombs [ 17/Dec/15 ]

I feel like I've filed this before, but I can't find it anywhere.

We have queries that are long running and might take hours to complete, and sometimes during that time, there's a need to restart the application that's handling that query, or there's a connection issue that causes the connection (and the bound cursor) to be lost. We seek to create a cursor that's resilient to connection loss and that can be resumed by the same process or a different process.

Critical to this would be that the cursor would persist on the server, with minimal state needed to locate and resume the cursor from the client.

Comment by Jeffrey Yemin [ 17/Dec/15 ]

Hi Jason,

Can you provide some more specific details on your use case(s) for a portable cursor. It's not clear to me whether we'd need the server to do anything or whether this is a pure client issue.

Comment by Jason R. Coombs [ 17/Dec/15 ]

Should this ticket be migrated to a SERVER ticket or should a separate, linked SERVER ticket be created to capture the more general need for a portable cursor or cursor-bookmark?

Comment by Jason R. Coombs [ 05/Mar/13 ]

This feature would be particularly nice for our long-running downloads. We would like to be able to serve the data in chunks without needing any single service to persist for the entire operation.

Comment by Scott Hernandez (Inactive) [ 22/Dec/10 ]

It would nice to have bookmark-able cursors as well; this is probably a different feature that might not require an open cursor on the server.

Maybe something like this (http://blog.notdot.net/2010/02/New-features-in-1-3-1-prerelease-Cursors) from app-engine.

It would cool if the format of the cursor-bookmark was portable across drivers as well.

Generated at Thu Feb 08 08:51:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.