Skip to content

[engine] Deprecate basic engine and make a better one #146

@zjkmxy

Description

@zjkmxy

After we unified the code of YaNFD and go-ndn, I think it is time to merge the implementation of PIT and FIB in the client library and the forwarder.

The existing client-side Trie is very simple but it needs effort to maintain.

// NameTrie is a simple implementation of a Name trie (node/subtree) used for PIT and FIB.
// It is slow due to the usage of TlvStr(). Subject to change when it explicitly affects performance.
type NameTrie[V any] struct {
val V
key string
par *NameTrie[V]
dep int
chd map[string]*NameTrie[V]
}

Also, BasicEngine had deadlock issue if one tries wait on anything in the data callback. Though it is resolved in 012f965, I think there is still space to improve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions