cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1088
Views
0
Helpful
2
Replies

async methods on CUPI.net

stephan.steiner
Spotlight
Spotlight

Hi Jeff

Have you ever thought about making the methods async? Async is all the rage for .net right about now especially for network and IO operations. Given that you have centralized all networking code in RestTransportFunctions, it should be relatively simple to add async style request/response handling - it's only adding a second (async) method for every call that is time consuming.

I've added async processing to my trusted AXL lib but I have certain operations that deal with both AXL and CUPI and it would be ideal to be able to run both async.. start a list of tasks, await their completion, then go on. In order to have parallel processing of data extraction, I'll run the CUPI operations in their own tasks, but it's not really best practice.

Cheers

Stephan

2 Replies 2

jocreed
Cisco Employee
Cisco Employee

well I guess since you are directing this at Jeff L.  I will leave him to answer it, lol.  Let me know if you need anything from me on this.

I tried the implementation.. it's really not just two clicks away, you need to do away with all the out parameters as they are not supported in an async scenario. As I'm nearing go-live, I haven't managed to build a working prototype - but for a flexible, parallelized provisioning system, async should be in the cards. Right now I'm just using Task.Run to run my various unity connection tasks (to show templates in the GUI I need to extract multiple data sets and that's best done concurrently so I'm firing off one task for every data set I'm loading).

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: