From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rohan Prinja Subject: Re: [GSoC] Introduction + question about dmd Date: Fri, 6 Mar 2015 00:31:31 +0530 Message-ID: References: <87mw3ryay0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113992dc2733da05108f32cb Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTb1Z-0005IG-UC for guix-devel@gnu.org; Thu, 05 Mar 2015 14:01:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTb1Y-0003zq-A5 for guix-devel@gnu.org; Thu, 05 Mar 2015 14:01:33 -0500 Received: from mail-yh0-x229.google.com ([2607:f8b0:4002:c01::229]:35312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTb1Y-0003zg-5K for guix-devel@gnu.org; Thu, 05 Mar 2015 14:01:32 -0500 Received: by yhnv1 with SMTP id v1so10009386yhn.2 for ; Thu, 05 Mar 2015 11:01:31 -0800 (PST) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Jonas Rebmann Cc: guix-devel@gnu.org --001a113992dc2733da05108f32cb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Jonas, I have no problems with teaming up. Like you, this project is my foremost focus for GSoC but I'm also looking at other/related projects. Let's wait for Ludo to confirm/deny that we are allowed to team up. Regards, Rohan On 5 March 2015 at 19:14, Jonas Rebmann wrote: > Hi, > > I contacted Ludo about the DHCP client just before I noticed this > conversation. I'm interested in making it my gsoc project as well. > I'm an undergraduate in computer science in Germany, I'm a bit into free > software and I'm especially interested in making my gsoc for the gnu > project. > Would it be possible to team up on this project? > Other project ideas for guix/dmd are very welcome. > I'll be waiting for Ludovics reply and see what other project ideas might > be interesting for me. > > Kind regards, > Jonas > > 2015-03-05 11:51 GMT+01:00 Ludovic Court=C3=A8s : > >> Hello! >> >> Rohan Prinja skribis: >> >> > The project I'm interested in working on for GNU GSoC this year is to >> > implement a DHCP client library in Guile. The end result, as I discuss= ed >> > with Ludovic, would be a package installable via Guix. This would make >> > available a command roughly equivalent to ISC's dhclient. The library >> > should also implement a service that dmd can run. >> >> Specifically, the library=E2=80=99s functionality should be available in= a way >> that makes it easy to integrate in some event loop. >> >> > Things I've done so far - read the dmd manual, started learning Guile >> (I've >> > programmed in Racket before, but not Guile), reading up on the DHCP >> > protocol, and started looking at ISC's implementation of dhclient (I >> used >> > the one obtained by apt-get source isc-dhcp-client). >> >> (Alternately, you can get it with =E2=80=98guix build -S isc-dhclient=E2= =80=99. ;-)) >> >> This is a good start. You might want to look at >> more than at the actual >> implementation. >> >> > @Ludovic: continuing our discussion - could you please explain what yo= u >> > mean by the dmd event loop? I searched in the manual as well the dmd-0= .2 >> > source but couldn't find any reference to it. Is this something planne= d >> to >> > be added to dmd? How will it look like? >> >> It=E2=80=99s something planned. Basically dmd has to react to various e= vents; >> currently, the only events that happen in practice are SIGCHLD, >> connections made by the client programs (=E2=80=98deco=E2=80=99, =E2=80= =98reboot=E2=80=99, etc.), and >> commands sent on open connections by these clients. >> >> Currently, in lieu of an full-blown even loop, there=E2=80=99s just this= naive >> loop in the (dmd) module: >> >> (let next-command () >> (match (accept sock) >> ((command-source . client-address) >> (process-connection command-source)) >> (_ #f)) >> (next-command)) >> >> That doesn=E2=80=99t scale well and isn=E2=80=99t safe though, because a= client could >> wait forever and thus lead dmd to wait forever as well (although that=E2= =80=99s >> slightly beyond the adversary model we would think of.) >> >> More importantly, we would like dmd to be able to handle other kinds of >> events. For instance, I would like it to run a =E2=80=9CREPL server=E2= =80=9D (info >> "(guile) REPL Servers"); that means it will also have to check for >> events occurring on the REPL server socket. >> >> Other types of events could include network reconfigurations (which >> could be detected via a PF_NETLINK/NETLINK_ROUTE socket), device >> additions/removal, events related to the DHCP client process, etc. >> >> To be able to handle these events, dmd needs a usual event loop. It >> doesn=E2=80=99t have it yet, but that=E2=80=99s something I=E2=80=99m pl= anning to add (I say =E2=80=9CI=E2=80=9D >> but anyone reading this message is welcome to help ;-)). >> >> Does it clarify things a bit? >> >> Thanks, >> Ludo=E2=80=99. >> >> > --001a113992dc2733da05108f32cb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Jonas,

I have no problems w= ith teaming up. Like you, this project is my foremost focus for GSoC but I&= #39;m also looking at other/related projects. Let's wait for Ludo to co= nfirm/deny that we are allowed to team up.

Regards,
R= ohan

On 5 March 2015 at 19:14, Jonas Rebmann <jonas.rebmann@googlem= ail.com> wrote:
Hi,

I contac= ted Ludo about the DHCP client just before I noticed this conversation. I&#= 39;m interested in making it my gsoc project as well.
I'm an undergraduate in computer science in Germany, I&= #39;m a bit into free software and I'm especially interested in making = my gsoc for the gnu project.
Would it = be possible to team up on this project?
Other project ideas for guix/dmd are very welcome.
I'll be waiting for Ludovics reply and see what other pr= oject ideas might be interesting for me.

Kind regards,
Jonas

2015-03-05 11:51 GMT+01:00 Ludovic Court= =C3=A8s <ludo@gnu.org>:
Hello!

Rohan Prinja <rohan.prinja@gmail.com> skribis:

> The project I'm interested in working on for GNU GSoC this year is= to
> implement a DHCP client library in Guile. The end result, as I discuss= ed
> with Ludovic, would be a package installable via Guix. This would make=
> available a command roughly equivalent to ISC's dhclient. The libr= ary
> should also implement a service that dmd can run.

Specifically, the library=E2=80=99s functionality should be available in a = way
that makes it easy to integrate in some event loop.

> Things I've done so far - read the dmd manual, started learning Gu= ile (I've
> programmed in Racket before, but not Guile), reading up on the DHCP > protocol, and started looking at ISC's implementation of dhclient = (I used
> the one obtained by apt-get source isc-dhcp-client).

