P
Priya Bange
Guest
Hi Experts,
Am new to C#, am trying to currently achieve the following requirement.
Requirement
I will be using Topshelf as I got recommendation from a previously posted query on this forum to run as a windows service. Now inside the windows service, I will be querying a table in SQL Server after a delay of 30 second's. Now here where am a bit stuck.
Processing Cycle
1. Execute every 30 second.
2. Load the data from SQL Server in some memory resident object.
3. Keep the data available for other C# classes to be referred till the time result read from table changes.
For example on 1st run the table had 5 records, load into some memory table in C# available to other classes & only perform changes on the data contained in it if the result vary read from SQL Server vs stored inside memory.
Let say on next run after 30 second , the records returned are 6. So just insert the changed record into the memory table in C# windows service initialised on the first run.
or let say on next run if the records reduced from 5 to 4 in SQL Server. So remove only the record that's not available from the C# memory table.
Am just trying to figure out to persist data in memory table & perform comparison to increase/decrease records from it based on every next run to read data from SQL Server.
The memory table data I will be using to push to some NO-SQL data stores for that I will try first before requesting for support
Thanks
Priya
Continue reading...
Am new to C#, am trying to currently achieve the following requirement.
Requirement
I will be using Topshelf as I got recommendation from a previously posted query on this forum to run as a windows service. Now inside the windows service, I will be querying a table in SQL Server after a delay of 30 second's. Now here where am a bit stuck.
Processing Cycle
1. Execute every 30 second.
2. Load the data from SQL Server in some memory resident object.
3. Keep the data available for other C# classes to be referred till the time result read from table changes.
For example on 1st run the table had 5 records, load into some memory table in C# available to other classes & only perform changes on the data contained in it if the result vary read from SQL Server vs stored inside memory.
Let say on next run after 30 second , the records returned are 6. So just insert the changed record into the memory table in C# windows service initialised on the first run.
or let say on next run if the records reduced from 5 to 4 in SQL Server. So remove only the record that's not available from the C# memory table.
Am just trying to figure out to persist data in memory table & perform comparison to increase/decrease records from it based on every next run to read data from SQL Server.
The memory table data I will be using to push to some NO-SQL data stores for that I will try first before requesting for support
Thanks
Priya
Continue reading...