Service - Media Manager: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 33: Line 33:
</syntaxhighlight>
</syntaxhighlight>


== Media ==
== MediaRecord ==


Records which Handler manages each media element
Records which Handler manages each media element
Line 52: Line 52:


=== Nodes ===
=== Nodes ===


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "mediaPropertyLabel",
nodeLabel: "media",
schema: {
schema: {
identifier: true,
identifier: true,
Line 61: Line 62:
restrictRelationships: true,
restrictRelationships: true,
properties: {
properties: {
propertyLabelId: {
mediaId: {
identifier: true,
identifier: true, // create unique id from request details
},
mediaHandlerServiceNameTag: {
immutable: true,
},
},
},
},
Line 70: Line 74:


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
nodeLabel: "mediaPropertyLabel",
}
{
{
nodeLabel: "mediaProperty",
nodeLabel: "mediaProperty",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyId: {
identifier: true, //(random uuid)
},
mediaId: {
immutable: true,
},
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]


=== Relationships ===
=== Relationships ===
Line 92: Line 87:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "hasMediaProperty",
relationshipType: "has_mediaProperty",
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
}
</syntaxhighlight>
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "disabledMediaProperty",
relationshipType: "disabled_mediaProperty",
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
}
</syntaxhighlight>
* links a Media node to it's Properties
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "isMediaPropertyLabel",
relationshipType: "is_mediaPropertyLabel",
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* links one MediaProperty to one MediaPropertyLabel
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]


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


mediaPropertyLabel
Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]]
* [[Service - Translations Graph]]


mediaProperty
# mediaPropertyLabel
* [[Service - Translations Graph]]
#* [[Service - Translations Graph]]
# mediaProperty
#* [[Service - Translations Graph]]


= Working documents =
= Working documents =

Latest revision as of 12:39, 4 February 2022

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}
	}
}

MediaRecord

Records which Handler manages each media element

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

Graph database

Service - Media Graph

Nodes

{
	nodeLabel: "media",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			mediaId: {
				identifier: true, // create unique id from request details
			},
			mediaHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}
{
	nodeLabel: "mediaPropertyLabel",
}
{
	nodeLabel: "mediaProperty",
}

Relationships

{
	relationshipType: "has_mediaProperty",
}
{
	relationshipType: "disabled_mediaProperty",
}
{
	relationshipType: "is_mediaPropertyLabel",
}

Basic node schemas

Schema comes from BasicNodeSchemaLib

  1. mediaPropertyLabel
  2. mediaProperty

Working documents

Media Manager