(Alternately, you can get it with =E2=80=98guix build -S isc-dhclient=E2=80= =99.=C2=A0 ;-))

This is a good start.=C2=A0 You might want to look at
<http= s://www.ietf.org/rfc/rfc2131.txt> more than at the actual
implementation.

> @Ludovic: continuing our discussion - could you please explain what yo= u
> mean by the dmd event loop? I searched in the manual as well the dmd-0= .2
> source but couldn't find any reference to it. Is this something pl= anned to
> be added to dmd? How will it look like?

It=E2=80=99s something planned.=C2=A0 Basically dmd has to react to various= events;
currently, the only events that happen in practice are SIGCHLD,
connections made by the client programs (=E2=80=98deco=E2=80=99, =E2=80=98r= eboot=E2=80=99, etc.), and
commands sent on open connections by these clients.

Currently, in lieu of an full-blown even loop, there=E2=80=99s just this na= ive
loop in the (dmd) module:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let next-command ()
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (match (accept sock)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((command-source . client-= address)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(process-connection = command-source))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (_ #f))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (next-command))

That doesn=E2=80=99t scale well and isn=E2=80=99t safe though, because a cl= ient could
wait forever and thus lead dmd to wait forever as well (although that=E2=80= =99s
slightly beyond the adversary model we would think of.)

More importantly, we would like dmd to be able to handle other kinds of
events.=C2=A0 For instance, I would like it to run a =E2=80=9CREPL server= =E2=80=9D (info
"(guile) REPL Servers"); that means it will also have to check fo= r
events occurring on the REPL server socket.

Other types of events could include network reconfigurations (which
could be detected via a PF_NETLINK/NETLINK_ROUTE socket), device
additions/removal, events related to the DHCP client process, etc.

To be able to handle these events, dmd needs a usual event loop.=C2=A0 It doesn=E2=80=99t have it yet, but that=E2=80=99s something I=E2=80=99m plann= ing to add (I say =E2=80=9CI=E2=80=9D
but anyone reading this message is welcome to help ;-)).

Does it clarify things a bit?

Thanks,
Ludo=E2=80=99.


--001a113992dc2733da05108f32cb--