From Fedora Project Wiki

No edit summary
No edit summary
Line 88: Line 88:
}
}
}</pre>  
}</pre>  
#*4. Concurrency is a property of system which several jobs of different kind or same kind are executing simultaneously and it provides the ability to serve many clients at the same time. Parallelism is a form of computation in which different parts of large problems are executing simultaneously and it provides the ability to speed up single problem calculation process.


# Project Management
# Project Management

Revision as of 16:37, 18 May 2010

For information how to complete this form, refer to Summer Coding 2010 step-by-step for students.

Random list of application requirements

  1. Must include a schedule that was worked out with mentor
  2. Keep on eye on the Talk: page that is associated with the proposal page you create. Click on the discussion link on the top of your proposal page. The Talk: page is where mentors comment on your proposal.
  3. Make sure you have clicked on the watch link on the top of your proposal page(s) and Talk: page(s). Use the link to my preferences at the top of the page to set your Watchlist preferences to email you when changes are made.

About you

  1. What is your name?
    • Wang Fang
  2. What is your email address?
    • wangfangcs@gmail.com
  3. What is your wiki username?
    • wangfang
  4. What is your IRC nickname?
    • wangfang
  5. What is your primary language?
    • Chinese, second language English
  6. Where are you located, and what hours do you tend to work?
    • Hubei, China. UTC+08:00, 10:00 ~ 23:00 in UTC+08:00.
  7. Have you participated in an open-source project before? If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?

About the project

  1. Project information
    • The name of my project is CHASM. The idea page is https://fedoraproject.org/wiki/Summer_Coding_2010_ideas_-_CHASM.
    • CHASM stands for the Cryptographic-Hash-Algorithm-Secured Mirroring solution, and provides the following improvements to the current alternatives:
      • Uses SHA2 to uniquely identify files: Each file is stored by SHA2 and hard-linked into place on the filesystem.
      • Cache-aware transfer protocol: When an upstream and a downstream node synchronize, they take care not to invalidate the filesystem cache of the upstream in order to minimize disk writes.
      • Reduced latency: A trivial update will allow a node to compute what is out of date without any additional network traffic.
  2. Poject overview
  3. What will be done
    • Implementation of the peer-to-peer network protocol. This protocol resembles a "stateful HTTP" as one of our members put it. It takes into account the state of the upstream's pool and cache to allow clients to maximize throughput.
    • Implementation of a generic message-passing framework for Unix domain sockets(including the ability to end file descriptors easily).
    • Partial design and implementation of a peer-tracker protocol. Once the peer-to-peer protocol is complete we will be turning our attention to the peer-tracker protocol. We have not put nearly as much attention into this as the peer-to-peer protocol as it is less critical.
  4. Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?
  5. What is the timeline for development of your project? The Fedora Summer Coding work period is 11 weeks long, May 24 - August 9; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it's good to have a plan at the beginning so you have an idea of where you're headed.) Note that you should probably plan to have something "working and 90% done" by the midterm evaluation (July 5-12); the last steps always take longer than you think, and we will consider canceling projects that are not mostly working by then.
    • If your project development progresses differently so there is not 90% functionality by the mid-term, you must be in regular contact with your mentor about this. Your mentor must not be surprised about the state of your project when the mid-term comes.
    • If you are not progressed this far in mid-term, you must have a plan with your mentor to fix the situation.
  6. Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.

You and the community

  1. If your project is successfully completed, what will its impact be on the Fedora community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Fedora community, at least one of whom should be a Fedora Summer Coding mentor. Provide email contact information for non-Summer Coding mentors.
  2. What will you do if you get stuck on your project and your mentor isn't around?
  3. In addition to the required blogging minimum of twice per week, how do you propose to keep the community informed of your progress and any problems or questions you might have over the course of the project?

CHASM Evaluation

  1. System Coding
    • 1. In blocking IO, if there is no data to read or no resource to write, it will wait until resource is available. In non-blocking IO, it will return immediately and use some method to indicate the specifical error(in Linux, the errno will be EAGAIN). Most all network programs use non-blocking IO, especially the event-based programs. Some programs based on multi-thread or multi-process may use blocking IO.
    • 2. Benefits: threads provide a more natural abstraction for high-concurrency, convenient connection and resource management. Drawbacks: using a whole stack frame for each client costs memory, expensive synchronization with tricky locks, high context switch overhead.
    • 3. The correct code should be:
int main(int argc, char **argv)
{
	int sockfd;
	struct sockaddr_in addr;
	int addrlen = sizeof(addr);
	char buf[512], *p;
	int len, len2;
	sockfd = socket(PF_INET, SOCKDGRAM, 0);
	if (sockfd < 0)
	{
		/* An process can open 65535 file descriptions at most,	most 
		system can only use 1024 default and setrlimit can change the limit */
		exit(-1);
	}
	addr.sin_family = AF_INET;
	/* Network byte order is BigEndian, x86 and x64 are LittleEndian, 
	so we need to change the byte order */
	addr.sin_port = htons(port);
	addr.sin_addr.s_addr = htonl(host);
	if (bind(sockfd, &addr, addr_len) < )
	{
		/* If other process has already bind to this port, it will fail. */
		exit(-1);
	}
	/* UDP is not an connection-oriented prototol and does not need listen */
	//listen(sockfd, 5);
	while (1)
	{
		/* recvfrom and sendto return the number of characters received and sent. */
		len = recvfrom(sockfd, buf, 512, 0, &addr, &addr_len);
		for (p = buf; len > 0;)
		{
			len2 = sendto(sockfd, p, len, 0, &addr, addr_len);
			if (len2 < 0)
			{
				break;
			}
			else
			{
				len -= len2;
				p += len2;
			}
		}
	}
}
    • 4. Concurrency is a property of system which several jobs of different kind or same kind are executing simultaneously and it provides the ability to serve many clients at the same time. Parallelism is a form of computation in which different parts of large problems are executing simultaneously and it provides the ability to speed up single problem calculation process.
  1. Project Management
  2. Personal Background

Miscellaneous

  1. We want to make sure that you are prepared before the project starts
    • Can you set up an appropriate development environment?
    • Have you met your proposed mentor and members of the associated community?
  2. What is your t-shirt size?
  3. Describe a great learning experience you had as a child.
  4. Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?