Advertisement
mamanegoryu1

Untitled

Dec 17th, 2018
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Please, find the test task below and inform us about the time you need to complete it:
  2.  
  3. Create a simple chat with CLI interface
  4.  
  5.  
  6. - Both client and server should be console apps. Users send messages to chat via stdin prompt
  7.  
  8. - Users must specify their names when joining chat
  9.  
  10. - Each message is broadcasted to all chat members
  11.  
  12. - Same user (identified by same name) can have multiple simultaneous clients running.
  13.  
  14. - Online status calculation: user is "online" when he/she has at least one client running, otherwise user is "offline".
  15.  
  16. - Server must notify all chat members when some user comes online or goes offline.
  17.  
  18.  
  19. Example output:
  20.  
  21. *** Alice is online
  22.  
  23. *** Bob is online
  24.  
  25. Alice: anybody home?
  26.  
  27. Bob: hi
  28.  
  29. *** Alice is offline
  30.  
  31.  
  32.  
  33. - Client and server part should be written using Golang
  34.  
  35. - Network protocol must be extensible. It should be possible to add new features in future.
  36.  
  37. - Clean, readable code. Simplicity is a plus
  38.  
  39. - All errors must be handled, some examples:
  40.  
  41. - network failures
  42.  
  43. - slow clients
  44.  
  45. - invalid messages (like attempt to send message on behalf of other user)
  46.  
  47. - etc
  48.  
  49.  
  50. Thank you and good luck! :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement