Re: Incomplete first draft of my GSoC proposal

2015-03-15 Thread Ludovic Courtès
Rohan Prinja rohan.pri...@gmail.com skribis:

 Thank you, this helped. I've updated my proposal accordingly.

Great.

 Regarding DHCPv6: I read up on RFC 3315 and took notes. As you said, I feel
 that v6 should be kept as a bonus. The two protocols have a lot in common
 but v6 has enough extensions and additions to merit being a separate
 sub-project. When making the timeline, I'll make sure to structure the
 weekly deliverables in such a way as to leave a large enough buffer period
 to accomodate v6.

OK, sounds good!

Thank you,
Ludo’.



Re: Incomplete first draft of my GSoC proposal

2015-03-14 Thread Rohan Prinja
Thank you, this helped. I've updated my proposal accordingly.

Regarding DHCPv6: I read up on RFC 3315 and took notes. As you said, I feel
that v6 should be kept as a bonus. The two protocols have a lot in common
but v6 has enough extensions and additions to merit being a separate
sub-project. When making the timeline, I'll make sure to structure the
weekly deliverables in such a way as to leave a large enough buffer period
to accomodate v6.


Re: Incomplete first draft of my GSoC proposal

2015-03-10 Thread Ludovic Courtès
Rohan Prinja rohan.pri...@gmail.com skribis:

 Project name
 

 Implementing a DHCP client in Guile Scheme

 Summary
 ---

 We want to have a DHCP client written in Guile Scheme. Specifically:
 1. The implementation will comply with IETF RFC 2131 [1]
 2. The client will be bundled as a Guix package [2], which installs a 
 command-line program similar to ISC’s dhclient (8) utility. [4,5]

“Similar to ISC’s dhclient” includes things like being able to store
leases in persistent storage. reusing them when the DHCP server does not
respond, and automatically handling lease renewal upon expiration.

ISC’s dhclient supports DHCPv6 as well.  The library must be designed
with the ability to support DHCPv6 in mind–that is, DHCPv4 assumptions
must not be hardwired.  As I wrote before, it would be wonderful if you
could implement it, but the priority should be DHCPv4 and the basic
client functionality.

Perhaps these points can be clarified in the proposal.

 3. The client code should be modular, so that some of its functions can be 
 invoked from within GNU dmd’s [6] proposed event loop.
 4. The client should be runnable as a dmd service, as described in the dmd 
 manual [6]

Perfect.

 Benefits
 

 Currently the only DHCP client implementation in the Guix package list is the 
 ISC implementation, which is written in C. The aim of this project is to 
 deliver a Guile Scheme implementation of a DHCP client satisfying the 
 conditions outlined in the abstract. The motivation for this is that GNU dmd 
 should be able to easily call DHCP library functions from its event handlers 
 in response to various network events. Since dmd is written in Guile Scheme, 
 we want our DHCP library to be written in Guile Scheme as well.

 How users benefit: this project is related to dmd gaining an event loop so 
 that it can properly handle events - including DHCP events - rather than 
 simply waiting for the client. dmd performing faster and better is a win for 
 the user.

To be clear, the DHCP client library is useful independently of dmd (and
of Guix actually.)  The dmd service is GuixSD is the main use case
though, obviously.

 Deliverables
 

 1. A module written in Guile Scheme, implemeting RFC 2131.
 2. A command-line program available as a Guix package, which calls the 
 module's functions.
 3. A dmd service for the DHCP client.
 4. (TODO: discuss this with Ludo) Integration of the module with dmd's event 
 loop.

Sounds good to me.

#4 is quite broad, but this is fine IMO: it may involve work on the dmd
side, as well as on the GuixSD side, which is where services are defined
(see ‘dhcp-client-service’ in gnu/services/networking.scm in Guix.)

Thank you!

Ludo’.



Incomplete first draft of my GSoC proposal

2015-03-09 Thread Rohan Prinja
Hi Guix,

PFA an incomplete first draft of my GSoC proposal for a DHCP client for
Guix and dmd. Please take a look, thank you in advance! I've tried to
conform to the GNU proposal guidelines:
http://www.gnu.org/software/soc-projects/guidelines.html

