cloudbridge icon indicating copy to clipboard operation
cloudbridge copied to clipboard

Azure server-side paging

Open almahmoud opened this issue 6 years ago • 10 comments

For Azure, paging is always handled client-side now, as all pages are iterated through and resources are then wrapped for client-side paging. We could implement server-side paging for Azure: https://github.com/Azure/msrest-for-python/blob/master/msrest/paging.py possibly using the next_link property as a marker?

almahmoud avatar Aug 02 '18 18:08 almahmoud

@almahmoud Can this be closed?

nuwang avatar Feb 03 '19 12:02 nuwang

I think paging is still client-side in azure.

almahmoud avatar Feb 03 '19 19:02 almahmoud

Hello, I'm new to open source and i'm interested in solving this issue.Is this issue open. Could you please help in getting started with this project and guide me through this issue. Thanks

akshatakulkarni25 avatar Sep 04 '22 15:09 akshatakulkarni25

Hi @akshatakulkarni25, we are happy to accept contributions. Yes, this issue is still open. For starters, please go through the cloudbridge docs and once you are familiar with how paging is implemented: http://cloudbridge.cloudve.org/en/latest/topics/paging_and_iteration.html please take a look at the aws and google implementations. Then, you need to do something similar for Azure. Please comment on this issue if you have any questions.

nuwang avatar Sep 07 '22 06:09 nuwang

Hello, Thank you. I look forward to working on this issue.

Thanks & Regards, Akshata Kulkarni

On Wed, Sep 7, 2022 at 11:50 AM Nuwan Goonasekera @.***> wrote:

Hi @akshatakulkarni25 https://github.com/akshatakulkarni25, we are happy to accept contributions. Yes, this issue is still open. For starters, please go through the cloudbridge docs and once you are familiar with how paging is implemented: http://cloudbridge.cloudve.org/en/latest/topics/paging_and_iteration.html please take a look at the aws and google implementations. Then, you need to do something similar for Azure. Please comment on this issue if you have any questions.

— Reply to this email directly, view it on GitHub https://github.com/CloudVE/cloudbridge/issues/132#issuecomment-1238955934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYHIZFP5MIJ46PANTEFX42TV5AXZHANCNFSM4FNTE3CA . You are receiving this because you were mentioned.Message ID: @.***>

akshatakulkarni25 avatar Sep 08 '22 06:09 akshatakulkarni25

The function is performing serverside pagination here for keypair service. Could you help me understand if i have to write this class

akshatakulkarni25 avatar Oct 16 '22 06:10 akshatakulkarni25

The ServerPagedResultList does not need to be implemented, as the implementation is generic for all cloud providers. The core task will be to find all instances in Azure where a ClientPagedResultList is returned, and investigate whether they can be replaced with a ServerPagedResultList. These will usually be in the list() and find() methods. As you can see in the KeyPair service example, in order to return a ServerPagedResultList, the underlying azure server class should support a limit and a marker, which can then be used to construct a ServerPagedResultList. Most azure server functions support these, and they can be trivially replaced. The ClientPagedResultLists in contrast, only simulate the limit and marker, and are therefore very inefficient, as all records are fetched from the server, and paging is done in the client. Hope this clarifies the issue. Please take a look at the specific azure library methods for more details.

nuwang avatar Oct 19 '22 06:10 nuwang

What we call marker in cloudbridge is called a continuation token in Azure: https://learn.microsoft.com/en-us/answers/questions/176750/how-to-use-the-continuationtoken.html

nuwang avatar Oct 19 '22 07:10 nuwang

Thank you, i'll refer to the above resource.

akshatakulkarni25 avatar Oct 30 '22 06:10 akshatakulkarni25

I am facing few errors, please let me know if there is a slack channel or discord where i can connect regularly.

akshatakulkarni25 avatar Nov 06 '22 04:11 akshatakulkarni25