solarwinds / OrionSDK

SDK for the SolarWinds Orion platform, including tools, documentation, and samples in PowerShell, C#, Go, Perl, and Java.
https://thwack.com/OrionSDK
Apache License 2.0
397 stars 139 forks source link

Async functionality #287

Open ashleyoldershaw opened 3 years ago

ashleyoldershaw commented 3 years ago

Hi all,

More of a question than an issue, mainly wondering how it could be possible to make this work asynchronously in Python. Might be a good use case for when we're updating large numbers of nodes/pollers etc. I mainly work with the requests library so haven't used the library mentioned here: https://github.com/solarwinds/orionsdk-python/blob/97168451ddbc68db1773717f592a42f78be0eefe/orionsdk/swisclient.py#L55

Has anyone else mentioned this idea? I couldn't find anything about it when I was looking but it seems useful.

danjagnow commented 3 years ago

I haven't tried this, but it looks like you could use the requests-futures to accomplish this. Just be careful to throttle your requests to avoid accidentally performing a denial-of-service (DoS) attack on your Orion server. You may need to adopt a rate limiting algorithm.