473,815 Members | 3,206 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any faster cross boundaries comms than Remoting?

Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it still
reports the same Process ID to the DB server, so the limit persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using .Net
remoting, where the application server is a multi client of these external
..Net components. It works fine, but this solution performs about factor 3
slower than binding the driver directly into the application server.

Now this is my question: is there's a faster way than .Net Remoting's way of
talking across boundaries to a .Net process on the same machine? Any hints
are appreciated.

Thanks, Urs
Nov 16 '05 #1
7 2433
You can try to work directly with .NET sockets ( although it will take more
effort to implement ).

"Urs Vogel" wrote:
Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it still
reports the same Process ID to the DB server, so the limit persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using .Net
remoting, where the application server is a multi client of these external
..Net components. It works fine, but this solution performs about factor 3
slower than binding the driver directly into the application server.

Now this is my question: is there's a faster way than .Net Remoting's way of
talking across boundaries to a .Net process on the same machine? Any hints
are appreciated.

Thanks, Urs

Nov 16 '05 #2
"Urs Vogel" <uv****@msn.com > wrote in
news:uj******** ******@TK2MSFTN GP15.phx.gbl...
Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it
still reports the same Process ID to the DB server, so the limit persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using .Net
remoting, where the application server is a multi client of these external
.Net components. It works fine, but this solution performs about factor 3
slower than binding the driver directly into the application server.

Now this is my question: is there's a faster way than .Net Remoting's way
of talking across boundaries to a .Net process on the same machine? Any
hints are appreciated.


The fastest IPC mechanisms (on the same machine) are synchronization objects
(mutexes, events...) and shared memory. AFAIK there is no managed support
for shared memory built into the .NET framework, but you might find
components on the internet; Otherwise, you could still P/Invoke the relevant
API functions yourself.

