[swift-server-dev] Another way of designing server side
antonvmironov at gmail.com
Sun Nov 6 16:10:10 CST 2016
The first goals for server side are building networking, security, and HTTP/WebSocket parsing. Core components are super important but they are just components. Adding those up will not guarantee success. So I just want to suggest to make the design in another way. It is a little bit trickier but is much more efficient.
I consider multiple levels of design:
1. Swift ideology: safe, fast, expressive.
2. A basic set of designing rules on top of an ideology. For example (you might completely disagree with all of them, but these are just an example):
- prefer a functional approach (purity, lambdas, monads and etc)
- prefer a reactive approach
- carefully consider use of class inheritance
- mutability only when you need it
- build APIs that are hard to break or use in a not intended way
I really miss these. On my opinion, the basic set of rules must be well discussed, written down, made public.
3. System architecture (of server side or anything else) on top of the basic set of designing rules. I assume that there is one for server side somewhere. I suggest making it more visible.
4. Design of components and tools. I think that networking, security, and HTTP/WebSocket parsing are on this level.
Each level may not be engraved in concrete and must be reconsidered iteratively (maybe except for the first one).
So what do you think?
More information about the swift-server-dev