class <Http/Cache/Inval/Mcast> HttpMInvalCache : public HttpInvalCache

Http cache with periodic multicast heartbeat invalidation

Inheritance:


Public Fields

Http/Cache/Inval/Mcast instvar creq_
Http/Cache/Inval/Mcast instvar hb_interval_
Http/Cache/Inval/Mcast instvar id_
Http/Cache/Inval/Mcast instvar invalListener_
Http/Cache/Inval/Mcast instvar invalSender_
Http/Cache/Inval/Mcast instvar invListenGroup_
Http/Cache/Inval/Mcast instvar invSndGroup_
Http/Cache/Inval/Mcast instvar marks_
Http/Cache/Inval/Mcast instvar mpush_refresh_
Http/Cache/Inval/Mcast instvar node_
Http/Cache/Inval/Mcast instvar ns_
Http/Cache/Inval/Mcast instvar parent_
Http/Cache/Inval/Mcast instvar pending_
Http/Cache/Inval/Mcast instvar tlcAgent_
Http/Cache/Inval/Mcast instvar tlcGroup_
Http/Cache/Inval/Mcast instvar TRANSPORT_
Http/Cache/Inval/Mcast instvar updListener_
Http/Cache/Inval/Mcast instvar updListenGroup_
Http/Cache/Inval/Mcast instvar updSender_
Http/Cache/Inval/Mcast instvar updSendGroup_

Public Methods

void add_inv(const char *name, double mtime)
Http/Cache/Inval/Mcast instproc cache-miss { cl type pageid }
Http/Cache/Inval/Mcast instproc cancel-mpush-refresh { page }
virtual int command(int argc, const char*const* argv)
Http/Cache/Inval/Mcast instproc get-req-notify { pageid }
Http/Cache/Inval/Mcast instproc get-request { cl type pageid args }
Http/Cache/Inval/Mcast instproc get-response-GET { server pageid args }
Http/Cache/Inval/Mcast instproc get-response-TLC { server pageid tlc }
void handle_node_failure(int cid)
HttpMInvalCache()
Http/Cache/Inval/Mcast instproc init args
Http/Cache/Inval/Mcast instproc init-inval-group { group }
Http/Cache/Inval/Mcast instproc init-update-group { group }
Http/Cache/Inval/Mcast instproc invalidate { pageid modtime }
void invalidate_server(int sid)
Http/Cache/Inval/Mcast instproc join-inval-group { group }
Http/Cache/Inval/Mcast instproc join-tlc-group { group }
Http/Cache/Inval/Mcast instproc join-update-group { group }
Http/Cache/Inval/Mcast instproc leave-update-group {}
Http/Cache/Inval/Mcast instproc parent-cache { server }
virtual void process_data(int size, AppData* data)
Http/Cache/Inval/Mcast instproc push-update { pageid args }
Http/Cache/Inval/Mcast instproc refetch { cl type pageid }
Http/Cache/Inval/Mcast instproc refresh-mpush { page }
Http/Cache/Inval/Mcast instproc request-mpush { page }
Http/Cache/Inval/Mcast instproc send-refresh-mpush { cache page }
Http/Cache/Inval/Mcast instproc send-req-notify { pageid }
Http/Cache/Inval/Mcast instproc server-join { server cache }
Http/Cache/Inval/Mcast instproc set-parent { parent }
Http/Cache/Inval/Mcast instproc setup-unicast-hb {}
Http/Cache/Inval/Mcast instproc stop-mpush { page }
virtual void timeout(int reason)
virtual ~HttpMInvalCache()

Protected Classes

struct SState
Maintaining SState(Server, NextCache) Use the shadow names of server and cache as id
SState(NeighborCache* c)
int is_down()
void down()
void up()
NeighborCache* cache()
int down_
If the server is disconnected
NeighborCache* cache_
NextCache

Protected Fields

