rustasync / team

A point of coordination for all things Rust and Async
https://rustasync.github.io/team/
MIT License
224 stars 29 forks source link

Network/distribution layer required before web framework. #64

Closed ghost closed 5 years ago

ghost commented 6 years ago

Take the simple example of an 'banking' website with digital currency accounts. I think this is a reasonable example of the kind of project that should be solvable in a language like Rust.

Unfortunately, creating 'just' a web framework will go nowhere near providing the ecosystem needed to build such a system. The most serious problems are not in the web framework level, but in the networking ecosystem. There are fundamental networking problems that need to be solved:

1. Fault tolerance.
2. Security.
3. Miscellaneous networking issues  such as long-running programs, speed, scalability, easily joining with other systems together across the network.
4. Indepdence from operating system concurrency.

Both Rocket and Actix go some way to solving these problems. Rocket is designed particular with security in mind. Actix is built on the actor distributed model. But to fundamentally solve these problems we need to look at, as a starting point, existing, successful solutions to these problems.

The best example I can think of is Erlang's OTP. I haven't had any experience with it personally, but it's designed specifically for fault-tolerance and has proven itself over many years. I don't know enough about if from a security point of view. Its relatively independent of operating system concurrency - it runs on its own virtual machine, in a single process that can spawn tens of thousands of message-passing actors.

Anyway, I think before a web framework is even considered, a distributed/network ecosystem is required. Otherwise, web frameworks in Rust would be constrained to rather ordinary web framework solutions on par with any scripting language that cannot offer the necessary fault tolerance and security capability.

Thomasdezeeuw commented 6 years ago

Well I'm writing an actor system that in heavily inspired by Erlang. It doesn't (yet) have all of the features, but it's progressing. That is to say I'm also interest in the area, but not specific to banking.

DoumanAsh commented 5 years ago

First off you need to define these terms:

Fault tolerance.

Security.


Indepdence from operating system concurrency.

It can only be achieved with co-routines which are not yet stable