473,809 Members | 2,826 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

static library to sockets on localhost

Hi,

We had a library linked dynamically in our 32 bit mode.
Now due to capacity issues, we are planning to move on to 64 bit but
the library is still 32 bit and
we cannot make it 64 bit without a mammoth effort.
So we decided to use IPC via sockets such that the library calls are
run on a 32 bit machine while
our application runs on a 64 bit machine.
But that is slowing down the things by a factor of say 100.
Is this expected ?

I am using Tcl sockets for this purpose and right now, both the
processes are running on the same machine.
Our application built in 32 bit mode to test the IPC mechanism.

Sep 16 '07 #1
3 1697
call_me_anythin g wrote:
Hi,

We had a library linked dynamically in our 32 bit mode.
Now due to capacity issues, we are planning to move on to 64 bit but
the library is still 32 bit and
we cannot make it 64 bit without a mammoth effort.
So we decided to use IPC via sockets such that the library calls are
run on a 32 bit machine while
our application runs on a 64 bit machine.
But that is slowing down the things by a factor of say 100.
Is this expected ?
Well, yes. It depends on how much you're calling and waiting for your
32 bit library.
>
I am using Tcl sockets for this purpose and right now, both the
processes are running on the same machine.
Our application built in 32 bit mode to test the IPC mechanism.
Sounds like it's time to re-write your 32 bit DLL, or at least the bits
you use.
Sep 16 '07 #2
On 2007-09-16 10:21, call_me_anythin g wrote:
Hi,

We had a library linked dynamically in our 32 bit mode.
Now due to capacity issues, we are planning to move on to 64 bit but
the library is still 32 bit and
we cannot make it 64 bit without a mammoth effort.
So we decided to use IPC via sockets such that the library calls are
run on a 32 bit machine while
our application runs on a 64 bit machine.
But that is slowing down the things by a factor of say 100.
Is this expected ?

I am using Tcl sockets for this purpose and right now, both the
processes are running on the same machine.
Our application built in 32 bit mode to test the IPC mechanism.
For future questions like this please use a group discussing your
platform or the libraries you are using, the question is off topic here.
The fact that the code was written in C++ (it was right?) does not make
the question topical.

As to your problem, what you are doing now seems to be RPC (Remote
Procedure Call) not IPC (Inter-process communication) so my suggestion
is that you try to use IPC instead. Wrapp the library in a small
application which is then run in 32-bit mode on the 64 bit computer.
Then the 64-bit application and the library can communicate via IPC
messages. Depending on your usage you might not notice any slowdown at all.

--
Erik Wikström
Sep 16 '07 #3
On Sep 16, 10:21 am, call_me_anythin g <sgiitne...@gma il.comwrote:
We had a library linked dynamically in our 32 bit mode.
Now due to capacity issues, we are planning to move on to 64 bit but
the library is still 32 bit and
we cannot make it 64 bit without a mammoth effort.
Isn't it sufficient to just recompile it?
So we decided to use IPC via sockets such that the library calls are
run on a 32 bit machine while
our application runs on a 64 bit machine.
But that is slowing down the things by a factor of say 100.
Is this expected ?
It might be. It depends on a lot of things. Most of which are
system dependent: under Unix, for example, you should ensure
that you are using Unix domain sockets, and not TCP. You'd best
ask in a group specific to your OS.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Sep 16 '07 #4

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

Similar topics

7
1601
by: Jesper Matthiesen | last post by:
Has anyone experienced problems(/solutions) with the use of sockets with Microsofts JVM. I have to use it to avoid users having to download the Sun Java plugin. So I'm compiling with: javac -target 1.1 foo.java I'm simply trying to connect to the localhost: socket = new Socket("127.0.0.1", port); *Nothing* happens..no exceptions!
10
2722
by: Cory Nelson | last post by:
I've created a new C++ sockets library - small, cross-platform, IPv4 and IPv6. If anyone would like to critique it, I'd appreciate it. Doesn't support the more exotic protocols - only TCP and UDP. It also lacks get/setsockopt and ioctl, but those may be added in the future. There is no webpage for it yet, I plan on making one once I'm 100% sure of everything. For now the source is available here: http://dev.int64.org/netx.zip PS....
7
2955
by: groleo | last post by:
Hi. I've searched a lot on google, but no one seems to develop a socket class for c++? I've found a lot of classes that works only on Windows. The thing is that I need a BSD socket library. I tried socket++1.1, but i guess that is too old, since it doesen't compile on gcc-3.3
0
1776
by: Samuel M. Smith | last post by:
I can build python 2.4.2 from source on the embedded linux box when I nfs mount and boot a full debian distribution. The embedded box also has stripped down linux distribution in onboard flash. My goal is to run python from the stripped down linux in onboard flash. I can successfully install python to the onboard flash when booted to the nfs version by using make install with $DESTDIR set to the onboard flash mounted directory
0
1543
by: Tim Wagaman | last post by:
I an having issuses with a loop I am running to keep checking for messages coming across our line. The goal: Listen for messages on port 5001 and print the messages into a text file. The port must stay open at all times and only close if no activity for 60 seconds. The problem: If I do a read on a networkstream and the connection is closed
3
4365
by: Michael Maercker | last post by:
hi! i'm really not into networking at all and have now been asigned the task of porting a vb6-code into vb.net (compact framework, in this case) and the code uses the winsock-control. i quickly found out that .net uses system.net.sockets.socket or .tcpclient/.tcpserver. and these confuse me... :o| and help would be really great! links, code, wrappers, tips, whateveryougot... one of my main problems, i guess, is: why don't sockets...
3
1503
by: derSchweiz | last post by:
Hi, Experimenting with sockets, and I think I got it half working. I have the following code: Private Sub socket_receive(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated Dim bytesRec As Integer Dim i As Integer = 0 Dim data1 As Net.Sockets.Socket = cidServer.Accept() 'this line is
2
24284
by: dariophoenix | last post by:
Hi, I am trying to encapsulate Linux sockets and POSIX threads in C++ classes (I work in Knoppix, using KDevelop). Since sockets and threads are new to me, I searched for example code and found the following: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <netdb.h>
2
4265
by: tskrish | last post by:
Hi, In any ASP.NET application the life of the static variable sounds peculiar. Consider a scenario like this, public static int i = 0; //Static declaration protected void Page_Load(object sender, EventArgs e) { if (i == 0)
0
9600
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
10633
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
10375
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
10114
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
7651
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
5548
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
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
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
2
3860
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.