Re: Best (simplest) way to share data (Posting On Python-List Prohibited)

Liste des GroupesRevenir à cl python 
Sujet : Re: Best (simplest) way to share data (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.python
Date : 09. Jul 2024, 07:52:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6ij7k$195lj$2@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.158 (Avdiivka; )
On Mon, 8 Jul 2024 13:56:34 +0100, Chris Green wrote:

Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
If it’s a snapshot of current values, that does not persist when the
collector process is not running, then why not just keep the data in
the memory of the collector process, and have it concurrently listen on
a socket for connections from readers requesting a copy of the current
data?
 
That's exactly the sort of solution I was wondering about.  Is there a
ready made module/library for handling this sort of thing?  Basically it
will just be a string of a few tens of characters that would be kept up
to date by one process and asked for by all the others.

You probably don’t need to define any nontrivial kind of protocol at all.
Just accept a connection from a client, send it the current data in some
convenient format (e.g. JSON), and disconnect.

Date Sujet#  Auteur
6 Jul 24 * Best (simplest) way to share data between processes13Chris Green
6 Jul 24 +- Re: Best (simplest) way to share data between processes1Stefan Ram
6 Jul 24 +* Re: Best (simplest) way to share data between processes2Piergiorgio Sartor
8 Jul 24 i`- Re: Best (simplest) way to share data between processes1Chris Green
7 Jul 24 +* Re: Best (simplest) way to share data (Posting On Python-List Prohibited)5Lawrence D'Oliveiro
8 Jul 24 i`* Re: Best (simplest) way to share data (Posting On Python-List Prohibited)4Chris Green
8 Jul 24 i +* Re: Best (simplest) way to share data2Stefan Ram
9 Jul 24 i i`- Re: Best (simplest) way to share data1Chris Green
9 Jul 24 i `- Re: Best (simplest) way to share data (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
8 Jul 24 +- Re: Best (simplest) way to share data between processes1Barry
8 Jul 24 +- Re: Best (simplest) way to share data between processes1MRAB
8 Jul 24 +- Re: Best (simplest) way to share data between processes1Barry Scott
7 Jul 24 `- Re: Best (simplest) way to share data between processes1Left Right

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal