Re: Re: real time notifications django app

Jim Fulton <[email protected]> Sat, 25 Nov 2017 11:40:29 -0700
Newsgroups gmane.comp.web.zope.zodb
Message-ID <CAPDm-Fh3EqPD45PCtE84_OSzujwikOfDkvVQny4rwBDFpnihcg@mail.gmail.com>
On Sat, Nov 25, 2017 at 11:29 AM, Etienne Robillard <[email protected]>
wrote:

> Yes, the polling from Redis server should be done asynchronously from a
> non-blocking python script with aioredis, producing a list of recent log
> entries to the user. The saving of the records to the database could be
> done synchronously to ZODB with preferably Logstash.
>
> See:   https://sematext.com/blog/recipe-rsyslog-redis-logstash/
>

BTW, why do you want to store log data in ZODB? Is this just to avoid a
second database? That would be reasonable.  If you wanted to scale better
at some point, I'd consider using a non-transactional database for
log/event data.  Using a transactional database is overkill for log/event
data IMO, FWIW.

Jim

Le 2017-11-25 à 12:53, Jim Fulton a écrit :
>
>
> OK, so your client will poll Redis and write to ZODB.  I don't see an
> issue, other than the fact that ZODB will block.
>
> Why does this need to be asynchronous?
>
> Jim
>
>
>
>> Best Regards,
>>
>> Etienne
>>
>> Le 2017-11-25 à 10:22, Jim Fulton a écrit :
>>
>> I don't know why ZODB is involved in application-level messaging.  What
>> are the events you wish to track?
>>
>> Jim
>>
>> On Sat, Nov 25, 2017 at 4:38 AM, Etienne Robillard <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Could it be possible to use Django and asyncio to receive asynchronous
>>> redis messages and store them into a ZODB database? (ClientStorage)
>>>
>>> Is it possible to implement PUSH notifications with uWSGI backend and
>>> redis server ?
>>>
>>> Thank you,
>>>
>>> Etienne
>>>
>>>
>>>
>>> Le 2017-11-25 à 05:02, Etienne Robillard a écrit :
>>>
>>>> Hi,
>>>>
>>>> I would like to implement a simple web client for sending asynchronous
>>>> messages from RabbitMQ or Redis to a ClientStorage server with asyncio.
>>>> This code should ideally run under Python 3.5.3 and WSGI.
>>>>
>>>> Design ideas:
>>>>
>>>> - ZODBController class: this will need refactoring
>>>>
>>>> - Support PostgreSQL schemas in the future
>>>>
>>>> - Make the code compatible with WSGI environments
>>>>
>>>>
>>>> What do you think?
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Etienne
>>>>
>>>>
>>> --
>>> Etienne Robillard
>>> [email protected]
>>> http://www.isotopesoftware.ca/
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "zodb" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Jim Fulton
>> http://jimfulton.info
>> --
>> You received this message because you are subscribed to the Google Groups
>> "zodb" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Etienne [email protected]://www.isotopesoftware.ca/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "zodb" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Jim Fulton
> http://jimfulton.info
> --
> You received this message because you are subscribed to the Google Groups
> "zodb" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Etienne [email protected]://www.isotopesoftware.ca/
>
> --
> You received this message because you are subscribed to the Google Groups
> "zodb" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jim Fulton
http://jimfulton.info

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.