Skip to content

Commit

Permalink
Split Step 3.12 about backend development into separate Step 4 section
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed May 26, 2023
1 parent 1fe9ceb commit 24357c3
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 24 deletions.
20 changes: 3 additions & 17 deletions 3_ecosystem/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Step 3: Ecosystem
=================

__Estimated time__: 5 days
__Estimated time__: <!-- TODO --> days

These steps describe common crates and tools in [Rust] ecosystem required for web backend development.

Expand All @@ -19,35 +19,21 @@ Before completing this step you should complete all its sub-steps. After doing t
- Why multithreading is required for [Rust] programs and what problems does it solve? How threads concurrency differs with parallelism? How can I parallelize code in [Rust]?
- What is asynchronicity and what problems does it solve? How is it compared to threads concurrency? What is [Rust] solution for asynchronicity and why it has such design?
- What are actors? When are they useful?
- What should I use for HTTP server implementation in [Rust], when and why?
- How should I interact with databases in [Rust] application and why? How can I organize migrations for my project?




## Task

Write simple [GraphQL] API server with the following data model:
- `User` has `id` (unique), `name` (unique) and `friends` (list of other `User`s) fields;
- `User` is able to authenticate with its `password`.

API requirements:
- Ability to register users;
- Ability to authenticate users;
- Ability to retrieve a single user and all its friends (without their friends) (should require authorization);
- Ability to add some user to friends list and remove from there (should require authorization).

Web frameworks, tools and database choices are up to you. Keep things simple to fit into dedicate time.
<!-- TODO -->

If you have enough time after implementing base requirements, consider to do the following for your solution:
- Provide migration for database schema (if possible);
- Add comprehensive documentation to you code;
- Add comprehensive documentation to your code;
- Cover your implementation with unit and E2E tests.





[BDD]: https://en.wikipedia.org/wiki/Behavior-driven_development
[GraphQL]: https://graphql.org/learn
[Rust]: https://www.rust-lang.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "step_3_12"
name = "step_4_1"
version = "0.1.0"
edition = "2021"
publish = false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Step 3.12: Web frameworks, databases, connection pools and ORMs
===============================================================
Step 4.1: Web frameworks, databases, connection pools and ORMs
==============================================================

__Estimated time__: 1 day

Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions 4_backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[package]
name = "step_4"
version = "0.1.0"
edition = "2021"
publish = false
39 changes: 39 additions & 0 deletions 4_backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Step 4: Backend
===============

__Estimated time__: 5 days

These steps describe common crates and tools in [Rust] ecosystem required for web backend development.

Before completing this step you should complete all its sub-steps. After doing them you should be able to answer the following questions:
- What should I use for HTTP server implementation in [Rust], when and why?
- How should I interact with databases in [Rust] application and why? How can I organize migrations for my project?
<!-- TODO -->




## Task

Write a simple [GraphQL] API server with the following data model:
- `User` has `id` (unique), `name` (unique) and `friends` (list of other `User`s) fields;
- `User` is able to authenticate with its `password`.

API requirements:
- Ability to register users;
- Ability to authenticate users;
- Ability to retrieve a single user and all its friends (without their friends) (should require authorization);
- Ability to add some user to friends list and remove from there (should require authorization).

Web frameworks, tools and database choices are up to you. Keep things simple to fit into dedicate time.

If you have enough time after implementing base requirements, consider to do the following for your solution:
- Provide migration for database schema (if possible);
- Add comprehensive documentation to your code;
- Cover your implementation with unit and E2E tests.




[GraphQL]: https://graphql.org/learn
[Rust]: https://www.rust-lang.org
3 changes: 3 additions & 0 deletions 4_backend/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Implement me!");
}
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ members = [
"2_idioms/2_*",
"3_ecosystem",
"3_ecosystem/3_*",
"4_backend",
"4_backend/4_*",
]
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Do not hesitate to ask your lead with questions, however you won't receive a con
- [ ] [2.4. Abstract type in, concrete type out][Step 2.4] (1 day)
- [ ] [2.5. Exhaustivity][Step 2.5] (1 day)
- [ ] [2.6. Sealing][Step 2.6] (1 day)
- [ ] [3. Ecosystem][Step 3] (5 days)
- [ ] [3. Ecosystem][Step 3] (<!-- TODO --> days)
- [ ] [3.1. Testing and mocking][Step 3.1] (1 day)
- [ ] [3.2. Declarative and procedural macros][Step 3.2] (1 day)
- [ ] [3.3. Date and time][Step 3.3] (1 day)
Expand All @@ -88,8 +88,8 @@ Do not hesitate to ask your lead with questions, however you won't receive a con
- [ ] [3.9. Command-line arguments, environment variables and configs][Step 3.9] (1 day)
- [ ] [3.10. Multithreading and parallelism][Step 3.10] (1 day)
- [ ] [3.11. Async I/O, futures and actors][Step 3.11] (2 days)
- [ ] [3.12. Web frameworks, databases, connection pools and ORMs][Step 3.12] (1 day)

- [ ] [4. Backend][Step 4] (5 days)
- [ ] [4.1. Web frameworks, databases, connection pools and ORMs][Step 4.1] (1 day)



Expand Down Expand Up @@ -124,7 +124,8 @@ Do not hesitate to ask your lead with questions, however you won't receive a con
[Step 3.9]: 3_ecosystem/3_9_cmd_env_conf
[Step 3.10]: 3_ecosystem/3_10_threads
[Step 3.11]: 3_ecosystem/3_11_async
[Step 3.12]: 3_ecosystem/3_12_web_db
[Step 4]: 4_backend
[Step 4.1]: 4_backend/4_1_web_db

[Awesome Rust]: https://github.com/rust-unofficial/awesome-rust
[Baby Steps]: http://smallcultfollowing.com/babysteps
Expand Down

0 comments on commit 24357c3

Please sign in to comment.