Challenge Overview

Project Overview

You may remember Go learning challenge series: http://www.topcoder.com/challenge-details/30046224/?type=develop&noncache=true

Now we began the real project with Go language!

The client is a leading cloud-based security provider in Japan. 

In this project, we will develop a mail proxy server which talks to POP/IMAP servers and MUA(Mail Client Software).

Competition Task Overview

In this challenge, we're going to merge the code we've done in previous challanges and make it ready for release.

Requirements & Notes

Must have requirements

  • Assemble the challenge deliverables (POP full, IMAP and OAuth) into the single deliverable. Instead of merging zip files by hand, you should basically merge the files using git commands and test the functionality.
  • SSL support for POP; you may or may not use the code of challenge-popmin-2nd branch.
  • Merge the documents. We would like to have a single Deployment Guide.doc.
  • Multi domain / multi service accounts support; The current implementation only supports a single service account.

Optional requirements

  • Performance improvement to work with 1,000 messages on Thunderbird
    • ���When there are 1,000 messages in the mail box, you cannot read mail with Thunderbird via POP3. It looks it takes more than 5 minutes to complete the LIST command. Looking into the source, we found a place you can improve the performance.
      • ���-hypothesis: It seems that the proxy is currently issuing a FETCH command for each message to get its sizes.  e.g.) if there are 1000 messages, 1000 FETCHes are issued.
      • -idea: You can fetch the size of every messages at once with `FETCH 1:* (RFC822.SIZE)`. You can find extractMessageSize is called inside the loop in handleList.
      • Of course you can improve other area, too.
    • We are paying $150 extra prize for this requriement if you implement it in your submission!
  • Filter the response of IMAP CAPABILITY not to include unsupported AUTH commands; Here is the response from the google server, but we do not support some auth commands.
    • > IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN
    • We are paying $150 extra prize for this requriement if you implement it in your submission!
  • Max message count config value
    • ���Even you improve the performance of LIST command, you would not handle 10,000 or 100,000 messages on time without eating too much memory. To avoid that situation, we would like to have a global config value to restrict message size like the proxy ignores message more than 1000.
    • We are paying $75 extra prize for this requriement if you implement it in your submission!
  • Config flag to enable/disable the SSL connection from MUA, something like "AcceptConnection": {"ssl": true, "non-ssl": false} in server.conf. It can be global settings, as we would like to use this flag for testing purpose.���
    • We are paying $75 extra prize for this requriement if you implement it in your submission!

Testing

You must test your solution to make sure all test scenarios work properly after merging the code. You can record and attach some application log between the servers in the submission to proof it. You can find the test scenario in the forum.

Dev Process

We're going to use gitlab for this project and we'll follow the following process:

  1. ���We push the original source tree to the private repository and create a challenge to update it (we'll provide link to source tree in forum)
  2. You should request access to it in the forum by providing your gitlab username. We will add you as "Developer" to the repo
  3. You can fork our tree and make updates to your local branch. You must add tiwasaki and huangqun as "Master" to your private branch
  4. You must submit the branch name on topcoder.  You should NEVER make a merge request because it can be visible to other registrants
  5. The reviewers are added as "Reporter they review your submission based on the code in the branch and score the submission
  6. Once winner is selected, the winner will need to fix all issues found in review and submit a pull/merge request
  7. The winner will also help with merging in case of conflicts

Code Guidelines

Follow practices mentioned in the articles below:

  • http://golang.org/doc/effective_go.html
  • https://code.google.com/p/go-wiki/wiki/CodeReviewComments#Go_Code_Review_Comments

The client has a following naming conventions:

  • Use ‘lower_case_with_underscore’ name for package, file or directory. However, try to avoid underscores and prefer short names.

External Libraries

If you would like to use external libraries please follow the guidelines below:

  • Do not use libraries developed with languages other than Golang
  • Do not use GPL libraries and LGPL libraries
  • MIT, Apache and BSD libraries are fine
  • Please mention about external libraries you used in your README

Code Design

We will enhance the code in future challenges and so your code should prepare for it (which is related to scorecard question 1.1.6).

We'll have the following implemented in the future:

  • Performance improvement
  • Filter the response of IMAP CAPABILITY not to include unsupported AUTH commands
  • Max message count config value
  • Config flag to enable/disable the SSL connection from MUA for EACH domain
  • Other MUA support (iOS Mail.app, Outlook 2013, Android Mail)

Scorecard

We are using a custom scorecard for this challenge.

Test Code

- You should write at least one unit test file (*_test.go) for each go file. Any test script must be written in go.
- Functional test which follows the test scenario with go file.
- It should cover more than 75% code (You can measure it with `go test -cover`)

Technology Overview

  • Go
  • Mail protocols (IMAP / POP)
  • OAuth
  • Google Apps Mail

Documentation Provided

Register to see resources in the challenge forum.



Final Submission Guidelines

Submission Deliverables

  • Source code (Format your code with ‘gofmt’ command)
  • Test code (*_test.go).
  • Deployment Guide.doc to explain your deliverables and how to setup your submission and verify the features. This file should be included in your own gitlab repo.

Final Submission

For each member, the private gitlab repo / branch name and link must be uploaded via the challenge detail page on topcoder.com

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30046624