Skip to content

Commit

Permalink
Updated FOBS readme to add DatumManager, added agrpcs as secure scheme (
Browse files Browse the repository at this point in the history
#2410)

Co-authored-by: Isaac Yang <[email protected]>
  • Loading branch information
nvidianz and IsaacYangSLA authored Mar 19, 2024
1 parent 0dfab02 commit 7d26dcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nvflare/fuel/f3/drivers/net_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
MAX_ITER_SIZE = 10
RANDOM_TRIES = 20
BIND_TIME_OUT = 5
SECURE_SCHEMES = {"https", "wss", "grpcs", "stcp", "satcp"}
SECURE_SCHEMES = {"https", "wss", "grpcs", "agrpcs", "ngrpcs", "stcp", "satcp"}

# GRPC can't handle frame size over 2G. So the limit is set to (2G-2M)
MAX_FRAME_SIZE = 2 * 1024 * 1024 * 1024 - (2 * 1024 * 1024)
Expand Down
9 changes: 7 additions & 2 deletions nvflare/fuel/utils/fobs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ A decomposer can either serialize the class into bytes or decompose it into obje
serializable types. In most cases, it only involves saving members as a list and reconstructing
the object from the list.

MessagePack can't handle items larger than 4GB in dict. To work around this issue, FOBS can externalize
the large item and just stores a reference in the buffer. :code:`DatumManager` is used to handle the
externalized data. For most objects which don't deal with dict items larger than 4GB, the DatumManager
is not needed.

Here is an example of a simple decomposer. Even though :code:`datetime` is not supported
by MessagePack, a decomposer is included in `fobs` module so no need to further decompose it.

Expand All @@ -138,10 +143,10 @@ by MessagePack, a decomposer is included in `fobs` module so no need to further
def supported_type(self) -> Type[Any]:
return Simple

def decompose(self, obj) -> Any:
def decompose(self, obj, manager) -> Any:
return [obj.num, obj.name, obj.timestamp]

def recompose(self, data: Any) -> Simple:
def recompose(self, data: Any, manager) -> Simple:
return Simple(data[0], data[1], data[2])


Expand Down

0 comments on commit 7d26dcc

Please sign in to comment.