https://github.com/apache/trafficserver/pull/4110
I have also written a hashtable, intended to be an atomic map and contain
atomic elements. read/write concurrency is handled per member of elements
with AcidPtr.

In your example "if the object has an FQDN and an IP address" then both
tables contain shared_ptr to an atomic element (aka Extendible) and both
have access to read/write individual fields.


On Mon, Aug 13, 2018 at 2:55 PM Alan Carroll
<solidwallofc...@oath.com.invalid> wrote:

> You can use a layered approach to multi-index, but seems more complex than
> an intrusive container. A potential issue with that is having to duplicate
> members for keys. For instance, if the object has an FQDN and an IP address
> for keys, then if the second table uses IP address, this information isn't
> available when accessing through the first container, unless it's
> duplicated. Possible, but more expensive and error prone.
>
> The external memory management is a pre-existing condition. It also
> requires all uses of the container to remember to use this specific and
> less common access pattern. I would consider that not as easy to use and
> more prone to mistakes.
>
> On Mon, Aug 13, 2018 at 2:28 PM Walt Karas <wka...@oath.com.invalid>
> wrote:
>
> > "external memory management" can't be addressed more generally with
> > move constructors of table elements and emplace rather than insert?
> >
> > On Mon, Aug 13, 2018 at 2:23 PM, Walt Karas <wka...@oath.com> wrote:
> > > A layered approach to multiple indexes is to have all or all but one
> > > table contain pointers to the contained objects.
> > >
> > > On Mon, Aug 13, 2018 at 2:19 PM, Walt Karas <wka...@oath.com> wrote:
> > >> I was fooling with one writer / multi reader some for any data
> > >> structure.  Another twist to it is to have two copies of the data
> > >> structure.  You have to make updates twice, the advantage being there
> > >> is always a coherent version of the data structure available for
> > >> reading.
> > >>
> > >> http://coliru.stacked-crooked.com/a/1074bd17521d6587
> > >>
> > >>
> > >> On Mon, Aug 13, 2018 at 1:28 PM, Alan M. Carroll
> > >> <a...@network-geographics.com> wrote:
> > >>> I've written up some of my notes and thoughts on hash containers and
> > how to proceed here -
> > https://solidwallofcode.github.io/notes/hash-table.en.html
> > >>>
> > >>> Please respond to this email string if you have comments of your own.
> > >>>
> >
>
>
> --
> *Beware the fisherman who's casting out his line in to a dried up
> riverbed.*
> *Oh don't try to tell him 'cause he won't believe. Throw some bread to the
> ducks instead.*
> *It's easier that way. *- Genesis : Duke : VI 25-28
>


-- 
Aaron Canary
ATS - Senior Software Engineer

Reply via email to