Hi everybody,
In my application, I'm planning to use BinaryFormatter to serialize a
potentially huge object to file (and, of course, deserialize back to
memory later). My question is if there is any hard limit on the size
of this object?
Is it only limited by the amount of memory or hard-disk space in the
server?
If there is no limit, how scalable is this serialization process?
Thanks in advance for any input to this subject
Dominic 2 3787
BinaryFormatter can take a memory stream or any type of stream. So you can
serialize
directly to disk. When you deserialize, you'll need enough memory to recreate
the object
tree that you originally serialized. Currently there isn't really any way to
figure out how much
memory your object is going to take without using the ICorProfiler interfaces.
BinaryFormatter is extremely fast. It is used for remoting and many other time
critical applications
so it will continuously be improved on for performance. However, it isn't
extremely robust. A single
touch to the file on disk can cause it to be unreadable. You can see more about
this tamper issue on
my blog: http://weblogs.asp.net/justin_rogers.../02/66508.aspx
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Dominic" <do****@hotmail.com> wrote in message
news:2b**************************@posting.google.c om... Hi everybody,
In my application, I'm planning to use BinaryFormatter to serialize a potentially huge object to file (and, of course, deserialize back to memory later). My question is if there is any hard limit on the size of this object?
Is it only limited by the amount of memory or hard-disk space in the server?
If there is no limit, how scalable is this serialization process?
Thanks in advance for any input to this subject Dominic
BinaryFormatter can take a memory stream or any type of stream. So you can
serialize
directly to disk. When you deserialize, you'll need enough memory to recreate
the object
tree that you originally serialized. Currently there isn't really any way to
figure out how much
memory your object is going to take without using the ICorProfiler interfaces.
BinaryFormatter is extremely fast. It is used for remoting and many other time
critical applications
so it will continuously be improved on for performance. However, it isn't
extremely robust. A single
touch to the file on disk can cause it to be unreadable. You can see more about
this tamper issue on
my blog: http://weblogs.asp.net/justin_rogers.../02/66508.aspx
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Dominic" <do****@hotmail.com> wrote in message
news:2b**************************@posting.google.c om... Hi everybody,
In my application, I'm planning to use BinaryFormatter to serialize a potentially huge object to file (and, of course, deserialize back to memory later). My question is if there is any hard limit on the size of this object?
Is it only limited by the amount of memory or hard-disk space in the server?
If there is no limit, how scalable is this serialization process?
Thanks in advance for any input to this subject Dominic This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: aladdinm1 |
last post by:
Hi All,
I have an annoying trouble with binary serialization. I have a windows
forms application which works like a server and keeps sending data to its
clients. The data is serialized before being sent using BinaryFormatter and a
serializable object. When using a windows forms application as a client,
everything works just fine and...
|
by: Jón Sveinsson |
last post by:
Hello everyone
I have been trying to read and write struct to binary
files, I'm using
to functions to convert the struct to bytes and bytes to
struct, I
always receive the following error
C:\Documents and Settings\jon.JONHS-LAP\My
Documents\Visual Studio
|
by: Dominic |
last post by:
Hi everybody,
In my application, I'm planning to use BinaryFormatter to serialize a
potentially huge object to file (and, of course, deserialize back to
memory later). My question is if there is any hard limit on the size
of this object?
Is it only limited by the amount of memory or hard-disk space in the
server?
|
by: cameron |
last post by:
I need to get the size of an objet in memory. I have tried:
System.IO.MemoryStream m = new System.IO.MemoryStream();
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter b = new
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
b.Serialize(m, Obj);
double size = Convert.ToDouble(m.Length);
but not everything...
|
by: Joshua Moore |
last post by:
I have a webservice that serializes a ton of variables and other good stuff
to a txt file using SoapFormatter (IFormatter), and when I try to
deserialize it using the binary formatter, i get the following error:
BinaryFormatter Version incompatibility. Expected Version 1.0. Received
Version 1986938170.1886350437.
I've read a lot...
| |
by: Igor |
last post by:
Hi.
While executing BinaryFormatter.Deserialize() I get:
System.InvalidCastException: Specified cast is not valid.
I implemented ISerializable interface. What may be a problem?
Thanks.
|
by: Fruber Malcome |
last post by:
I'm getting a very weird exception and hoping someone may be able to help.
I have an Office Add-In that lives in a .dll (for email reference ai.dll)
ai.dll makes calls into the core part of the application implementation in
another .dll (let's call that app.dll).
app.dll makes a function call into another dll (let's call that one
dep.dll)....
|
by: Doug Lind |
last post by:
Hi all,
I have seen a number of posts re: the BinaryFormatter version
incompatibility but nothing on how to recover from it. In my case, I want
the exception to trigger an alternate behaviour and continue process the
stream.
My app reads and writes configuration settings to a binary file upon
starting and shutdown. The settings are...
|
by: Tarscher |
last post by:
Hi all,
i want to save my application to a file with a BinaryFormatter . I
have some questions how the BinaryFormatter will work when the I
update my application. How can I make sure that I can still read older
saved files.
I looked for a tutorial but can't seem to find one. Someone has
experience with BinaryFormatter and versioning?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |