Thread

From Friend2Friend Wiki

Jump to: navigation, search

Any soft node may have multiple simultaneous threads, which are the class of F2F computation above the individual request. The main content of a thread is an XML document, which usually contains requests that are processed in turn. According to the servicereq processing model, once a request is processed, it is swapped out with its result.

When a thread has no remaining live requests, it terminates and sends a 'term' packet to its parent, it any. This is usually a thread at another soft node, but may be a process at the same soft node.

Ephemeral threads

Threads also carry uid information, and so since this can change for privileged services, they need a separate thread in which to run. Threads which exist only temporarily are called ephemeral threads, and are different only in the fact that, because they are so short lived, they can send communications, but cannot wait for the reply.

Addressing threads

All threads are allocated an id by their soft-node. This, together with the node's id uniquely identifies each thread in a soft-system. Exec filters have ephemeral threads, which are unaddressable as explained above, but message filters have normal threads, which are supplemented by a set of filter attributes which describe the location of the thread (position, direction and step).

References

Personal tools