JULEA
Data Structures | Typedefs | Enumerations | Functions
Semantics

Data Structures

struct  JSemantics
 

Typedefs

typedef enum JSemanticsTemplate JSemanticsTemplate
 
typedef enum JSemanticsType JSemanticsType
 
typedef enum JSemanticsAtomicity JSemanticsAtomicity
 
typedef enum JSemanticsConsistency JSemanticsConsistency
 
typedef enum JSemanticsPersistency JSemanticsPersistency
 
typedef enum JSemanticsSecurity JSemanticsSecurity
 
typedef struct JSemantics JSemantics
 

Enumerations

enum  JSemanticsTemplate { J_SEMANTICS_TEMPLATE_DEFAULT , J_SEMANTICS_TEMPLATE_POSIX , J_SEMANTICS_TEMPLATE_TEMPORARY_LOCAL }
 
enum  JSemanticsType { J_SEMANTICS_ATOMICITY , J_SEMANTICS_CONSISTENCY , J_SEMANTICS_PERSISTENCY , J_SEMANTICS_SECURITY }
 
enum  JSemanticsAtomicity { J_SEMANTICS_ATOMICITY_BATCH , J_SEMANTICS_ATOMICITY_OPERATION , J_SEMANTICS_ATOMICITY_NONE }
 
enum  JSemanticsConsistency { J_SEMANTICS_CONSISTENCY_IMMEDIATE , J_SEMANTICS_CONSISTENCY_SESSION , J_SEMANTICS_CONSISTENCY_EVENTUAL }
 
enum  JSemanticsPersistency { J_SEMANTICS_PERSISTENCY_STORAGE , J_SEMANTICS_PERSISTENCY_NETWORK , J_SEMANTICS_PERSISTENCY_NONE }
 
enum  JSemanticsSecurity { J_SEMANTICS_SECURITY_STRICT , J_SEMANTICS_SECURITY_NONE }
 

Functions

JSemanticsj_semantics_new (JSemanticsTemplate template_)
 
JSemanticsj_semantics_new_from_string (gchar const *template_str, gchar const *semantics_str)
 
JSemanticsj_semantics_ref (JSemantics *semantics)
 
void j_semantics_unref (JSemantics *semantics)
 
void j_semantics_set (JSemantics *semantics, JSemanticsType key, gint value)
 
gint j_semantics_get (JSemantics *semantics, JSemanticsType key)
 

Detailed Description

Typedef Documentation

◆ JSemantics

typedef struct JSemantics JSemantics

◆ JSemanticsAtomicity

◆ JSemanticsConsistency

◆ JSemanticsPersistency

◆ JSemanticsSecurity

◆ JSemanticsTemplate

◆ JSemanticsType

Enumeration Type Documentation

◆ JSemanticsAtomicity

Atomicity of batched operations.

Attention
Currently only database functions are affected by this setting.
Enumerator
J_SEMANTICS_ATOMICITY_BATCH 

Consecutive operations of the same type are part of the same DB transaction.

Todo:
Generalize to complete batch instead of same lists.
J_SEMANTICS_ATOMICITY_OPERATION 

Each operation is a transaction.

J_SEMANTICS_ATOMICITY_NONE 

No transactions are used.

Todo:
Currently unused. Interesting when other backends support transactions.

◆ JSemanticsConsistency

Consistency levels describe when other clients are able to read written data.

The implemented levels are loosely based on the levels described in:

Chen Wang, Kathryn Mohror, and Marc Snir. 2021. File System Semantics Requirements of HPC Applications. In Proceedings of the 30th International Symposium on High-Performance Parallel and Distributed Computing (HPDC '21). Association for Computing Machinery, New York, NY, USA, 19–30. https://doi.org/10.1145/3431379.3460637

Attention
Mixing immediate/eventual consistencies with session-based consistency for concurrently executed batches gives no guarantees on local consistency.
Enumerator
J_SEMANTICS_CONSISTENCY_IMMEDIATE 

Data is consistent immediately after the batch is executed.

J_SEMANTICS_CONSISTENCY_SESSION 

Data is consistent immediately after no reference to the batch object is held anymore.

J_SEMANTICS_CONSISTENCY_EVENTUAL 

The data of a corresponding batch will be eventually consistent after calling j_batch_execute(). Current implicit synchronization points are manual execution of any immediate batch, reading operations or program termination. If more control of asynchronous execution is wanted, consider using j_batch_execute_async() instead of consistency levels.

◆ JSemanticsPersistency

Defines which guarantees are given on the persistency of finished operations.

Enumerator
J_SEMANTICS_PERSISTENCY_STORAGE 

Data of finished operations is stored on persistent storage.

J_SEMANTICS_PERSISTENCY_NETWORK 

Data of finished operations arrived at a JULEA server.

J_SEMANTICS_PERSISTENCY_NONE 

No guarantees on persistency.

◆ JSemanticsSecurity

Defines the used security model.

Attention
Currently unused.
Enumerator
J_SEMANTICS_SECURITY_STRICT 
J_SEMANTICS_SECURITY_NONE 

◆ JSemanticsTemplate

Enumerator
J_SEMANTICS_TEMPLATE_DEFAULT 
J_SEMANTICS_TEMPLATE_POSIX 
J_SEMANTICS_TEMPLATE_TEMPORARY_LOCAL 

◆ JSemanticsType

Semantics accepted by JULEA.

Enumerator
J_SEMANTICS_ATOMICITY 

Atomicity of batched operations.

Attention
Currently only database functions are affected by this setting.
J_SEMANTICS_CONSISTENCY 

Defines when data will be consistent for other clients, that is, when batches are executed.

J_SEMANTICS_PERSISTENCY 

Defines which guarantees are given on the persistency of finished operations.

J_SEMANTICS_SECURITY 

Defines the used security model.

Attention
Currently unused.

Function Documentation

◆ j_semantics_get()

gint j_semantics_get ( JSemantics semantics,
JSemanticsType  key 
)

Gets a specific aspect of the semantics.

JSemantics* semantics;
...
j_semantics_get(semantics, J_SEMANTICS_CONSISTENCY);
@ J_SEMANTICS_CONSISTENCY
Definition: jsemantics.h:64
Definition: jsemantics.c:42
Parameters
semanticsThe semantics.
keyThe aspect's key.
Returns
The aspect's value.

◆ j_semantics_new()

JSemantics * j_semantics_new ( JSemanticsTemplate  template_)

Creates a new semantics object. Semantics objects become immutable after the first call to j_semantics_ref().

Parameters
template_A semantics template.
Returns
A new semantics object. Should be freed with j_semantics_unref().

◆ j_semantics_new_from_string()

JSemantics * j_semantics_new_from_string ( gchar const *  template_str,
gchar const *  semantics_str 
)

Creates a new semantics object from two strings. Semantics objects become immutable after the first call to j_semantics_ref().

JSemantics* semantics;
semantics = j_semantics_new_from_string("default", "atomicity=operation");
JSemantics * j_semantics_new_from_string(gchar const *template_str, gchar const *semantics_str)
Definition: jsemantics.c:110
Parameters
template_strA string specifying the template.
semantics_strA string specifying the semantics.
Returns
A new semantics object. Should be freed with j_semantics_unref().

◆ j_semantics_ref()

JSemantics * j_semantics_ref ( JSemantics semantics)

Increases the semantics' reference count. The semantics object becomes immutable after the first call to this.

Parameters
semanticsThe semantics.
Returns
The semantics.

◆ j_semantics_set()

void j_semantics_set ( JSemantics semantics,
JSemanticsType  key,
gint  value 
)

Sets a specific aspect of the semantics.

JSemantics* semantics;
...
@ J_SEMANTICS_CONSISTENCY_SESSION
Definition: jsemantics.h:131
Parameters
semanticsThe semantics.
keyThe aspect's key.
valueThe aspect's value.

◆ j_semantics_unref()

void j_semantics_unref ( JSemantics semantics)

Decreases the semantics' reference count. When the reference count reaches zero, frees the memory allocated for the semantics.

Parameters
semanticsThe semantics.