(C++ sample code can be found here:
http://msdn.microsoft.com/library/de...red_memory.asp)

As both processes can share synchronization objects and physical memory the
performance is comparable to in-process cross-thread communication.

BTW: COM uses shared memory for out-of-processes communication on the same
machine.

Niki
Nov 16 '05 #3
I wrote a wrapper for shared memory a while back. You can find it here:

http://staff.develop.com/richardb/we...5-39ca338d906d

HTH

Richard Blewett ? DevelopMentor
http://staff.develop.com/richardb/weblog
?
nntp://news.microsoft. com/microsoft.publi c.dotnet.langua ges.csharp/
Hi

For my application server, I had to overcome some limitations in older COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it still reports the same Process ID to the DB server, so the limit persists.

When launching several external components (EXEs), each loading its own database driver, the limitation problem is solved. I built this using .Net remoting, where the application server is a multi client of these external .Net components. It works fine, but this solution performs about factor 3 slower than binding the driver directly into the application server.

Now this is my question: is there's a faster way than .Net Remoting's way of talking across boundaries to a .Net process on the same machine? Any hints are appreciated.

Thanks, Urs
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004

[microsoft.publi c.dotnet.langua ges.csharp]

Nov 16 '05 #4
Thanks Richard, this will definitely do it.

Urs

"Richard Blewett [DevelopMentor]" <ri******@devel op.com> schrieb im
Newsbeitrag news:ue******** *****@TK2MSFTNG P14.phx.gbl...
I wrote a wrapper for shared memory a while back. You can find it here:

http://staff.develop.com/richardb/we...5-39ca338d906d

HTH

Richard Blewett ? DevelopMentor
http://staff.develop.com/richardb/weblog
?
nntp://news.microsoft. com/microsoft.publi c.dotnet.langua ges.csharp/
Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it
still reports the same Process ID to the DB server, so the limit persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using .Net
remoting, where the application server is a multi client of these external
.Net components. It works fine, but this solution performs about factor 3
slower than binding the driver directly into the application server.

Now this is my question: is there's a faster way than .Net Remoting's way
of talking across boundaries to a .Net process on the same machine? Any
hints are appreciated.

Thanks, Urs
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004

[microsoft.publi c.dotnet.langua ges.csharp]

Nov 16 '05 #5
Niki

Thanks, Richard Blewett sent me a link to a similar sample solution.

Urs

"Niki Estner" <ni*********@cu be.net> schrieb im Newsbeitrag
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
"Urs Vogel" <uv****@msn.com > wrote in
news:uj******** ******@TK2MSFTN GP15.phx.gbl...
Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it
still reports the same Process ID to the DB server, so the limit
persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using
.Net remoting, where the application server is a multi client of these
external .Net components. It works fine, but this solution performs about
factor 3 slower than binding the driver directly into the application
server.

Now this is my question: is there's a faster way than .Net Remoting's way
of talking across boundaries to a .Net process on the same machine? Any
hints are appreciated.


The fastest IPC mechanisms (on the same machine) are synchronization
objects (mutexes, events...) and shared memory. AFAIK there is no managed
support for shared memory built into the .NET framework, but you might
find components on the internet; Otherwise, you could still P/Invoke the
relevant API functions yourself.

(C++ sample code can be found here:
http://msdn.microsoft.com/library/de...red_memory.asp)

As both processes can share synchronization objects and physical memory
the performance is comparable to in-process cross-thread communication.

BTW: COM uses shared memory for out-of-processes communication on the same
machine.

Niki

Nov 16 '05 #6
Urs,

If you can afford to develop against the .NET 2.0 beta (for a product to
be released later), you might want to try the IpcChannel for remoting. It
basically uses named pipes to communicate, which is a much faster mechanism
than sockets.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Urs Vogel" <uv****@msn.com > wrote in message
news:uj******** ******@TK2MSFTN GP15.phx.gbl...
Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it
still reports the same Process ID to the DB server, so the limit persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using .Net
remoting, where the application server is a multi client of these external
.Net components. It works fine, but this solution performs about factor 3
slower than binding the driver directly into the application server.

Now this is my question: is there's a faster way than .Net Remoting's way
of talking across boundaries to a .Net process on the same machine? Any
hints are appreciated.

Thanks, Urs

Nov 16 '05 #7
Thanks for the hint, I'll look into this for future releases, but for the
moment I have to stick to released techs.

Urs

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> schrieb
im Newsbeitrag news:uj******** ******@TK2MSFTN GP11.phx.gbl...
Urs,

If you can afford to develop against the .NET 2.0 beta (for a product
to be released later), you might want to try the IpcChannel for remoting.
It basically uses named pipes to communicate, which is a much faster
mechanism than sockets.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Urs Vogel" <uv****@msn.com > wrote in message
news:uj******** ******@TK2MSFTN GP15.phx.gbl...
Hi

For my application server, I had to overcome some limitations in older
COM-database drivers, whers sessions per driver instance are limited.
Instantiating the COM component several times does not help, since it
still reports the same Process ID to the DB server, so the limit
persists.

When launching several external components (EXEs), each loading its own
database driver, the limitation problem is solved. I built this using
.Net remoting, where the application server is a multi client of these
external .Net components. It works fine, but this solution performs about
factor 3 slower than binding the driver directly into the application
server.

Now this is my question: is there's a faster way than .Net Remoting's way
of talking across boundaries to a .Net process on the same machine? Any
hints are appreciated.

Thanks, Urs


Nov 16 '05 #8

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

Similar topics

7
1840
by: Walter Zydhek | last post by:
Which would be less resource instensive and faster? A "hosted" remoting class or a class set up with object pooling via Component Services? -Walt Zydhek
1
4129
by: MatthewRoberts | last post by:
Howdy All, I am having difficulty with two-way communication across AppDomains in an attempt to dynamically script applications. Everything works as expected, except when using ByRef parameters. The below explanation is lengthy, but well worth the read. If you can help me, I'd gladly share this code which has greatly helped my development of extensible applications.
5
2650
by: guy | last post by:
In the past I've used sockets in C++ to allow apps to communicate with each other over a local network. Is there anything better/more advanced in .NET or should I continue to use sockets and the .NET Socket class under C#? The (mini) project that I'm about to start will receive stream live data (stock market prices) and reformat that data and perform some calculations on it before disseminating it to client applications on the local...
11
1266
by: bill | last post by:
I am trying to figure out if I can use sse to help execute arithmetic operations faster. I have 900 values that must each be scaled with a divide and multiply. This happens repeatedly. Any examples I can be pointed to would be greatly appreciatted. I realize I could do just one multiply (instead of multiply and divide) but I still want to do 900 (or as many as I can) at once. Any ideas would be appreciatted. Bill
1
1273
by: Savas Ates | last post by:
i created an proxy class .. it named webreference1 my code is like following. how can i learn the return message from wsdl (it works or not) how can i learn it(wsdl's respond) Dim ws As New WebReference1.ProductDefinitionType() Try With ws .Description = xx.Item("ozellikleri")
4
5321
by: Paul Cheetham | last post by:
Hi, I have a couple of classes that I am using to read a swipe-card reader attached to the serial port (c# VS 2005 Pro). I have a SerialComm class which actaully reads the serial port, and a CardReader class which validates the number etc. Neither of these classes inherit from any other classes / controls. The SerialComm class is instantiated by the Cardreader class, so in the
4
5052
by: Adrian | last post by:
can someone explain the cross domain security re AJAX in IE? I have a page that calls a web service (WS) from another domain (the target browser is only IE6) and displays it's results! all works fine when the page is run from my hdd, however when run from the web I get "Access denied" due to the cross domain security (I assume). So I set the browser setting to allow cross domain but this did not seem to work, I got the same error!
2
2409
by: Kevin | last post by:
I would appreciate it if anyone could help or advise on coding for comms. I am using C# and need to be able to open a comms port, send a command to a device, receive the data back and close the port. Also need to be able to set up the comms parameters Baud rate stop bits parity etc. Can anyone please advise or help me.
7
8847
by: atlaste | last post by:
Hi, I have two different things I'd like to discuss here. Both are about cross-process synchronization of shared resources. The resources that are shared are: (1) an object writing to a file and (2) a file. I threat them as two different problems for various reasons. The first problem involves the object writing to a file. The problem might be best explained by thinking of a single log file that's appended by different programs that...
0
9611
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10672
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, 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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10428
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10145
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7687
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5710
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4359
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.