BIND 10 #2097: Define and Implement RdataSet class (was: Define and Implement `RdataSet` class)
BIND 10 Development
do-not-reply at isc.org
Sat Jun 30 07:34:57 UTC 2012
#2097: Define and Implement RdataSet class
-------------------------------------+-------------------------------------
Reporter: | Owner:
jinmei | Status: new
Type: task | Milestone: Next-Sprint-
Priority: | Proposed
medium | Resolution:
Component: data | Sensitive: 0
source | Sub-Project: DNS
Keywords: | Estimated Difficulty: 0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
scalable inmemory |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Description changed by jinmei:
Old description:
> As proposed in
> http://bind10.isc.org/wiki/InMemoryZoneDesign#a4.2.RdataSetstructure.
>
> With the help of separate encoder, this class will be actually pretty
> simple.
>
> {{{#!cpp
> struct RdataSet {
> // Constructor (again, we may need RRClass too).
> RdataSet(dns::RRType type, dns::RRTTL ttl, uint16_t n_rdata,
> bool with_sig);
>
> // allocator and deallocator so we can create it from a memory
> segment.
> // allocate() will use RdataEncoder, adding RDATA of rrset and
> sig_rrset,
> // allocate memory, and pass the region to its encode().
> static RdataSet* allocate(MemorySegment& segment,
> RdataEncoder& encoder,
> dns::ConstRRsetPtr rrset,
> dns::ConstRRsetPtr sig_rrset);
> static void deallocate(MemorySegment& segment, RdataSetPtr rdataset);
> }}}
>
> Depend on #2094 and #2095.
New description:
As proposed in
http://bind10.isc.org/wiki/InMemoryZoneDesign#a4.2.RdataSetstructure.
With the help of separate encoder, this class will be actually pretty
simple.
{{{#!cpp
struct RdataSet {
// Constructor (again, we may need RRClass too).
RdataSet(dns::RRType type, dns::RRTTL ttl, uint16_t n_rdata,
bool with_sig);
// allocator and deallocator so we can create it from a memory
segment.
// allocate() will use RdataEncoder, adding RDATA of rrset and
sig_rrset,
// allocate memory, and pass the region to its encode().
static RdataSet* allocate(MemorySegment& segment,
RdataEncoder& encoder,
dns::ConstRRsetPtr rrset,
dns::ConstRRsetPtr sig_rrset);
static void deallocate(MemorySegment& segment, RdataSetPtr rdataset);
}}}
Depend on #2094 and #2095.
The type of "(RR) type" member may better be of dns::RRType, instead
of uint16_t. At the risk of assuming its internal representation is
essentially a 16-bit integer, it will help avoid overhead of
constructing the type object in performance sensitive operation.
--
--
Ticket URL: <http://bind10.isc.org/ticket/2097#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list