ݺߣ

ݺߣShare a Scribd company logo
Rust vs Go
March 15, 2017
@ BIC Lazio Roma Casilina
Rust champion: Enrico Risa
Go champion: Alessandro Mancini
Moderator: Claudio Capobianco
Create a page on the ip that returns an hello world.
Challenge #1
RESPONSE
(Rust|Go) is the best for you!
REQUEST
http://<host-ip>:5336/tasks
Return a JSON with a TODO list:
Challenge #2
RESPONSE
{
"owner": "(go|rust)",
"todolist": [
{
"task": "Buy a drone",
"done": true,
"id":1
}
]
}
REQUEST
GET http://<host-ip>:5336/tasks
Insert a new task in the TODO list:
Challenge #3
RESPONSE
{
"owner": "(go|rust)",
"todolist": [
{...},
{
"task": "Make drone flies",
"done": false,
"id":2
}
]
}
REQUEST BODY
{
"task": "Make drone flies"
}
REQUEST
POST http://<host-ip>:5336/tasks
Delete the first task.
Challenge #4
RESPONSE
{
"owner": "(go|rust)",
"todolist": [
{
"task": "Make drone flies",
"done": false,
"id":2
}
]
}
REQUEST
DELETE http://<host-ip>:5336/tasks/1
Handle an error gracefully.
Challenge #5
REQUEST
POST http://<host-ip>:5336/tasks
REQUEST BODY
{
"boom": "crash!"
}
REQUEST BODY
{
"ids" : [
1,2,3
]
}
Create a thread and handle async communication.
Challenge #6
REQUEST BODY
{
"all-done":true
}
REQUEST
POST http://<host-ip>:5336/tasks/close
mark as done specific tasks
mark as done all tasks

More Related Content

Rust vs. Go: qual il linguaggio pi adatto al tuo progetto?

  • 1. Rust vs Go March 15, 2017 @ BIC Lazio Roma Casilina Rust champion: Enrico Risa Go champion: Alessandro Mancini Moderator: Claudio Capobianco
  • 2. Create a page on the ip that returns an hello world. Challenge #1 RESPONSE (Rust|Go) is the best for you! REQUEST http://<host-ip>:5336/tasks
  • 3. Return a JSON with a TODO list: Challenge #2 RESPONSE { "owner": "(go|rust)", "todolist": [ { "task": "Buy a drone", "done": true, "id":1 } ] } REQUEST GET http://<host-ip>:5336/tasks
  • 4. Insert a new task in the TODO list: Challenge #3 RESPONSE { "owner": "(go|rust)", "todolist": [ {...}, { "task": "Make drone flies", "done": false, "id":2 } ] } REQUEST BODY { "task": "Make drone flies" } REQUEST POST http://<host-ip>:5336/tasks
  • 5. Delete the first task. Challenge #4 RESPONSE { "owner": "(go|rust)", "todolist": [ { "task": "Make drone flies", "done": false, "id":2 } ] } REQUEST DELETE http://<host-ip>:5336/tasks/1
  • 6. Handle an error gracefully. Challenge #5 REQUEST POST http://<host-ip>:5336/tasks REQUEST BODY { "boom": "crash!" }
  • 7. REQUEST BODY { "ids" : [ 1,2,3 ] } Create a thread and handle async communication. Challenge #6 REQUEST BODY { "all-done":true } REQUEST POST http://<host-ip>:5336/tasks/close mark as done specific tasks mark as done all tasks