int Ca_
static HttpMInvalCache** CacheRepository_
Use a static mapping to convert cache id to cache pointers
int enable_upd_
Whether enable push
double hb_interval_
Heartbeat interval (second)
HBTimer hb_timer_
Heartbeat/Inval timer
HttpUInvalAgent* inv_parent_
Heartbeat/Inval to parent cache
HttpInvalAgent** inv_sender_
Heartbeat/Inval sender agents
InvalidationRec* invlist_
All invalidations to be sent
Tcl_HashTable nbr_
Maintaining liveness of neighbor caches
int num_inv_
of invalidations in invlist_
int num_sender_
of heartbeat sender agents
int num_updater_
number of update agents
static int NumCache_
int push_high_bound_
int size_sender_
Maximum size of array inv_sender_
int size_updater_
Size of array upd_sender_
Tcl_HashTable sstate_
HttpInvalAgent** upd_sender_
Agents to push updates to

Protected Methods

static void add_cache(HttpMInvalCache* c)
void add_nbr(HttpMInvalCache* c)
void add_sstate(int sid, SState* sst)
void add_update(const char *name, double mtime)
void check_sstate(int sid, int cid)
check & establish sstate
InvalidationRec* get_invrec(const char *name)
NeighborCache* lookup_nbr(int id)
SState* lookup_sstate(int sid)
static HttpMInvalCache* map_cache(int id)
HttpHbData* pack_heartbeat()
HttpUpdateData* pack_upd(ClientPage *pg)
virtual void process_inv(int n, InvalidationRec *ivlist, int cache)
void recv_heartbeat(int id)
int recv_inv(HttpHbData *d)
virtual int recv_inv_filter(ClientPage* pg, InvalidationRec *p)
void recv_leave(HttpLeaveData *d)
int recv_upd(HttpUpdateData *d)
virtual void send_hb_helper(int size, AppData *data)
void send_heartbeat()
void send_leave(HttpLeaveData *d)
void send_upd(ClientPage *pg)
virtual void send_upd_helper(int pgsize, AppData* data)

Protected

struct SState
Maintaining SState(Server, NextCache) Use the shadow names of server and cache as id
SState(NeighborCache* c)
int is_down()
void down()
void up()
NeighborCache* cache()
int down_
If the server is disconnected
NeighborCache* cache_
NextCache

Inherited from HttpInvalCache:

Public Methods

Http/Cache/Inval instproc answer-request-REF { cl pageid args }
Http/Cache/Inval instproc get-response-REF { server pageid args }
Http/Cache/Inval instproc is-consistent { cl type pageid }
Http/Cache/Inval instproc mark-invalid {}
Http/Cache/Inval instproc mark-leave {}
Http/Cache/Inval instproc mark-rejoin {}
Http/Cache/Inval instproc mark-valid {}
Http/Cache/Inval instproc refetch-pending { cl type pageid }

Inherited from HttpCache:

Public Fields

Http/Cache instvar clist_
Http/Cache instvar fid_
Http/Cache instvar slist_
Http/Cache instvar stat_

Public Methods

Http/Cache instproc alloc-connection { client fid }
Http/Cache instproc answer-pending-requests { pageid args }
Http/Cache instproc answer-request-GET { cl pageid args }
Http/Cache instproc cache-hit { cl type pageid }
Http/Cache instproc connect { server }
Http/Cache instproc disconnect { http }
Http/Cache instproc disconnect-client { client }
Http/Cache instproc disconnect-server { server }
Http/Cache instproc send-request { server type pageid size args }

Inherited from HttpApp:

Public Fields

Http instvar pool_

Public Methods

Http instproc addr {}
Http instproc create-pagepool {}
Http instproc get-cachesize {}
Http instproc get-hbsize {}
Http instproc get-imssize {}
Http instproc get-invsize {}
Http instproc get-joinsize {}
Http instproc get-mpusize {}
Http instproc get-ntfsize {}
Http instproc get-pfsize {}
Http instproc get-refsize {}
Http instproc get-reqsize {}
virtual AppData* get_data(int&, AppData*)
Http instproc getfid {}
int id()
void log(const char *fmt, ...)
Http instproc set-cachesize { size }
Http instproc stat { name }

Protected Fields

Tcl_Channel log_
ClientPagePool* pool_
Tcl_HashTable* tpa_

Protected Methods

int add_cnc(HttpApp *client, TcpApp *agt)
void delete_cnc(HttpApp *client)
TcpApp* lookup_cnc(HttpApp *client)
void set_pagepool(ClientPagePool* pp)

Inherited from Process:

Public Methods

virtual void send_data(int size, AppData* data = 0)
inline Process*& target()

Protected Fields

Process* target_

Documentation

Http cache with periodic multicast heartbeat invalidation
HttpMInvalCache()

virtual ~HttpMInvalCache()

virtual int command(int argc, const char*const* argv)

virtual void process_data(int size, AppData* data)

virtual void timeout(int reason)

void handle_node_failure(int cid)

void invalidate_server(int sid)

void add_inv(const char *name, double mtime)

HBTimer hb_timer_
Heartbeat/Inval timer

HttpInvalAgent** inv_sender_
Heartbeat/Inval sender agents

int num_sender_
of heartbeat sender agents

int size_sender_
Maximum size of array inv_sender_

InvalidationRec* invlist_
All invalidations to be sent

int num_inv_
of invalidations in invlist_

void send_heartbeat()

HttpHbData* pack_heartbeat()

virtual void send_hb_helper(int size, AppData *data)

int recv_inv(HttpHbData *d)

virtual void process_inv(int n, InvalidationRec *ivlist, int cache)

virtual int recv_inv_filter(ClientPage* pg, InvalidationRec *p)

InvalidationRec* get_invrec(const char *name)

struct SState
Maintaining SState(Server, NextCache) Use the shadow names of server and cache as id

SState(NeighborCache* c)

int is_down()

void down()

void up()

NeighborCache* cache()

int down_
If the server is disconnected

NeighborCache* cache_
NextCache

Tcl_HashTable sstate_

void add_sstate(int sid, SState* sst)

SState* lookup_sstate(int sid)

void check_sstate(int sid, int cid)
check & establish sstate

Tcl_HashTable nbr_
Maintaining liveness of neighbor caches

void add_nbr(HttpMInvalCache* c)

NeighborCache* lookup_nbr(int id)

HttpUInvalAgent* inv_parent_
Heartbeat/Inval to parent cache

void recv_heartbeat(int id)

void recv_leave(HttpLeaveData *d)

void send_leave(HttpLeaveData *d)

double hb_interval_
Heartbeat interval (second)

int enable_upd_
Whether enable push

int Ca_

int push_high_bound_

HttpInvalAgent** upd_sender_
Agents to push updates to

int num_updater_
number of update agents

int size_updater_
Size of array upd_sender_

void add_update(const char *name, double mtime)

void send_upd(ClientPage *pg)

int recv_upd(HttpUpdateData *d)

virtual void send_upd_helper(int pgsize, AppData* data)

HttpUpdateData* pack_upd(ClientPage *pg)

static HttpMInvalCache** CacheRepository_
Use a static mapping to convert cache id to cache pointers

static int NumCache_

static void add_cache(HttpMInvalCache* c)

static HttpMInvalCache* map_cache(int id)

Http/Cache/Inval/Mcast instproc init args

Http/Cache/Inval/Mcast instproc get-response-GET { server pageid args }
When we enter a new page into cache, we'll have to register the server in case we haven't know anything about it. The right place to do it is in get-response-GET, because a cache will only enter a new page after a cache miss, where it issues a GET.

Http/Cache/Inval/Mcast instproc set-parent { parent }

Http/Cache/Inval/Mcast instproc join-inval-group { group }
I'm a listener (child)

Http/Cache/Inval/Mcast instvar invalListener_

Http/Cache/Inval/Mcast instvar invListenGroup_

Http/Cache/Inval/Mcast instvar ns_

Http/Cache/Inval/Mcast instvar node_

Http/Cache/Inval/Mcast instproc init-inval-group { group }
I'm a sender (parent)

Http/Cache/Inval/Mcast instvar invalSender_

Http/Cache/Inval/Mcast instvar invSndGroup_

Http/Cache/Inval/Mcast instproc parent-cache { server }
Another "breakdown" version of parent-cache() is in cache-miss()

Http/Cache/Inval/Mcast instvar parent_

Http/Cache/Inval/Mcast instproc refetch { cl type pageid }
Send a refetch.

We should ask our parent in the virtual distribution tree of the corresponding web server, instead of our parent in the cache hierarchy.

Http/Cache/Inval/Mcast instvar marks_

Http/Cache/Inval/Mcast instproc cache-miss { cl type pageid }
Cache miss, get it from our parent cache in the virtual distribution tree of the web server

Http/Cache/Inval/Mcast instvar pending_

Http/Cache/Inval/Mcast instvar creq_

Http/Cache/Inval/Mcast instvar id_

Http/Cache/Inval/Mcast instproc invalidate { pageid modtime }
This allows a server passes invalidation to any cache via unicast XXX Whenever a node only wants to do an invalidation, call "cmd recv-inv"

Http/Cache/Inval/Mcast instproc get-request { cl type pageid args }

Http/Cache/Inval/Mcast instproc get-req-notify { pageid }
Do the same thing as if getting a request

Http/Cache/Inval/Mcast instproc send-req-notify { pageid }
Request notification goes along a single path in the virtual distribution tree towards the web server. It's not multicast to anybody else

Http/Cache/Inval/Mcast instproc push-update { pageid args }
(1) setup an invalidation record is set to invalidate my children; (2) Unicast the new page to my parent; (3) Update my own page records (4) Setting up a repair group to send out the new page (once and for all)

Http/Cache/Inval/Mcast instproc init-update-group { group }

Http/Cache/Inval/Mcast instvar updSender_

Http/Cache/Inval/Mcast instvar updSendGroup_

Http/Cache/Inval/Mcast instproc join-update-group { group }

Http/Cache/Inval/Mcast instvar updListener_

Http/Cache/Inval/Mcast instvar updListenGroup_

Http/Cache/Inval/Mcast instproc leave-update-group {}

Http/Cache/Inval/Mcast instproc setup-unicast-hb {}
Set up a unicast heartbeat connection

Http/Cache/Inval/Mcast instvar TRANSPORT_

Http/Cache/Inval/Mcast instproc server-join { server cache }
Establish state for server. Propagate until Top-Level Cache is reached Set up heartbeat connection along the way

Http/Cache/Inval/Mcast instproc request-mpush { page }

Http/Cache/Inval/Mcast instvar mpush_refresh_

Http/Cache/Inval/Mcast instvar hb_interval_

Http/Cache/Inval/Mcast instproc refresh-mpush { page }

Http/Cache/Inval/Mcast instproc send-refresh-mpush { cache page }

Http/Cache/Inval/Mcast instproc cancel-mpush-refresh { page }
XXX This is used when a mpush is timed out, where we don't need to send explicit teardown, etc.

Http/Cache/Inval/Mcast instproc stop-mpush { page }

Http/Cache/Inval/Mcast instproc join-tlc-group { group }
Support for multiple hierarchies

Top-Level Caches (TLCs) need to exchange invalidations with each other, so they are both sender and receiver in this multicast group.

Http/Cache/Inval/Mcast instvar tlcAgent_

Http/Cache/Inval/Mcast instvar tlcGroup_

Http/Cache/Inval/Mcast instproc get-response-TLC { server pageid tlc }


Direct child classes:
HttpPercInvalCache

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

Adapted for the NS documentation page

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de