BufWriter<Master<'_>> – Telegram
BufWriter<Master<'_>>
105 subscribers
451 photos
28 videos
34 files
1.7K links
https://www.patreon.com/alxe_master

Видео/статьи. Конспект и мои вольные комментарии по инженерии. тут только то, что считаю полезным для себя или других =)

#os, #cloud, #rust, #golang, #python, #javaScript, #cpp, etc
Download Telegram
АААААА. где же ты был, доклад, афигенный!
https://www.youtube.com/watch?v=s6ZtfLmvQMU
MQTT не поддерживает TLS пока, реализовано нестабильно (инфа старая, над проверять)

Огромный зоопарк протоколов
- все это потому что нужна сеть для оч слабых девайсов. которые работают от батарейки и даже не от аккумулятора!
- девайсы и сенсоры -> базовая станция -> интернет -> серверные системы

MQTT
- pub-sub
- broker is required
😘 standard
😘 small code
- limited network bandwidth/constrained environments
- developed in 1999 -> released in 2010
😘dataagnostic. just string bytes
publisher -> broker -> subscriber
😭 has broker
😭 TCP/IP
😘 simple protocol (255 packages)
😘 multilevel wildcards. (* destination)
QoS:
0 = the broker/client will deliver the message once, with no confirmation
1 = the broker/client will deliver message at least once, with confirmation required
2 = the broker/client will deliver the message exactly once by using a four step handshake
😭 last will and testament!
😘😘😘 rabbitmq supports MQTT!!!!!!!!!!
recommended broker: mosquitto

COAP
= LIGHTWEIGHT HTTP over UDP
😭 proposed standard (старая инфа)
😘 binary protocol NOT text!
😘 no headers
😘😭 no tcp handshakes.
😘 only one ack !
😘 no matter where is running (server or client)
😘 DTLS (TLS over UDP)
😘 10times lightweight in comparison with http
😘 there is URI
😘 GET/POST/PUT/DELETE
😘 content type support (xml, json, cbor...)
😘 build-in discovery
😘 multicast support
😘 async message exchanges
😘 designed to be extensible
QoS:
* non-confirmable
* confirmable
Reset possibility
😘 response is split in blocks
😭 COAP over TCP being drafted (инфа старая)
😘 auth inspired by OAUTH and JWT
Пришла новая книжка. Посмотрим, может поменяю свое мнение к носкулам

тут есть:
- PostgreSQL
- Riak
- HBase
- MongoDB
- CouchDB
- Neo4J
- Redis

собственно для сравнения интересны Hbase, Riak, Neo4j - бо их никогда не юзал совсем
блинский. только сейчас заметил что мне выдает компилятор при попытке скомпилировать асинхронный трэйт в #rust... и этот пакет прямо рекламируется! и действительно весь геморой с ними решаются макросами и афигенно рботает !

https://crates.io/crates/async-trait

рубрика "надо чаще обновлять компилятор раста" много нового можно черпануть)))
https://www.st.com/en/evaluation-tools/nucleo-g071rb.html

ну дравствуй стм32G. взял новую отладочную платку домой
Unterstanding Rust’s Vec and its capacity for fast and efficient programs
https://markusjais.com/unterstanding-rusts-vec-and-its-capacity-for-fast-and-efficient-programs/
про выделение памяти для вектора в #rust
LinuxConJapan2016_makita_160712.pdf
2.5 MB
вот этот доклад хочу найти. потому что это просто ОГОНЬ. как ускорить UDP/TCP на линуксе
Thesis.pdf
748.3 KB
Zero-copy #rust k-v store
https://serverfault.com/questions/432101/why-is-udp-slower-than-tcp-on-ubuntu-server

никогда не думал что

Each frame goes through several buffers as you send it: The application buffer, The Protocol Buffer, The Software interface buffer and the Hardware interface buffer. As you start stressing the stack by sending high speed data you will fill up these buffers and either block or lose data. You also have strategies for timeliness and polling that can impact your performance. For example, by using a larger buffer and poll less often you can get much better performance while sacrificing latency.

