Is Client side Batching supported in Azure.Messaging.ServiceBus? - azure

Is Batching supported in Azure.Messaging.ServiceBus ? As in one of the microsoft doc links says it is not but i see lot of online examples ?
This microsoft docs link says it is not supported
https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-performance-improvements?tabs=net-standard-sdk-2
While this microsoft docs link has examples of Batching
https://learn.microsoft.com/en-us/dotnet/api/overview/azure/messaging.servicebus-readme-pre#send-and-receive-a-batch-of-messages

There is a difference between implict and explicit batching. When using the SDK to send a batch that you constructed you are explicitly creating a batch message. That is supported.
Implicit batching means you can send individual messages using the SKD and the SDK will create a batch automatically when you send multiple individual messages in a given timeframe. This is done without you having to create a batch yourself. This is only supported on the legacy SDK.

Related

Is there a way to get Events and report search from Deep security python SDK?

We are creating python script that can fetch Deep security anti-malware event details and create CSV file with the following field.
1) Computer name
2) last scheduled scan time
3) Number of malware found
4) Pattern version
5) last pattern update date and time
I am not able to find SDK document that can help me get events generated in last scheduled scan.
The API provides access to Computer name, last scheduled scan time, and pattern version. It does not provide access to events, however the legacy REST api does:
https://automation.deepsecurity.trendmicro.com/article/12_5/use-the-previous-rest-api
https://automation.deepsecurity.trendmicro.com/legacy-rest/12_5/index.html?env=dsaas#overview
There is only a Java SDK that is supported, but as you probably know you can use Python to make HTTP requests to a REST API.
An old Python SDK was provided for the legacy REST and SOAP API's (not supported past Deep Security 10.3) -- it might be worth trying although there is no official support and no guarantee of results: https://github.com/deep-security/deep-security-py
Finally, I'm not sure if this is covers what you need but there is a powershell script that uses the legacy REST API to retrieve computer-related events for a specific time frame: https://github.com/deep-security/ops-tools/blob/master/deepsecurity/manager-apis/powershell/get-computerCreatedEvents.ps1
Hope that helps. Maybe somebody else can add to what I know of.
-- Scott (Deep Security content developer)

How to listen to DB changes in Azure Cosmos DB from Node App

Azure CosmosDB provides changed feed feature.
One can listen to DB changes and run business logic in response.
Is there a way this can be achieved in a Node App?
There is a change feed processor library, but I didn't come across any node SDK to use it.
If any one can provide few pointers how this can be achieved it will be great.
There is currently no equivalent of the Change Feed processor library for Node.
However the Node.js SDK allows you to query the change feed itself manually. You can find an example here: https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed#can-i-read-change-feed-using-javascript
This however means that you will have to write the automated process yourself and you can't be notified only when there is a change. You will have to keep previous and next states and compare what's new and what's not.
You can also achieve automated change feed processing using the Azure Functions trigger which can be used in Node.js (thanks Matias). You can find more info on that here: https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed#using-azure-functions
Also this link has a CosmosDB binding example in js (double thanks Matias): https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb#trigger---javascript-example

Azure Notification Hubs APIs - Benfits of DirectSend/DirectBatchSend vs. Registration/Notification/Tags styles

We're planning on implementing a server-side notification mechanism that pushes out to iOS and Android via ANH. We will have no code footprint on our mobile clients, short of a call to our server API for "registration". In this way our approach is looking similar to this MSDN discussion.
I also see the alternate, more bare-bones, approach noted on MSDN.
Is it fair to conclude that the two approaches will have similar performance on the 'send' side?
It appears the main difference is this:
The former approach has already done the work of integrating with the Task and Async mechanism, presenting a callable C# mechanism that has taken on more of the RESTful API layer,
The DirectBatch/Send API is just that -- the raw RESTful API for you to use as you see fit.
For operations that are available as both REST API and SDK, you shouldn't see any significant difference in performance on the client side because the SDK is just a wrapper around the REST APIs. There are SDKs for both iOS and Android and it's recommended to use those so that you don't have to re-write the wrapper.
Direct Send is only available in .NET SDK at the moment and for other platforms as REST API, so you'd have to implement your own wrapper in case you're using something other than .NET for the operation. You can use the sample to help you in the process.
In terms of performance it depends on what you mean by that.
Direct send will most likely be delivered to customers a bit faster because ANH service doesn't have to do any registrations in the process, it just delivers notifications with your parameters. But it has it's limitations in terms of number of handles you can provide and also you need to manage handles yourself.
If you only mean performance on the client side, then there should be no difference as all calls are asynchronous. And if you take advantage of tags, then you can do really tricky sends in one server call and let ANH figure out the details behind it.
But without knowing your scenario and requirements there's no way to give a proper recommendation.

Mongooplog alternative

As we all know that mongooplog tool is going to be removed in upcoming releases. I needed help about some the following issue:
I was planning to create a listener using mongooplog which will read any kind of activity on mongodb and will generate a trigger according to activity which will hit another server. Now, since mongooplog is going out, can anyone suggest what alternative can I use in this case and how to use it.
I got this warning when trying to use mongooplog. Please let me know if you any further questions.
warning: mongooplog is deprecated, and will be removed completely in a future release
PS: I am using node.js framework to implement the listener. I have not written any code yet so have no code to share.
The deprecation message you are quoting only refers to the mongooplog command-line tool, not the general approach of tailing the oplog. The mongooplog tool can be used for some types of data migrations, but isn't the right approach for a general purpose listener or to wrap in your Node.js application.
You should continue to create a tailable cursor to follow oplog activity. Tailable cursors are supported directly by the MongoDB drivers. For an example using Node.js see: The MongoDB Oplog & Node.js.
You may also want to watch/upvote SERVER-13932: Change Notification Stream API in the MongoDB issue tracker, which is a feature suggestion for a formal API (rather than relying on the internal oplog format used by replication).

good azure storage client library?

Is there one? (for .net)
I see msft samples StorageDotNEt and StorageRest. These dont do if-match right and they dont appear to do paged queries
Lokad has a library but does funky stuff to spread data over columns
Have you seen the one that is supported and ships with the SDK? Microsoft.WindowsAzure.StorageClient.dll? This supports blob, table, and queues. Check the Windows Azure Training Kit for basic manuevers with it.
At a low level I also used the http://azurekit.codeplex.com/ library - not a finished beast but is a more direct mapping of C# to REST - if that's what you need.

Resources