Service - Media Manager: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 46: Line 46:
* partition key: mediaId
* partition key: mediaId
* sort key: (none)
* sort key: (none)
= Graph database =


== [[Service - Media Graph]]==
== [[Service - Media Graph]]==
Line 53: Line 55:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "mediaProperty",
nodeLabel: "mediaPropertyLabel",
schema: {
schema: {
identifier: true,
identifier: true,
Line 59: Line 61:
restrictRelationships: true,
restrictRelationships: true,
properties: {
properties: {
propertyId: {
propertyLabelId: {
identifier: true, //(random uuid)
identifier: true,
},
mediaId: {
immutable: true,
},
},
},
},
Line 72: Line 71:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "mediaPropertyName",
nodeLabel: "mediaProperty",
schema: {
schema: {
identifier: true,
identifier: true,
Line 79: Line 78:
properties: {
properties: {
propertyId: {
propertyId: {
identifier: true,
identifier: true, //(random uuid)
},
mediaId: {
immutable: true,
},
},
},
},
Line 85: Line 87:
}
}
</syntaxhighlight>
</syntaxhighlight>
=== Relationships ===


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "mediaPropertyValue",
relationshipType: "hasMediaProperty",
schema: {
schema: {
identifier: true,
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
properties: {
propertyId: {
originTimestamp: //timestamp the request to create/change this relationship was sent
identifier: true,
},
},
},
}
}
}
}
</syntaxhighlight>
</syntaxhighlight>
=== Relationships ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "hasMediaProperty",
relationshipType: "disabledMediaProperty",
schema: {
schema: {
elementCanBeRemoved: true,
elementCanBeRemoved: true,
Line 117: Line 116:
}
}
</syntaxhighlight>
</syntaxhighlight>
* links a Media node to it's Properties
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "disabledMediaProperty",
relationshipType: "isMediaPropertyLabel",
schema: {
schema: {
elementCanBeRemoved: true,
elementCanBeRemoved: true,
Line 130: Line 131:
}
}
</syntaxhighlight>
</syntaxhighlight>
* links a Media node to it's Properties
* links one MediaProperty to one MediaPropertyLabel


== Basic node schemas ==
== Basic node schemas ==


mediaPropertyName
mediaPropertyLabel
* [[Service - Translations Graph]]
* [[Service - Translations Graph]]


mediaPropertyValue
mediaProperty
* [[Service - Translations Graph]]
* [[Service - Translations Graph]]



Revision as of 13:37, 10 August 2021

Overview

Each media type is handled by a Service - Media (handlers) service.

The Media Manager service handles shared orchestration of the Media Handler services.

Repository

https://bitbucket.org/izara-core-media/izara-core-media-media-manager/src/master/

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configKey: "MediaGraphServiceName"
	configTag: "MediaGraphServiceName"
	configValue: xxx // eg: "MediaGraph"
}
{
	configKey: "MediaHandlerService"
	configTag: xxx // mediaHandlerServiceNameTag, eg: "MediaStandard", this is what is saved in each media node
	configValue: {
		serviceName: xxx // eg: "ImageStandard", this is the actual deployed service name}
	}
}

Media

Records which Handler manages each media element

{
	mediaId
	mediaHandlerServiceNameTag
}
  • partition key: mediaId
  • sort key: (none)

Graph database

Service - Media Graph

Nodes

{
	nodeLabel: "mediaPropertyLabel",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			propertyLabelId: {
				identifier: true,
			},
		},
	}
}
{
	nodeLabel: "mediaProperty",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			propertyId: {
				identifier: true, //(random uuid)
			},
			mediaId: {
				immutable: true,
			},
		},
	}
}

Relationships

{
	relationshipType: "hasMediaProperty",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "disabledMediaProperty",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • links a Media node to it's Properties
{
	relationshipType: "isMediaPropertyLabel",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • links one MediaProperty to one MediaPropertyLabel

Basic node schemas

mediaPropertyLabel

mediaProperty

Working documents

Media Manager