-
Notifications
You must be signed in to change notification settings - Fork 7
Session 17: Practice 6

- Time: 2h
- Date: Wednesday, March-25th-2020
-
Goals:
- Practicing with forms
- Practicing with servers
The goal of this practice is to develop the second version of the Seq server developed in practice 3, but using the HTTP python module instead of raw sockets and accessing to its services by means of forms
This table describe the names of the actions and their parameters
| Service name | Action | Argument | Response message | Description |
|---|---|---|---|---|
| PING | ping | none | OK. See exercise 1 | Ping service for testing if the server is alive of not |
| GET | "GET n" | n: 0-4 | A sequence | Get the sequence n. It could be any valid sequence of any length. There are only 5 sequences, numbered from 0 to 4 |
| INFO | "INFO seq" | seq: A sequence | See format below | Get information about the given sequence: total length, number of bases and their percentages |
| COMP | "COMP seq" | seq: A sequene | The complement sequence | Calculate the complement of the given sequence |
| REV | "REV seq" | seq: A sequence | The reverse sequence | Calculate the reverse of the given sequence |
| GENE | "GENE name" | Gene name. See format below | The sequence of the gene | Get the complete sequence of the given GENE |
The response message returned by the INFO service should be like this example:
Sequence: ATAGACCAAACATGAGAGGCT
Total length: 21
A: 9 (42.9%)
C: 4 (19.0%)
G: 5 (23.8%)
T: 3 (14.3%)
The names of the genes that are valid when calling the GENE service are: U5, ADA, FRAT1, FXN, RNU6_269P
The server will be programmed step by step, following the guides given in the exercises
As always, we will develop this server step by step, in the Seq2-server.py file. It will be extended in every exercise (but working on the same file)
Implement the ping service in the server. It should return a response message with a page saying that the server es alive. It should include a link to the main page. If a different resource is requeste, and Error web page is returned
- Server Filename: P6/Seq2-server.py
- HTML file: P6/form-1.html
- HTML file: P6/Error.html
In this animation you can see it working:

The session is finished. Make sure, during this week, that everything in this list is checked!
- You have all the items of the session 14 checked!
- Your working repo contains the P5 Folder with the following files:
- info/A.html
- info/C.html
- info/G.html
- info/T.html
- Error.html
- index.html
- Bases2-webserver.py
- All the previous files have been pushed to your remote Github repo
- Juan González-Gómez (Obijuan)

- Alvaro del Castillo. He designed and created the original content of this subject. Thanks a lot :-)

S0: Introduction
S1: Tools I
S2: Tools II
S3: Practicing with the tools
S8: Client-Server-1
S9: Client-Server-2
S10: Client-server-3
S11: Client-server-4
S12: HTTP protocol-1
S13: HTTP protocol-2
S14: HTTP module
S15: HTTP module
S16: HTML forms
S17: HTML forms