TCP is optimized for high speed bulk transfers while UDP is optimized for low latency in the Linux kernel. This has an impact on buffer sizes and how data is polled and handed over. In addition to this, you frequently have offloading to hardware for TCP. I would expect considerably better performance for TCP compared to UDP.

Note that sending high speed data over UDP is usually a bad idea, unless you implement your own congestion control. TCP protects your network from congestion collapses. Use UDP when you have small amounts of data or high timeliness requirements.


Writing to loopback will not be an efficient way to communicate inter-process for profiling. Generally the buffer will be copied multiple times before it's processed, and you run the risk of dropping packets since you're using udp.
протокол LwM2M
(Lightweight Machine to machine protocol)

== Defining the future of the IoT device management with LwM2M
https://www.youtube.com/watch?v=wCyrisJZ_Dc

- device requesting
- device onboarding
- device configuration
- security patches
- firmware over air
- proactive maintenance
- insurance

iot platform
- device management (lwm2m, oma dm, mqtt, tr-069, snmp)
- connectivity management (sim lifecycle managerment, integration with PCRF and HLR)
- application managent (OTA, FOTA, App state monitoring, app configuration)
- monitoring (passive and active data collection, business intelligence)
- service enablement (zero-touch provisionning, common services layer, suplementary services activation)
- user management

MQTT:
- TCP
- no format payload
- no datamodel
- ipv6 +
- security ssl/tls
- standard OASIS, ISO

XMPP
- TCP
- payload is XML
- no datamodel
- ipv6 +
- security XTLS/TLS, SASL
standardization body XSF, IETF

OMA DM
- Open mobile alliance standard for device management
- TCP/SMS
- app layer HTTP/HTTPS, Wap
- payload - syncMl
- datamode defined
- ipv6 +
security HMAC-MD5, SSL/TLS
- body = OMA

COAP
- UDP
- no standard of payload
- ipv6+
- security DTLS
- standardization body IETF

LWM2M
- UDP, SMS
- app layer - CoAP
- TLV, JSON
- Defined data model
- ipv6+
- security DTLS 1.2
- body - OMA, IETF

Interfaces:
- bootstrap (bootstrap request, boostrap finish, write, discover, delete)
- client registration (register, de-tegister, update)
- device management & service enablemnt (read, write, execute, create, delete, write attribute, discover)
- information reporting (observe cancel observation, notify)

LwM2M 1.1
- CoaP over TCP
- lwm2m gateway
- LPWA binding (NIDD)
- CBOR encoding
- hardware secure elements

Anjay - LwM2M SDK
- opensourced!


== Why investigate LwM2M & MQTT?
https://www.youtube.com/watch?v=GaNag3-X5r4

Challenges of managing an IoT system at scale
- security
- interoperability
- constrained devices
- scalability
- availability

== OMA Lightweight M2M Protocol (OMA LWM2M)
https://www.youtube.com/watch?v=QZlvxDRG7wI
шикарный доклад про
- CoaP
- LwM2M
- IPSO
ABI (application binary interface - двоичный интерфейс приложений)
- использование регистров процессора
- состав и формат системных вызовов и вызовов одного модуля другим
- формат передачи аргументов и возвращаемого значения при вызове функции

EABI (embedded application binary interface - Бинарный интерфейс встраиваемых приложений)
- форматы файлов
- типы данных
- способы использования регистров
- организацию стека
- соглашение о вызове функций

EABI в отличие от ABI в ОС общего назначения
- в коде допускаются привилегированные команды,
- динамическое связывание (компоновка) не требуется (или запрещена),
- используется более компактная организация стека (в целях экономии памяти)


https://ru.wikipedia.org/wiki/%D0%94%D0%B2%D0%BE%D0%B8%D1%87%D0%BD%D1%8B%D0%B9_%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D1%84%D0%B5%D0%B9%D1%81_%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9