By extended period of time, I just meant that the bundle might need to get updated a few times (as location changes) before it is forwarded.

This process will likely not happen very frequently, so I'm hoping it won't be too inefficient to periodically pull specific bundles from storage and update them.

Would the high level flow be:

getStorage.get()
// modify bundle
// delete bundle from storage
getStorage.store()

Should I be raising a "dtn::core::BundleGeneratedEvent" ?

Thanks,
Tomasz


On Thu, May 8, 2014 at 2:25 AM, Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> wrote:
Am 01.05.2014 01:01, schrieb Tomasz Kalbarczyk:
> Thanks for the reply Johannes.
>
> I think I was a bit unclear during my previous explanation.
>
> It is possible that the bundle will be stored at the host for an
> extended period of time. As the location changes, I'd like to
> periodically grab the bundle from storage, modify the block, and then
> place it back in storage.

What do you mean by an extended period of time? The lifetime of the bundle?

> Is there any mechanism to do this from within the routingextension (or
> elsewhere) ?

At any time and any place you can load a bundle from the storage, delete
it and store the modified one again. Accessing the storage is possible
through the singleton instance of BundleCore. But doing that with all
bundles would not be efficient.

> I suppose I could maintain a separate data structure that records all of
> the entries that I need to remove, and then remove them all at once when
> the bundle is forwarded (during serialization), but I was hoping to
> avoid having to maintain this data structure since it seems inefficient
> and error prone.
>

--
Johannes