aboutsummaryrefslogtreecommitdiff
path: root/doc/handbook/chapters/developer.texi
diff options
context:
space:
mode:
authorrexxnor <rexxnor+gnunet@brief.li>2019-01-30 18:49:50 +0100
committerrexxnor <rexxnor+gnunet@brief.li>2019-01-30 18:53:05 +0100
commite3f6a5c29d2ea1cef92e10f142b7883ee6347ca7 (patch)
treefc00cb008568945fd947dc86f24efde7b35aed63 /doc/handbook/chapters/developer.texi
parent404c9065789248a5eba44fb4bc320bfeaa988da6 (diff)
downloadgnunet-e3f6a5c29d2ea1cef92e10f142b7883ee6347ca7.tar.gz
gnunet-e3f6a5c29d2ea1cef92e10f142b7883ee6347ca7.zip
updated ascension documentation
Diffstat (limited to 'doc/handbook/chapters/developer.texi')
-rw-r--r--doc/handbook/chapters/developer.texi71
1 files changed, 57 insertions, 14 deletions
diff --git a/doc/handbook/chapters/developer.texi b/doc/handbook/chapters/developer.texi
index 2da262b34..a1b5583cb 100644
--- a/doc/handbook/chapters/developer.texi
+++ b/doc/handbook/chapters/developer.texi
@@ -8080,7 +8080,7 @@ This includes some of well known utilities, like "ping" and "nslookup".
8080@c %**end of header 8080@c %**end of header
8081 8081
8082This section discusses the challenges and problems faced when writing the 8082This section discusses the challenges and problems faced when writing the
8083ascension tool. It also takes a look at possible improvements in the future. 8083Ascension tool. It also takes a look at possible improvements in the future.
8084 8084
8085@menu 8085@menu
8086* Conversions between DNS and GNS:: 8086* Conversions between DNS and GNS::
@@ -8093,7 +8093,7 @@ ascension tool. It also takes a look at possible improvements in the future.
8093 8093
8094The differences between the two name systems lies in the details 8094The differences between the two name systems lies in the details
8095and is not always transparent. For instance an SRV record is converted to a 8095and is not always transparent. For instance an SRV record is converted to a
8096gnunet only BOX record. 8096GNS only BOX record.
8097 8097
8098This is done by converting to a BOX record from an existing SRV record: 8098This is done by converting to a BOX record from an existing SRV record:
8099 8099
@@ -8120,14 +8120,14 @@ example. Very important to note are the rname and mname keys.
8120 604800 ; expire 8120 604800 ; expire
8121 600 ) ; ttl 8121 600 ) ; ttl
8122# Recordline for adding the record 8122# Recordline for adding the record
8123gnunet-namestore -z example.com -a -n @ -t SOA -V rname=master.example.com \ 8123$ gnunet-namestore -z example.com -a -n @ -t SOA -V rname=master.example.com \
8124 mname=hostmaster.example.com 2017030300,3600,1800,604800,600 -e 7200s 8124 mname=hostmaster.example.com 2017030300,3600,1800,604800,600 -e 7200s
8125@end example 8125@end example
8126 8126
8127The transformation of MX records is done in a simple way. 8127The transformation of MX records is done in a simple way.
8128@example 8128@example
8129# mail.example.com. 3600 IN MX 10 mail.example.com. 8129# mail.example.com. 3600 IN MX 10 mail.example.com.
8130gnunet-namestore -z example.com -n mail -R 3600 MX n 10,mail 8130$ gnunet-namestore -z example.com -n mail -R 3600 MX n 10,mail
8131@end example 8131@end example
8132 8132
8133Finally, one of the biggest struggling points were the NS records that are found 8133Finally, one of the biggest struggling points were the NS records that are found
@@ -8136,9 +8136,47 @@ records for those so that gnunet-gns can resolve records for those domains on
8136its own. This requires migration of the DNS GLUE records as well, provided that 8136its own. This requires migration of the DNS GLUE records as well, provided that
8137they are within the same zone. 8137they are within the same zone.
8138 8138
8139The following two examples show one record with a GLUE record and the other one
8140does not have a GLUE record. This takes place in the 'com' TLD.
8141
8142@example
8143# ns1.example.com 86400 IN A 127.0.0.1
8144# example.com 86400 IN NS ns1.example.com.
8145$ gnunet-namestore -z com -n example -R 86400 GNS2DNS n example.com@@127.0.0.1
8146
8147# example.com 86400 IN NS ns1.example.org.
8148$ gnunet-namestore -z com -n example -R 86400 GNS2DNS n example.com@@ns1.example.org
8149@end example
8150
8151As you can see, one of the GNS2DNS records has an IP address listed and the
8152other one a DNS name. For the first one there is a GLUE record to do the
8153translation directly and the second one will issue another DNS query to figure
8154out the IP of ns1.example.org.
8155
8139A solution was found by creating a hierarchical zone structure in GNS and linking 8156A solution was found by creating a hierarchical zone structure in GNS and linking
8140the zones using PKEY records to one another. This allows the resolution of the 8157the zones using PKEY records to one another. This allows the resolution of the
8141nameservers to work within GNS while not taking control over unwanted zones. 8158name servers to work within GNS while not taking control over unwanted zones.
8159
8160Currently the following record types are supported:
8161@itemize @bullet
8162@item A
8163@item AAAA
8164@item CNAME
8165@item MX
8166@item NS
8167@item SRV
8168@item TXT
8169@end itemize
8170
8171This is not due to a technical limitation but rather a practical one. The
8172problem occurs with DNSSEC enabled DNS zones. As records within those zones are
8173signed periodically, and every new signature is an update to the zone, there are
8174many revisions of zones. This results in a problem with bigger zones as there
8175are lots of records that have been signed again but no major changes. Also
8176trying to add records that are unknown that require a different format take time
8177as they cause a CLI call of the namestore. Furthermore certain record types
8178need transformation into a GNS compatible format which, depending on the record
8179type, takes more time.
8142 8180
8143@node DNS Zone Size 8181@node DNS Zone Size
8144@subsubsection DNS Zone Size 8182@subsubsection DNS Zone Size
@@ -8162,11 +8200,17 @@ are still displayed when calling gnunet-namestore but do not resolve with
8162gnunet-gns. When doing incremental zone transfers this becomes especially 8200gnunet-gns. When doing incremental zone transfers this becomes especially
8163apparent. 8201apparent.
8164 8202
8203I estimate that the limit lies at about 200'000 records in a zone as this is
8204the limit that my machine is capable of adding within one hour. This was
8205calculated by running cProfile on the application with a zone of 5000 records
8206and calculating what abouts a much bigger zones with 8 million records would
8207take. This results in a nice metric of records migrated per hour.
8208
8165@node Performance 8209@node Performance
8166@subsubsection Performance 8210@subsubsection Performance
8167The performance when migrating a zone using the ascension tool is limited by a 8211The performance when migrating a zone using the Ascension tool is limited by a
8168handful of factors. First of all ascension is written in python3 and calls the 8212handful of factors. First of all ascension is written in Python3 and calls the
8169CLI tools of gnunet. Furthermore all the records that are added to the same 8213CLI tools of GNUnet. Furthermore all the records that are added to the same
8170label are signed using the zones private key. This signing operation is very 8214label are signed using the zones private key. This signing operation is very
8171resource heavy and was optimized during development by adding the '-R' 8215resource heavy and was optimized during development by adding the '-R'
8172(Recordline) option to gnunet-namestore. This allows to add multiple records 8216(Recordline) option to gnunet-namestore. This allows to add multiple records
@@ -8176,16 +8220,15 @@ The result of this was a much faster migration of TLD zones, as most records
8176with the same label have two name servers. 8220with the same label have two name servers.
8177 8221
8178Another improvement that could be made is with the addition of multiple threads 8222Another improvement that could be made is with the addition of multiple threads
8179when opening the gnunet CLI tools. This could be implemented by simply creating 8223when opening the GNUnet CLI tools. This could be implemented by simply creating
8180more workers in the program but performance improvements were not tested. 8224more workers in the program but performance improvements were not tested.
8181 8225
8182During the entire development of the ascension tool sqlite was used as a 8226During the entire development of Ascension sqlite was used as a database
8183database backend. Other backends need to be tested in the future. 8227backend for GNUnet. Other backends have not been tested yet.
8184 8228
8185In conclusion there are many bottlenecks still around in the program, namely the 8229In conclusion there are many bottlenecks still around in the program, namely the
8186signing process and the single threaded implementation. In the future a solution 8230signing process and the single threaded implementation. In the future a solution
8187that uses the c api would be cleaner and better. 8231that uses the C API would be cleaner and better.
8188
8189 8232
8190@cindex GNS Namecache 8233@cindex GNS Namecache
8191@node GNS Namecache 8234@node GNS Namecache