473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Remoting and Serialization

Hello!

I already posted this issue on the remoting NG, but didn't get an answer, so
I try it here.

I have a client/server app., that communicates via .NET remoting and I need
to transport large binary objects, encapsulated in a special class. The
clients sumtimes run on the same machine as the server and sometimes on
others.

My Problem:
For performance reasons I need to change the serialization algorithm,
dependent on the remoting target. I.e.: I want to compress the data if the
client and the server run on different machines, and I want to deliver the
data uncompressed, if they run on the same machine.

I wrote a customized Serialization routine, examining the void
GetObjectData(SerializationInfo info, StreamingContext context)
context.State parameter, doing compression if the
StreamingContextStates.CrossMachine flag is set. Unforunately the
StreamingContext.State is always set to StreamingContextStates.Other if
serialization is performed by the remoting framework. My code looks similar
to the following:

public void GetObjectData(SerializationInfo info, StreamingContext context)

{

StreamingContextStates state = context.State;

bool isCrossMachine = (state & StreamingContextStates.CrossMachine) ==
StreamingContextStates.CrossMachine;

if (isCrossMachine)

{

.... serialize with compression

}

else

{

.... serialize without compression

}

}

Can anybody give me a hint, how to solve the problem? Thanx in advance.

-Markus


Jul 21 '05 #1
0 1061

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jan v | last post by:
Hi everyone I have a problem with events. When the code reaches communication.SynchronisationServer.UpdateNotificationEvent+=new...
6
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or...
3
by: Skip | last post by:
Hi, I'm new to .NET remoting and there's something I'm having real trouble with. Basically, I'd like to create a component that can act as a server and as a client (can send messages and receive...
15
by: Sharon | last post by:
I’m trying to build a generic Publisher-Subscriber that will work over the net, so I’m using the Remoting. I wish that the subscriber user will be notify about the messages sent by the...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
11
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary...
3
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is...
0
by: DC | last post by:
Hi, I am trying to serialise an object across remoting, and I get the following message: System.Runtime.Serialization.SerializationException: Because of security restrictions, the type...
3
by: benkial | last post by:
Below is a custom exception class that I created to be shared by my C+ + and C# code. It works fine till I need to pass the exception object through Remoting: every time a FtException is raized in...
1
by: sandeepbhutani304 | last post by:
have 2 projects communicating each other with .NET remoting. But when I am trying to call these functions I am getting the error: The input stream is not a valid binary format. The starting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
Oralloy
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,...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.