The draft is incomplete because I've left out only the detailed timeline,
which I can only complete once  the deliverables are finalised :) Right now
I have a rough idea, but I would like your help telling me if the
deliverables I have proposed are too little, or too much, or too vague, as
well as pointing out any other issues with my proposal you can spot.

Thanks again,

-Rohan
Project name


Implementing a DHCP client in Guile Scheme

Summary
---

We want to have a DHCP client written in Guile Scheme. Specifically:
1. The implementation will comply with IETF RFC 2131 [1]
2. The client will be bundled as a Guix package [2], which installs a 
command-line program similar to ISC’s dhclient (8) utility. [4,5]
3. The client code should be modular, so that some of its functions can be 
invoked from within GNU dmd’s [6] proposed event loop.
4. The client should be runnable as a dmd service, as described in the dmd 
manual [6]

Communication
-

Name: Rohan Prinja
Email: rohan.pri...@gmail.com
IRC: wenderen
Github: wenderen
Mobile: +91 96190 19345
Country of residence: India
Timezone: IST (GMT +530)
Primary Language: English

Benefits


Currently the only DHCP client implementation in the Guix package list is the 
ISC implementation, which is written in C. The aim of this project is to 
deliver a Guile Scheme implementation of a DHCP client satisfying the 
conditions outlined in the abstract. The motivation for this is that GNU dmd 
should be able to easily call DHCP library functions from its event handlers in 
response to various network events. Since dmd is written in Guile Scheme, we 
want our DHCP library to be written in Guile Scheme as well.

How users benefit: this project is related to dmd gaining an event loop so that 
it can properly handle events - including DHCP events - rather than simply 
waiting for the client. dmd performing faster and better is a win for the user.

How GNU benefits: Guix SD gains an important daemon!

Deliverables


1. A module written in Guile Scheme, implemeting RFC 2131.
2. A command-line program available as a Guix package, which calls the module's 
functions.
3. A dmd service for the DHCP client.
4. (TODO: discuss this with Ludo) Integration of the module with dmd's event 
loop.

High-level plan
---

This project involves writing a library more or less from scratch. So designing 
and discussing the structure of the library with knowledgeable community 
members is a prerequisite. I've tried to keep this task before the actual GSoC 
period, because I want to reserve the GSoC period for writing code, code review 
and committing.

I propose the following high-level timeline:

Pre-GSoC Period (before May 25)
* Environment setup, finish all background reading
* Design client library API
* Design command-line program along the lines of dhclient

GSoC Period (May 25 - Aug 9)
* Write a stubbed DHCP client module which exports skeleton functions (for 
example, a skeleton function might simply print to stdout). This will include:
- functions for constructing and sending over a network DHCP packets 
compliant with the RFC.
- functions that handle client logic, like transitioning between states in 
the DHCP client FSM [8].
- functions for manipulating the local store.
* Write the command-line program and call the module's functions from within it.
* Patch dmd with a bare-bones event loop so that we can test events related to 
the DHCP client process.
* Call the module's functions from within the event loop and ensure that the 
functions are being invoked correctly.
* Fill the stubs! This involves making use of Guile Scheme's networking library 
[7] and referring to the dhclient source [4].
* Re-test the command-line program and the integration with dmd's event loop 
after the stubs are filled in.
* Create and test a dmd service for the client.

Buffer period (Aug 17 - Aug 23)
* If the event loop is implemented in parallel by some other community member, 
merge their implementation with my changes and re-test

Detailed plan + Midterm evaluation
--

TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO
0. Pre GSoC period: April 27 - May 25
1. May 25 - May 31
2. June 1 - June 7
3. June 8 - June 14
4. June 15 - June 21
5. June 22 - June 28
6. June 29 - July 5
7. July 6 - July 12
8. July 13 - July 19
9. July 20 - July 26
10. July 27 - Aug 2
11. Aug 3 - Aug 9
12. Aug 10 - Aug 16
13. Aug 17 - Aug 23
TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO

References
--

[1] RFC 2131: https://www.ietf.org/rfc/rfc2131.txt
[2] Guix package manager: http://www.gnu.org/s/guix
[3] List of available Guix packages: 
http://www.gnu.org/software/guix