AzureWebHookStore.QueryWebHooksAcrossAllUsersAsync downloads entire table into memory
See original GitHub issueFrom reading the code it seems this library downloads the entire content of the Azure Table to memory in order to query existing web hooks for ones which match specific actions. Is that correct?
var query = new TableQuery();
var entities = await _manager.ExecuteQueryAsync(table, query);
Has this been tested at scale i.e. is this used by any service with 1000+ active web hooks? As the table content grows, downloading and deserializing the entire table in memory can get pretty slow and eat up a lot of memory. There are also $ costs associated with table operations and network bandwidth at scale. Has that factor been taken into consideration?
Thanks, just trying to understand.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Issues · aspnet/AspNetWebHooks
NET 4.x (Due to other priorities this project is currently in maintenance mode ... QueryWebHooksAcrossAllUsersAsync downloads entire table into memory bug ...
Read more >How to pull a SQL Server table into memory in order to run ...
I expect the fastest way to do this will be to generate a single query that returns results, in order, for the entire...
Read more >Why is Entity Framework's AsEnumerable() downloading ...
The short answer: The reason for the different behaviors is that, when you use IQueryable directly, a single SQL query can be formed...
Read more >Memory optimization for faster temp table and table variables
A memory -optimized table variable: Is stored only in memory, and has no component on disk. Involves no IO activity. Involves no tempdb ......
Read more >Memory-Optimized Tables support in SQL Server EF Core ...
Memory -Optimized Tables are a feature of SQL Server where the entire table resides in memory. A second copy of the table data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For your scenario, I’d recommend subclassing
AzureWebHookStore
and changing the application to use your subclass.It’s not going to grow that slowly if you introduce this feature in an existing SaaS product with existing customers who have been asking for it, which is what I’m trying to do 😃. Imagine if an existing Microsoft product adopts this library. The first thing they’d do is change the schema of this storage provider.
The rate of growth isn’t really a relevant point unless you guys designed this library only for devs who are prototyping or building MVPs. If I know I’ll have 1000+ active webhooks it doesn’t make me feel better that I’ll hit that number in say 12 months vs. 3 months. Adopting new schema with scalability issues means you’re signing up for a major schema change at some point in the future. It’s preferable to do it right from the start (unless, of course, you are building a prototype/MVP).