473,657 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way for inter-process communication in Python

Hi everyone!

Here's the current scenario: I have a program in Python that computes
something very fast (<1s), but it takes a considerable amount of time
to read the startup data (>90s). Since the startup data is pretty
static, I want this program to be resident and ready in memory all the
time.

The client-side of this program is a function in PostgreSQL. For the
sake of simplicity, let's assume it is another program in Python that
will be asking the resident one for results on-demand. Let's also
assume that there will be dozens of concurrent requests.

My problem is: what is the fastest, easiest way to accomplish this
inter-process communication? The data between them will be very small:
1Kb max per request. I've thought about SOAP, sockets and named
pipes... But since I have no experience on any of them using Python, I
can't decide which way is better...

Just a few considerations: Python version is 2.4. PostgreSQL version
is 8.2RC1, OS version is Windows Server 2003.

Thanks in advance,

Hugo Ferreira

--
GPG Fingerprint: B0D7 1249 447D F5BB 22C5 5B9B 078C 2615 504B 7B85
Dec 4 '06 #1
0 1872

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

Similar topics

1
4077
by: Miranda Evans | last post by:
Seeking reference material (a url, a book, an article) that offers advice and guidelines for organizing classes within files. For example, assume two classes: 1) SuperABC - a superclass 2) InheritorABC - a class that inherits from SuperABC I can think of two ways of organizing these classes within files: 1) One class per file: - the file SuperABCClass.py contains the source code for the class
1
1816
by: David M. Karr | last post by:
I've been asked to help debug a complex problem involving inter-frame references, so I just want to understand the elements involved with this. Apparently, there is a page with multiple frames, where one of the frames is a "hidden" frame, and is there just to contain one or more "fields" that are referenced from other frames. Supposedly, if a user "sits" somewhere in this set of pages for several minutes and then tries to do...
13
4124
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make sense to punch out from managed code to native code (I was using IJW) in order to do some amount of floating point work and, if so, what that certain amount of floating point work was approximately. To attempt to do this I made a program that...
6
16710
by: les | last post by:
Here's a class which uses 2.0 generics to implement an inter-thread message queue in C#. Any number of threads can post and read from the queue simultaneously, and the message object can be any type. There's a test driver at the bottom which demonstrates usage. /*-----------------------------------------------------------------------------------------------------*/ using System; using System.Collections.Generic;
2
2370
by: Steve Le Monnier | last post by:
Can anybody give me a quick heads up on the best way to develop C# based DLL's that are called via VBA. I'm developing a pop-up window that will record information within SQL. I need to launch this pop-up from an application that only supports VBA. So I decided the best solution would be to create a DLL with C# that exposes the methods needed to launch my pop-up window. My first attempt didn't work and after spending several hours on...
4
3714
by: Paciente8159 AKA Klayman | last post by:
Hi, I have a couple of doubts reggarding a plugin based application in C++? I want to build a c++ plugin based app. I have searched alot of things in the net but I still don't know how to start this. For example: I want the plugin to be able to expose functions and HANDLES (for synchronization with WaitForSingleObject for example).
7
4589
by: Sumedh | last post by:
Hi everyone There is a C# project which calls C++/CLI dll to be able to call native C++ including templates. But the C++/CLI code itself also requires the C# dll to get the types. For example: C#: class Test1 {
1
4957
by: Laurence | last post by:
Hi folks, As I konw: database partition (aka data partition?), the database can span multiple machines; table partition, the data within a table can seperate by certain condition. How about inter-partition and intra-partition? Is inter-partition database partition...?
1
4156
by: halekio | last post by:
Hi all, Please bear with me as I've only started programming in C# 2 weeks ago and this is my first contact with OOP. I ran into a situation where I needed to catch an event in an object that had no connection or reference to the object that triggered it. It goes something like this: (not syntactically correct..it's just for the idea)
52
3366
by: burgermeister01 | last post by:
First, let me say that this question is a rather general programming question, but the context is PHP, so I figured this group would have the most relevant insight. Anyways, this is also more of an opinion based question than one seeking a definite answer. Recently, while maintaining a rather large system. I needed to add an array class member to an object. It was exactly the same as another class member, except that one array stored...
0
8403
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8316
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
8833
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
8509
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
7345
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5636
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
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.