how to improve a performace to send some of data between machine.

L

lightdoll

hello everyone.

i need your advice to be implemented my code.

i am making some program to send lots of data to Server.

i wrote some code below.

i am using c++/cli and C#, c and c++.

c or c++ will be client
C# will be Server with Net Remoting.
c++/cli is to send data between c/c++ and c#

c/c++ will pass lots of data like type array to c++/cli.

In c++/cli

there is a function with dllexport like below.

dllexport void received(data arrdata[], int count)
{
after calling this function from c/c++,then just send many data to C#
directry using Net Remoting.
so i want to send data changed to C#.
could you teach me to be implemented here how to improve my code.

}

thanks everyone.
 
W

Willy Denoyette [MVP]

lightdoll said:
hello everyone.

i need your advice to be implemented my code.

i am making some program to send lots of data to Server.

i wrote some code below.

i am using c++/cli and C#, c and c++.

c or c++ will be client
C# will be Server with Net Remoting.
c++/cli is to send data between c/c++ and c#

c/c++ will pass lots of data like type array to c++/cli.

In c++/cli

there is a function with dllexport like below.

dllexport void received(data arrdata[], int count)
{
after calling this function from c/c++,then just send many data to C#
directry using Net Remoting.
so i want to send data changed to C#.
could you teach me to be implemented here how to improve my code.

}

thanks everyone.


This same question was answered by me, what didn't you like about the answer
given?
This time you changed the second tier from C# to C++/CLI , if you expected a
performance improvement by changing from C# to C++/CLI, then you are wrong.

As said before the fastest way to pass data between tiers by restricting the
number of tiers to two, the client and the server, everything put in between
will reduce the overall performance.
So the fastest path is:
- a pure client/server Socket scenario, or
- if you prefer/need a remote procedure call like protocol, then a DCOM
transport between C++ and the remote C# server running in a COM+ application
is the second fastest.
Both of above can take advantage of compression in order to increase the
throughput between the two tiers.
In your scenario, you can also apply some form of compression between the
second tier and the server (the remoting tier), but as I said before, you
need to tell us exactly what you are expecting and what you have measured in
terms of transfer speed, but don't expect to transfer 20MB of data
end-to-end over a 100Mb network

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top