(.Net) Easy way to use Memory Mapped Files. Just like a variableIs there a way to check if a file is in use?Easiest way to split a string on newlines in .NET?C+C# Interprocess Communication: Named Pipes, Memory Mapped Files or other?Memory-mapped files: IOException on CreateViewAccessor for large dataWIn64 memory mapped files and locking pagesIs it possible to avoiding copies of data when using memory mapped files in C#?Socket I/O directly into a .NET memory mapped file?Using memory mapped files for in program temporary arrays?MemoryMappedFile for IPC - How to decide how much space to allocate?Under what circumstances will .NET processes and AppDomains share loaded assemblies in memory?
Python program for fibonacci sequence using a recursive function
How can I properly write this equation in Latex?
What were the Ethiopians doing in Xerxes' army?
The Maltese Falcon
Surprisingly persistent local variable
The disk image is 497GB smaller than the target device
Why would a rational buyer offer to buy with no conditions precedent?
Freedom of Speech and Assembly in China
Can we assume that a hash function with high collision resistance also means highly uniform distribution?
How to melt snow without fire or using body heat?
Where is Jon going?
Filter YAML file content using sed/awk
Why is this integration method not valid?
USPS Back Room - Trespassing?
Gravitational Force Between Numbers
Why A=2 and B=1 in the call signs for Spirit and Opportunity?
One word for 'the thing that attracts me'?
3 prong range outlet
Are there any German nonsense poems (Jabberwocky)?
Is it legal to have an abortion in another state or abroad?
Cardio work for Muay Thai fighters
How did NASA Langley end up with the first 737?
Why did Jon Snow do this immoral act if he is so honorable?
Why does the hash of infinity have the digits of π?
(.Net) Easy way to use Memory Mapped Files. Just like a variable
Is there a way to check if a file is in use?Easiest way to split a string on newlines in .NET?C+C# Interprocess Communication: Named Pipes, Memory Mapped Files or other?Memory-mapped files: IOException on CreateViewAccessor for large dataWIn64 memory mapped files and locking pagesIs it possible to avoiding copies of data when using memory mapped files in C#?Socket I/O directly into a .NET memory mapped file?Using memory mapped files for in program temporary arrays?MemoryMappedFile for IPC - How to decide how much space to allocate?Under what circumstances will .NET processes and AppDomains share loaded assemblies in memory?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm developing an ASP.NET web application. It needs a lot of RAM. Therefore, I'm thinking of memory mapped files.
But, implementing memory mapped files is very exhausting. It needs to use those memory addresses, SizeOf operators and etc.. (I'm running out of time).
The current system is using a big dictionary to store those big amounts of data. All the classes are [Serializable]. Is there a way to wrap up access to memory mapped files like this,
(C# Psedo-code)
var WrittingObject = new blablabla;
SetMMFVariable(name: "var1", value : WrittingObject);
var ReadingObject = GetMMFVariable(name: "var1");
Is there any wrapping codes for memory mapped files in .NET? where I don't have to worry about those memory addresses and other stuff.
c# asp.net memory-management shared-memory memory-mapped-files
add a comment |
I'm developing an ASP.NET web application. It needs a lot of RAM. Therefore, I'm thinking of memory mapped files.
But, implementing memory mapped files is very exhausting. It needs to use those memory addresses, SizeOf operators and etc.. (I'm running out of time).
The current system is using a big dictionary to store those big amounts of data. All the classes are [Serializable]. Is there a way to wrap up access to memory mapped files like this,
(C# Psedo-code)
var WrittingObject = new blablabla;
SetMMFVariable(name: "var1", value : WrittingObject);
var ReadingObject = GetMMFVariable(name: "var1");
Is there any wrapping codes for memory mapped files in .NET? where I don't have to worry about those memory addresses and other stuff.
c# asp.net memory-management shared-memory memory-mapped-files
add a comment |
I'm developing an ASP.NET web application. It needs a lot of RAM. Therefore, I'm thinking of memory mapped files.
But, implementing memory mapped files is very exhausting. It needs to use those memory addresses, SizeOf operators and etc.. (I'm running out of time).
The current system is using a big dictionary to store those big amounts of data. All the classes are [Serializable]. Is there a way to wrap up access to memory mapped files like this,
(C# Psedo-code)
var WrittingObject = new blablabla;
SetMMFVariable(name: "var1", value : WrittingObject);
var ReadingObject = GetMMFVariable(name: "var1");
Is there any wrapping codes for memory mapped files in .NET? where I don't have to worry about those memory addresses and other stuff.
c# asp.net memory-management shared-memory memory-mapped-files
I'm developing an ASP.NET web application. It needs a lot of RAM. Therefore, I'm thinking of memory mapped files.
But, implementing memory mapped files is very exhausting. It needs to use those memory addresses, SizeOf operators and etc.. (I'm running out of time).
The current system is using a big dictionary to store those big amounts of data. All the classes are [Serializable]. Is there a way to wrap up access to memory mapped files like this,
(C# Psedo-code)
var WrittingObject = new blablabla;
SetMMFVariable(name: "var1", value : WrittingObject);
var ReadingObject = GetMMFVariable(name: "var1");
Is there any wrapping codes for memory mapped files in .NET? where I don't have to worry about those memory addresses and other stuff.
c# asp.net memory-management shared-memory memory-mapped-files
c# asp.net memory-management shared-memory memory-mapped-files
asked Mar 23 at 22:43
Hasindu LankaHasindu Lanka
85
85
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This would be a great candidate for a database! The problem you have is serializing/deserializing large amounts of information at once. If you need to read or update a small piece of information then you need to scan the entire file to update a SINGLE record. This is crazy expensive!
The workaround is to have some structured data model. You can either distribute the model read/writes to use many small files on the OS (subject to corruption, DISK issues, permission issues, multiple access & file locks) to get around the above serialization issue or you can go to an actual database that will allow you to query & update/insert the information you need.
For a structured model (c# is good at this) look at Sql Server Express
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-2017
For unstructured information (json) look at something non-relational like couchbase
https://docs.couchbase.com/dotnet-sdk/2.7/start-using-sdk.html
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55319071%2fnet-easy-way-to-use-memory-mapped-files-just-like-a-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This would be a great candidate for a database! The problem you have is serializing/deserializing large amounts of information at once. If you need to read or update a small piece of information then you need to scan the entire file to update a SINGLE record. This is crazy expensive!
The workaround is to have some structured data model. You can either distribute the model read/writes to use many small files on the OS (subject to corruption, DISK issues, permission issues, multiple access & file locks) to get around the above serialization issue or you can go to an actual database that will allow you to query & update/insert the information you need.
For a structured model (c# is good at this) look at Sql Server Express
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-2017
For unstructured information (json) look at something non-relational like couchbase
https://docs.couchbase.com/dotnet-sdk/2.7/start-using-sdk.html
add a comment |
This would be a great candidate for a database! The problem you have is serializing/deserializing large amounts of information at once. If you need to read or update a small piece of information then you need to scan the entire file to update a SINGLE record. This is crazy expensive!
The workaround is to have some structured data model. You can either distribute the model read/writes to use many small files on the OS (subject to corruption, DISK issues, permission issues, multiple access & file locks) to get around the above serialization issue or you can go to an actual database that will allow you to query & update/insert the information you need.
For a structured model (c# is good at this) look at Sql Server Express
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-2017
For unstructured information (json) look at something non-relational like couchbase
https://docs.couchbase.com/dotnet-sdk/2.7/start-using-sdk.html
add a comment |
This would be a great candidate for a database! The problem you have is serializing/deserializing large amounts of information at once. If you need to read or update a small piece of information then you need to scan the entire file to update a SINGLE record. This is crazy expensive!
The workaround is to have some structured data model. You can either distribute the model read/writes to use many small files on the OS (subject to corruption, DISK issues, permission issues, multiple access & file locks) to get around the above serialization issue or you can go to an actual database that will allow you to query & update/insert the information you need.
For a structured model (c# is good at this) look at Sql Server Express
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-2017
For unstructured information (json) look at something non-relational like couchbase
https://docs.couchbase.com/dotnet-sdk/2.7/start-using-sdk.html
This would be a great candidate for a database! The problem you have is serializing/deserializing large amounts of information at once. If you need to read or update a small piece of information then you need to scan the entire file to update a SINGLE record. This is crazy expensive!
The workaround is to have some structured data model. You can either distribute the model read/writes to use many small files on the OS (subject to corruption, DISK issues, permission issues, multiple access & file locks) to get around the above serialization issue or you can go to an actual database that will allow you to query & update/insert the information you need.
For a structured model (c# is good at this) look at Sql Server Express
https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-2017
For unstructured information (json) look at something non-relational like couchbase
https://docs.couchbase.com/dotnet-sdk/2.7/start-using-sdk.html
answered Apr 26 at 22:10
Zakk DiazZakk Diaz
59849
59849
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55319071%2fnet-easy-way-to-use-memory-mapped-files-just-like-a-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown