Module machi_proxy_flu1_client

Erlang API for the Machi FLU TCP protocol version 1, with a proxy-process style API for hiding messy details such as TCP connection/disconnection with the remote Machi server.

Behaviours: gen_server.

Description

Erlang API for the Machi FLU TCP protocol version 1, with a proxy-process style API for hiding messy details such as TCP connection/disconnection with the remote Machi server.

Machi is intentionally avoiding using distributed Erlang for Machi's communication. This design decision makes Erlang-side code more difficult & complex, but it's the price to pay for some language independence. Later in Machi's life cycle, we may (?) need to (re-)implement some components in a non-Erlang/BEAM-based language.

This module implements a "man in the middle" proxy between the Erlang client and Machi server (which is on the "far side" of a TCP connection to somewhere). This proxy process will always execute on the same Erlang node as the Erlang client that uses it. The proxy is intended to be a stable, long-lived process that survives TCP communication problems with the remote server.

For a higher level interface, see machi_cr_client. For a lower level interface, see machi_flu1_client.

Function Index

append_chunk/4Append a chunk (binary- or iolist-style) of data to a file with Prefix.
append_chunk/5Append a chunk (binary- or iolist-style) of data to a file with Prefix.
append_chunk_extra/5Append a chunk (binary- or iolist-style) of data to a file with Prefix.
append_chunk_extra/6Append a chunk (binary- or iolist-style) of data to a file with Prefix.
checksum_list/3Fetch the list of chunk checksums for File.
checksum_list/4Fetch the list of chunk checksums for File.
code_change/3
get_all_projections/2Get all projections from the FLU's projection store.
get_all_projections/3Get all projections from the FLU's projection store.
get_epoch_id/1Get the epoch_id() of the FLU's current/latest projection.
get_epoch_id/2Get the epoch_id() of the FLU's current/latest projection.
get_latest_epochid/2Get the latest epoch number + checksum from the FLU's projection store.
get_latest_epochid/3Get the latest epoch number + checksum from the FLU's projection store.
handle_call/3
handle_cast/2
handle_info/2
init/1
list_all_projections/2Get all epoch numbers from the FLU's projection store.
list_all_projections/3Get all epoch numbers from the FLU's projection store.
list_files/2Fetch the list of all files on the remote FLU.
list_files/3Fetch the list of all files on the remote FLU.
quit/1Quit & close the connection to remote FLU and stop our proxy process.
read_chunk/5Read a chunk of data of size Size from File at Offset.
read_chunk/6Read a chunk of data of size Size from File at Offset.
read_latest_projection/2Get the latest projection from the FLU's projection store for ProjType
read_latest_projection/3Get the latest projection from the FLU's projection store for ProjType
read_projection/3Read a projection Proj of type ProjType.
read_projection/4Read a projection Proj of type ProjType.
start_link/1Start a local, long-lived process that will be our steady & reliable communication proxy with the fickle & flaky remote Machi server.
start_proxies/1
stop_proxies/1
terminate/2
wedge_status/1Fetch the wedge status from the remote FLU.
wedge_status/2Fetch the wedge status from the remote FLU.
write_chunk/5Write a chunk (binary- or iolist-style) of data to a file with Prefix at Offset.
write_chunk/6Write a chunk (binary- or iolist-style) of data to a file with Prefix at Offset.
write_projection/3Write a projection Proj of type ProjType.
write_projection/4Write a projection Proj of type ProjType.

Function Details

append_chunk/4

append_chunk(PidSpec, EpochID, Prefix, Chunk) -> any()

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

append_chunk/5

append_chunk(PidSpec, EpochID, Prefix, Chunk, Timeout) -> any()

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

append_chunk_extra/5

append_chunk_extra(PidSpec, EpochID, Prefix, Chunk, ChunkExtra) -> any()

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

append_chunk_extra/6

append_chunk_extra(PidSpec, EpochID, Prefix, Chunk, ChunkExtra, Timeout) -> any()

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

checksum_list/3

checksum_list(PidSpec, EpochID, File) -> any()

Fetch the list of chunk checksums for File.

checksum_list/4

checksum_list(PidSpec, EpochID, File, Timeout) -> any()

Fetch the list of chunk checksums for File.

code_change/3

code_change(OldVsn, S, Extra) -> any()

get_all_projections/2

get_all_projections(PidSpec, ProjType) -> any()

Get all projections from the FLU's projection store.

get_all_projections/3

get_all_projections(PidSpec, ProjType, Timeout) -> any()

Get all projections from the FLU's projection store.

get_epoch_id/1

get_epoch_id(PidSpec) -> any()

Get the epoch_id() of the FLU's current/latest projection.

get_epoch_id/2

get_epoch_id(PidSpec, Timeout) -> any()

Get the epoch_id() of the FLU's current/latest projection.

get_latest_epochid/2

get_latest_epochid(PidSpec, ProjType) -> any()

Get the latest epoch number + checksum from the FLU's projection store.

get_latest_epochid/3

get_latest_epochid(PidSpec, ProjType, Timeout) -> any()

Get the latest epoch number + checksum from the FLU's projection store.

handle_call/3

handle_call(Request, From, S) -> any()

handle_cast/2

handle_cast(Msg, S) -> any()

handle_info/2

handle_info(Info, S) -> any()

init/1

init(X1) -> any()

list_all_projections/2

list_all_projections(PidSpec, ProjType) -> any()

Get all epoch numbers from the FLU's projection store.

list_all_projections/3

list_all_projections(PidSpec, ProjType, Timeout) -> any()

Get all epoch numbers from the FLU's projection store.

list_files/2

list_files(PidSpec, EpochID) -> any()

Fetch the list of all files on the remote FLU.

list_files/3

list_files(PidSpec, EpochID, Timeout) -> any()

Fetch the list of all files on the remote FLU.

quit/1

quit(PidSpec) -> any()

Quit & close the connection to remote FLU and stop our proxy process.

read_chunk/5

read_chunk(PidSpec, EpochID, File, Offset, Size) -> any()

Read a chunk of data of size Size from File at Offset.

read_chunk/6

read_chunk(PidSpec, EpochID, File, Offset, Size, Timeout) -> any()

Read a chunk of data of size Size from File at Offset.

read_latest_projection/2

read_latest_projection(PidSpec, ProjType) -> any()

Get the latest projection from the FLU's projection store for ProjType

read_latest_projection/3

read_latest_projection(PidSpec, ProjType, Timeout) -> any()

Get the latest projection from the FLU's projection store for ProjType

read_projection/3

read_projection(PidSpec, ProjType, Epoch) -> any()

Read a projection Proj of type ProjType.

read_projection/4

read_projection(PidSpec, ProjType, Epoch, Timeout) -> any()

Read a projection Proj of type ProjType.

start_link/1

start_link(P_srvr) -> any()

Start a local, long-lived process that will be our steady & reliable communication proxy with the fickle & flaky remote Machi server.

start_proxies/1

start_proxies(MembersDict) -> any()

stop_proxies/1

stop_proxies(ProxiesDict) -> any()

terminate/2

terminate(Reason, S) -> any()

wedge_status/1

wedge_status(PidSpec) -> any()

Fetch the wedge status from the remote FLU.

wedge_status/2

wedge_status(PidSpec, Timeout) -> any()

Fetch the wedge status from the remote FLU.

write_chunk/5

write_chunk(PidSpec, EpochID, File, Offset, Chunk) -> any()

Write a chunk (binary- or iolist-style) of data to a file with Prefix at Offset.

write_chunk/6

write_chunk(PidSpec, EpochID, File, Offset, Chunk, Timeout) -> any()

Write a chunk (binary- or iolist-style) of data to a file with Prefix at Offset.

write_projection/3

write_projection(PidSpec, ProjType, Proj) -> any()

Write a projection Proj of type ProjType.

write_projection/4

write_projection(PidSpec, ProjType, Proj, Timeout) -> any()

Write a projection Proj of type ProjType.


Generated by EDoc, May 20 2015, 12:58:33.