Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
bake
Commits
ec0a8846
Commit
ec0a8846
authored
Aug 02, 2017
by
Shane Snyder
Browse files
rename/reorganize client-side libary/header
parent
1e31e3a7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
ec0a8846
...
...
@@ -13,7 +13,7 @@ CLEANFILES = $(bin_SCRIPTS)
MAINTAINERCLEANFILES
=
EXTRA_DIST
=
BUILT_SOURCES
=
include_HEADERS
=
include/bake-bulk.h
include_HEADERS
=
include/bake-bulk.h
include/bake-bulk-client.h
EXTRA_DIST
+=
\
prepare.sh
...
...
@@ -26,10 +26,10 @@ AM_LIBS =
AM_CXXFLAGS
=
$(AM_CFLAGS)
lib_LTLIBRARIES
=
src/libbake-bulk.la
src_libbake_bulk_la_SOURCES
=
lib_LTLIBRARIES
=
src/libbake-bulk
-client
.la
src_libbake_bulk_
client_
la_SOURCES
=
LDADD
=
src/libbake-bulk.la
LDADD
=
src/libbake-bulk
-client
.la
pkgconfigdir
=
$(libdir)
/pkgconfig
pkgconfig_DATA
=
maint/bake-bulk.pc
...
...
include/bake-bulk-client.h
0 → 100644
View file @
ec0a8846
/*
* (C) 2016 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#ifndef __BAKE_BULK_CLIENT_H
#define __BAKE_BULK_CLIENT_H
#include <stdint.h>
#include "bake-bulk.h"
/**
* Obtain identifying information for a bake target through the provided
* remote mercury address.
*
* @param [in] mecury_dest Mercury address in string form
* @param [out] bti BAKE target identifier
* @returns 0 on success, -1 on failure
*/
int
bake_probe_instance
(
const
char
*
mercury_dest
,
bake_target_id_t
*
bti
);
/**
* Create a bounded-size bulk data region. The resulting region can be
* written using bulk write operations, and can be persisted (once writes are
* complete) with a a bulk persist operation. The region is not valid for
* read access until persisted.
*
* @param [in] bti BAKE target identifier
* @param [in] region_size size of region to be created
* @param [out] rid identifier for new region
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_create
(
bake_target_id_t
bti
,
uint64_t
region_size
,
bake_bulk_region_id_t
*
rid
);
/**
* Writes into a region that was previously created with bake_bulk_create().
* Result is not guaranteed to be persistent until explicit
* bake_bulk_persist() call.
*
* Results are undefined if multiple writers (from same process or different
* processes) perform overlapping writes.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for region
* @param [in] region_offset offset into the target region to write
* @param [in] buf local memory buffer to write
* @param [in] buf_size size of local memory buffer to write
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_write
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
,
uint64_t
region_offset
,
void
const
*
buf
,
uint64_t
buf_size
);
/**
* Persist a bulk region. The region is considered immutable at this point
* and reads may be performed on the region.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for region
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_persist
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
);
/**
* Check the size of an existing region.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for region
* @param [out] size sizes of region
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_get_size
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
,
uint64_t
*
region_size
);
/**
* Reads from a region that was previously persisted with bake_bulk_persist().
*
* NOTE: for now at least, this call does not support "short" reads. It
* either succeeds in reading the requested size or not.
*
* @param [in] bti BAKE target identifier
* @param [in] rid region identifier
* @param [in] region_offset offset into the target region to read from
* @param [in] buf local memory buffer read into
* @param [in] buf_size size of local memory buffer to read into
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_read
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
,
uint64_t
region_offset
,
void
*
buf
,
uint64_t
buf_size
);
/**
* Release local resources associated with access to a target; does not
* modify the target in any way.
*
* @param [in] bti BAKE target_identifier
*/
void
bake_release_instance
(
bake_target_id_t
bti
);
/**
* Utility function to shut down a remote service
*
* @param [in] bti Bake target identifier
* @returns 0 on success, -1 on fialure
*/
int
bake_shutdown_service
(
bake_target_id_t
bti
);
/* NOTE: code below is a copy of the bulk portion of the proposed BAKE API.
* Commented out for now but leaving it in place for reference
*/
/**
* Issue a no-op
*
* @param [in] bti BAKE target identifier
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_noop
(
bake_target_id_t
bti
);
#endif
/* __BAKE_BULK__CLIENT_H */
include/bake-bulk.h
View file @
ec0a8846
...
...
@@ -27,131 +27,6 @@ typedef struct {
char
data
[
BAKE_BULK_REGION_ID_DATA_SIZE
];
}
bake_bulk_region_id_t
;
/**
* Obtain identifying information for a bake target through the provided
* remote mercury address.
*
* @param [in] mecury_dest Mercury address in string form
* @param [out] bti BAKE target identifier
* @returns 0 on success, -1 on failure
*/
int
bake_probe_instance
(
const
char
*
mercury_dest
,
bake_target_id_t
*
bti
);
/**
* Create a bounded-size bulk data region. The resulting region can be
* written using bulk write operations, and can be persisted (once writes are
* complete) with a a bulk persist operation. The region is not valid for
* read access until persisted.
*
* @param [in] bti BAKE target identifier
* @param [in] region_size size of region to be created
* @param [out] rid identifier for new region
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_create
(
bake_target_id_t
bti
,
uint64_t
region_size
,
bake_bulk_region_id_t
*
rid
);
/**
* Writes into a region that was previously created with bake_bulk_create().
* Result is not guaranteed to be persistent until explicit
* bake_bulk_persist() call.
*
* Results are undefined if multiple writers (from same process or different
* processes) perform overlapping writes.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for region
* @param [in] region_offset offset into the target region to write
* @param [in] buf local memory buffer to write
* @param [in] buf_size size of local memory buffer to write
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_write
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
,
uint64_t
region_offset
,
void
const
*
buf
,
uint64_t
buf_size
);
/**
* Persist a bulk region. The region is considered immutable at this point
* and reads may be performed on the region.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for region
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_persist
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
);
/**
* Check the size of an existing region.
*
* @param [in] bti BAKE target identifier
* @param [in] rid identifier for region
* @param [out] size sizes of region
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_get_size
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
,
uint64_t
*
region_size
);
/**
* Reads from a region that was previously persisted with bake_bulk_persist().
*
* NOTE: for now at least, this call does not support "short" reads. It
* either succeeds in reading the requested size or not.
*
* @param [in] bti BAKE target identifier
* @param [in] rid region identifier
* @param [in] region_offset offset into the target region to read from
* @param [in] buf local memory buffer read into
* @param [in] buf_size size of local memory buffer to read into
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_read
(
bake_target_id_t
bti
,
bake_bulk_region_id_t
rid
,
uint64_t
region_offset
,
void
*
buf
,
uint64_t
buf_size
);
/**
* Release local resources associated with access to a target; does not
* modify the target in any way.
*
* @param [in] bti BAKE target_identifier
*/
void
bake_release_instance
(
bake_target_id_t
bti
);
/**
* Utility function to shut down a remote service
*
* @param [in] bti Bake target identifier
* @returns 0 on success, -1 on fialure
*/
int
bake_shutdown_service
(
bake_target_id_t
bti
);
/* NOTE: code below is a copy of the bulk portion of the proposed BAKE API.
* Commented out for now but leaving it in place for reference
*/
/**
* Issue a no-op
*
* @param [in] bti BAKE target identifier
* @returns 0 on success, -1 on failure
*/
int
bake_bulk_noop
(
bake_target_id_t
bti
);
#if 0
/// ==== Some high-level goals ====
...
...
src/Makefile.subdir
View file @
ec0a8846
src_libbake_bulk_la_SOURCES
+=
\
src/bake-bulk.c
src_libbake_bulk_
client_
la_SOURCES
+=
\
src/bake-bulk
-client
.c
bin_PROGRAMS
+=
\
src/bake-bulk-server
\
...
...
src/bake-bulk.c
→
src/bake-bulk
-client
.c
View file @
ec0a8846
File moved
src/bb-copy-from.c
View file @
ec0a8846
...
...
@@ -15,7 +15,7 @@
#include "abt.h"
#include "abt-snoozer.h"
#include "bake-bulk.h"
#include "bake-bulk
-client
.h"
/* client program that will copy a bake bulk region out to a POSIX file */
...
...
src/bb-copy-to.c
View file @
ec0a8846
...
...
@@ -15,7 +15,7 @@
#include "abt.h"
#include "abt-snoozer.h"
#include "bake-bulk.h"
#include "bake-bulk
-client
.h"
/* client program that will copy a POSIX file into a bake bulk region */
...
...
src/bb-latency-bench.c
View file @
ec0a8846
...
...
@@ -15,7 +15,7 @@
#include "abt.h"
#include "abt-snoozer.h"
#include "bake-bulk.h"
#include "bake-bulk
-client
.h"
static
void
bench_routine_write
(
bake_target_id_t
bti
,
int
iterations
,
double
*
measurement_array
,
int
size
);
static
void
bench_routine_read
(
bake_target_id_t
bti
,
int
iterations
,
double
*
measurement_array
,
int
size
);
...
...
src/bb-shutdown.c
View file @
ec0a8846
...
...
@@ -10,7 +10,7 @@
#include "abt.h"
#include "abt-snoozer.h"
#include "bake-bulk.h"
#include "bake-bulk
-client
.h"
/* client program that will shut down a BAKE bulk server. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment