My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
routing_strategies.h
Go to the documentation of this file.
1 /*
2 START OF LICENSE STUB
3  DeDOS: Declarative Dispersion-Oriented Software
4  Copyright (C) 2017 University of Pennsylvania, Georgetown University
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 END OF LICENSE STUB
19 */
24 #ifndef ROUTING_STRATEGIES_H_
25 #define ROUTING_STRATEGIES_H_
26 
27 #include "msu_type.h"
28 
38 int default_routing(struct msu_type *type, struct local_msu *sender,
39  struct msu_msg *msg, struct msu_endpoint *output);
40 
50 int shortest_queue_route(struct msu_type *type, struct local_msu *sender,
51  struct msu_msg *msg, struct msu_endpoint *output);
52 
63 int route_to_id(struct msu_type *type, struct local_msu *sender,
64  int msu_id, struct msu_endpoint *output);
65 
77 int route_to_origin_runtime(struct msu_type *type, struct local_msu *sender,
78  struct msu_msg *msg, struct msu_endpoint *output);
79 
80 
81 #endif
int shortest_queue_route(struct msu_type *type, struct local_msu *sender, struct msu_msg *msg, struct msu_endpoint *output)
Chooses the local MSU with the shortest queue.
int route_to_id(struct msu_type *type, struct local_msu *sender, int msu_id, struct msu_endpoint *output)
Chooses the MSU with the given ID.
Defines a type of MSU, including callback and accessor functions.
int default_routing(struct msu_type *type, struct local_msu *sender, struct msu_msg *msg, struct msu_endpoint *output)
The defualt routing strategy, using the key of the MSU message to route to a pre-defined endpoint...
int route_to_origin_runtime(struct msu_type *type, struct local_msu *sender, struct msu_msg *msg, struct msu_endpoint *output)
Routes an MSU message to the runtime on which the message originated.
The structure that represents an MSU located on the local machine.
Definition: local_msu.h:38
Defines a type of MSU.
Definition: msu_type.h:46
A message that is to be delivered to an instance of an MSU.
Definition: msu_message.h:101
An endpoint to which an msu_msg can be delivered.
Definition: routing.h:32