Rust [Daily] 2019-06-05: actix-web 1.0 official release

actix-web 1.0 official release

#actix

actix-web 1.0 to 0.7, it is a more thorough reconstruction. Involving architecture redesign, abstract upgrade from the Actor further to the Service. For the code level, it is to use the Service replaced the previous Handler. 1.0 The code also completed follow Rust convention, component-based development, a large lump of code, compared to the 0.7 version, a lot of refreshing.

Let us focus Service abstraction, it is driven from the field of conceptual design (DDD, Domain Derive Development) of. DDD requires developers to build software based on the time domain model as the basic unit. Domain model-independent technology business with a high degree of abstraction, it is able to accurately describe the body of knowledge in the field. Developers need to learn how to build relationships with each other between the domain model, a complete field of architecture. The Service is the outer layer of specialized services provided to the domain model. Services are stateless, it only has a behavior.

actix-web reconstruct this, who can facilitate the development of better hierarchical design. Compared to the previous actor abstract, more intuitive. Of course, if you still like the previous actor abstract, it can be supported through actix_web_actors components.

Dependence level actix-web assembly should look like this: "(tokio && futures) -> actix-net / actix-rt -> acitx-net / other sub-crate -> actix-web." 0.7 actix-web based web actix realization of abstract, 1.0 actix-web, is directly canceled actix abstract, abstract replaced based Service actix-rt enhance performance. But if you want to use actix can, by actix-web components in support of an actor should be able to (visual reference examples in webscoket example of), refer to the following chart:

img

Read More


dargo: a cargo-edit tools like

#cargo #tool

Implemented by the national community DCjanus, and cargo-edit in comparison, it features a: dargo based check local crates index, basically can instantly upgrade the entire workspace. The cargo-edit tools like is through HTTP request ( direct access crates.io ) to check for the latest version.

So use dargo when the local index needs to be updated to ensure the latest version. The local index is updated much faster rate than http, but also domestic mirror is available. More suitable conditions.

dargo


Share slides from MIT Rust digital currency plan studio Day 1

#The #DigitalCurrencyInitiative


mft: NTFS Master File parsing library

#NTFS

mft


Sluice: one for the concurrent I / O and programming asynchronous byte buffer pipe

#IO #async

sluice currently released version 0.4 alpha, based in Rust async / await grammar

Sluice


FlatBuffers in use in Rust

#flatbuffers

FlatBuffers is Google's serialization format. It is in the reading and writing of data is very fast: faster than JSON or XML, and Google is usually faster than other formats (such as Protobuf). There are currently thirteen kinds of programming languages ​​that support it, including Rust.

FB account in the calculation time advantage, while PB is dominant in the memory space (compared to FB, which is the reason it calculates the time slower). Google claims FB for game development is justified, if care computing time it also applies to background development. protobuf more suitable for distributed computing.
Reference Source

Interested can read this tutorial to learn FlatBuffer and how to use it in Rust.

Read More


Construction of a continuous annular lock-free buffer

#lockFree #ringBuffer

This article (from Ferrous Systems) co-written by Andrea Lattuada (ETH Zurich PhD, ETH Zurich) and James Munns, explains how to design and implement (it contains two versions of realization, each implements a version) for High performance communication across threads without lock ring buffer.


From Daily Group @Chaos

Daily subscription address:

Independent daily subscription address:

Community learning platform subscription:

Guess you like

Origin blog.csdn.net/u012067469/article/details/90954864