Re: [Twisted-Python] sharing a dict between child processes

2019-11-07 Thread Glyph
> On Nov 7, 2019, at 2:07 AM, Scott, Barry wrote: > > On Thursday, 7 November 2019 05:29:34 GMT Sean DiZazzo wrote: >> If you need guaranteed delivery of the data, why not just use a TCP >> connection to the unix socket, instead of a UDP connection which inherently >> can lose data? In that ca

Re: [Twisted-Python] sharing a dict between child processes

2019-11-07 Thread Scott, Barry
On Wednesday, 6 November 2019 18:23:41 GMT Waqar Khan wrote: > Thanks for the info. > Yeah, it seems that UDS is the way to go. (I need to read more about them). > > Actually, is there a simple example you can give that can help me > understand this a bit better? > Thanks The code I have I cannot

Re: [Twisted-Python] sharing a dict between child processes

2019-11-07 Thread Scott, Barry
On Thursday, 7 November 2019 05:29:34 GMT Sean DiZazzo wrote: > If you need guaranteed delivery of the data, why not just use a TCP > connection to the unix socket, instead of a UDP connection which inherently > can lose data? In that case I don't think your patch would be needed. > > I didn't lo

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Sean DiZazzo
If you need guaranteed delivery of the data, why not just use a TCP connection to the unix socket, instead of a UDP connection which inherently can lose data? In that case I don't think your patch would be needed. I didn't look at the source, so perhaps I missed something. On Wed, Nov 6, 2019 at

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Waqar Khan
Thanks for the info. Yeah, it seems that UDS is the way to go. (I need to read more about them). Actually, is there a simple example you can give that can help me understand this a bit better? Thanks On Wed, Nov 6, 2019 at 9:07 AM Scott, Barry wrote: > On Wednesday, 6 November 2019 16:43:52 GMT

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Scott, Barry
On Wednesday, 6 November 2019 16:43:52 GMT Waqar Khan wrote: > Hi Barry, > Thanks for the response. Where can I read more about (1). It seems > like that is something I need to explore. > As we already have (2) (cache for each process). > Thanks again for your help. We use the UDS (Unix do

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Waqar Khan
Hi Barry, Thanks for the response. Where can I read more about (1). It seems like that is something I need to explore. As we already have (2) (cache for each process). Thanks again for your help. On Wed, Nov 6, 2019 at 8:39 AM Scott, Barry wrote: > On Wednesday, 6 November 2019 14:21:22

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Scott, Barry
On Wednesday, 6 November 2019 14:21:22 GMT Maarten ter Huurne wrote: > On Wednesday, 6 November 2019 07:19:56 CET Waqar Khan wrote: > > Hi, > > So, I am writing a twisted server. This server spawn multiple child > > processes using reactor spawnProcess that initializes a process > > protocol. > >

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Waqar Khan
Hi Marteen, Thanks for the response. When you say "when one process mutates the dictionary while another is looking up something or also mutating it." Do you mean that a key/value pair is getting modified or is it that a dict, in general, is getting modified. The first one is not really a concer

Re: [Twisted-Python] sharing a dict between child processes

2019-11-06 Thread Maarten ter Huurne
On Wednesday, 6 November 2019 07:19:56 CET Waqar Khan wrote: > Hi, > So, I am writing a twisted server. This server spawn multiple child > processes using reactor spawnProcess that initializes a process > protocol. > > Now, each of the childprocess receives some REST requests. Each > process has a

[Twisted-Python] sharing a dict between child processes

2019-11-05 Thread Waqar Khan
Hi, So, I am writing a twisted server. This server spawn multiple child processes using reactor spawnProcess that initializes a process protocol. Now, each of the childprocess receives some REST requests. Each process has a dict that acts as cache. Now, I want to share dict across processes. In ge