Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinApp in C# calling java program

Tags:

java

c#

I have a c# winapp that calls a java app by tcp and sends everything back by tcp to the c#.

The reason why I'm using java is because I received a java api. So I wrote a small java app that calls that api and get all the data I need.

So I was wondering if there is another solution for this. Because it's going slow, especially with a lot of data.

Thanks

like image 931
Gerbrand Avatar asked Apr 03 '09 08:04

Gerbrand


People also ask

What is hInstance in C?

hInstance is something called a "handle to an instance" or "handle to a module." The operating system uses this value to identify the executable (EXE) when it is loaded in memory. The instance handle is needed for certain Windows functions—for example, to load icons or bitmaps.

Can you create a Windows program with C?

The Visual Studio build tools include a C compiler that you can use to create everything from basic console programs to full Windows Desktop applications, mobile apps, and more.

Can I make desktop app using C++?

Any desktop application in C++ can use C Runtime (CRT) and Standard Library classes and functions, COM objects, and the public Windows functions, which collectively are known as the Windows API. For an introduction to Windows desktop applications in C++, see Get Started with Win32 and C++.

What is WinMain?

WinMain is the conventional name used for the application entry point.


2 Answers

TCP over the local machine should be pretty fast (named pipes might be a bit faster, but may be harder to do at both ends).

The biggest bottleneck is likely to be serialization and deserialization of the data. What format are you currently using to represent the data?

like image 89
Marc Gravell Avatar answered Sep 22 '22 01:09

Marc Gravell


Sounds to me like you need to profile this. Are you sure it's the network aspect that is slow ? Or the serialisation/deserialisation, or the actual client/server processing beyond the data transmission.

Before you address profiling solutions, you should identify the particular problem point.

like image 26
Brian Agnew Avatar answered Sep 19 '22 01:09

Brian Agnew