Best way to make insert data in logs web API. REST or WebSockets

I want to make a centralized log web API, so it will have a large amount of data per seconds. the logs will comming from others WEB API

I was thinking if i make the REST API, all of the POST made need to return an answer and maybe can overload the server with so much request.

then I think in webSockets, establish a communication with the API that made the logs and only send data without necessary responses but I don’t know how reliable are that.

So in this case, what method would be fastest and more reliable? Sorry if my english isn’t good 🙁

regards.

AutoFill and ‘Payment Request API’ behavior in chrome

According to this guidance in Chrome Help

Chrome has 2 mechanisms that support saving the payment methods for the browser’s user: – Autofill and the Payment Request API
My Questions

  • what are the difference between them from user experience?
  • When using basic card (credit or debit card) what is the card number stored for continues use, is it stored in some chrome data repository where all the passwords to enter websites is stored?

The notification work just fine when sent from the firebase console, but don’t work when sent from the API. Even when the result displays a success: [on hold]

The notification work just fine when sent from the firebase console, but don’t work when sent from the API. Even when the result displays a success:

{“multicast_id”:7101682513394259435,”success”:1,”failure”:0,”canonical_ids”:0,”results”:[{“message_id”:”0:1544616895873409%0000000000000000″}]}

APÍ django-storages dropbox erro url pattern

Eu estou utilizando a seguinte API: https://django-storages.readthedocs.io/en/latest/backends/dropbox.html

Eu tenho exatamente tudo configurado, desde a lib instalada até as configurações do settings.py.

A lib ‘storages’ no INSTALLED_APPS e as três variáveis de conexão com o dropbox:

DEFAULT_FILE_STORAGE = ‘storages.backends.dropbox.DropBoxStorage’ DROPBOX_OAUTH2_TOKEN = ‘meu_token’ DROPBOX_ROOT_PATH = ‘/media/’

Eu quero que os campos FileField e ImageField façam upload de uma imagem ou arquivo e este seja salvo na pasta /media/ do projeto e do dropbox, mantendo a imagem em produção, tendo a App criada e configurada para ser app_folder.

Se eu retirar as três variáveis de configuração do dropbox e tentar modificar ou adicionar uma imagem pelo django admin é possível, porém, quando retorno as variáveis e tento novamente, aparece o seguinte erro:

ValidationError at /admin/catalog/product/6/change/ 

‘C:/media/products/cortina-city.jpg’ did not match pattern ‘(/(.|[\r\n])|id:.)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)’

Dá erro também no dropbox.py da lib:

C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\storages\backends\dropbox.py in exists         return bool(self.client.files_get_metadata(self._full_path(name))) ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\base.py in files_get_metadata                                include_property_groups) ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\files.py in __init__         self.path = path ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\files.py in path     val = self._path_validator.validate(val) ... C:\Users\evert\Desktop\Synth\SynthDev\myenv\lib\site-packages\dropbox\stone_validators.py in validate                               % (val, self.pattern))  

Eu entendo que não está identificando o padrão do get da url. Imagino que o C: não deve ir junto na string e está indo, ou seja, ‘C:/media/products/..”.

Como resolver isso?