Service - GraphNavigation: 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 1: Line 1:
= Overview =
= Overview =


Manages configuration a graph navigation (eg forum system)
Manages configuration and handling of frontend graph navigation (eg forum system)


= Repository =
= Repository =


https://bitbucket.org/izara-core-shared/izara-core-shared-graphnavigation-config
https://bitbucket.org/izara-core-shared/izara-core-shared-graphnavigation


= DynamoDB tables =
= DynamoDB tables =
Line 127: Line 127:
</syntaxhighlight>
</syntaxhighlight>


= Requesting data from backend =
== Multiple graphNav or elementDetail ==
 
* After the GraphNavigation Config is recieved by the backend and initial SortResult request is sent to the backend
* One request per node found, so start with a set of nodes, for each one start to request range of relationships, for each relationship request node, then it's relationships and so on
* Perhaps have a seperate service that does this in the background to a set number of hops
* SortFields will normally be the weight of the relationships, but this can be controlled by settings
* Paginate the sorted results to get the list of relationships to show for any node
* If user requests more nodes, request additional pages from SortResult
* As user navigates the graph, continue sending requests to backend for more nodes/relationships
* Perhaps have setting to control how to make additional requests, automatic, when reach leaf node, or manual button to request more
 
= Multiple graphNav or elementDetail =


* One GraphNavigation setup can have multiple graphNav or elementDetail configs showing
* One GraphNavigation setup can have multiple graphNav or elementDetail configs showing
* Each has it's own settings so can present the navigation or detail for different uses
* Each has it's own settings so can present the navigation or detail for different uses


= Interaction with sitePageConfig =
= RelNode objType =


* sitePage can set a starting node, or have a popup to input the starting node
* identifies a single target node and the relationship that connects it to the source node
* Need some way to wrap in conversations presentation that shows most recent, most commented (within timerange) etc
* in most cases a Relnode will reflect data in a graph database, but could be other storage types
* Maybe that could be a popup settin for the GraphNavigation, or an element that pops up and allows for a search that returns a range of nodes (might not be related) that match the search
* RelNodeId (unique identifier/dataId) for RelNode must be able to identify one node+relationship pair
* GraphNavigation could be set to default to showing that popup for initial seeding of graph data
* for graph, to identify the node will require the objType (serviceTag_objectType) and identifier values (maybe field=value pairs), and the relationship UUID (relUuid)
* how to combine all these into one string, maybe use Object Schema deliminator code, adding a level for the additional serviceTag_objectType/relUuid fields


= Grouping/Clustering of Nodes =
= InitialNode objType =


* Probably cluster by node label, to allow for easy presentation adjustments by type
* Multiple Node initial queries may or may not have relationship based filters, this means results may not include relationship details
* Also add clusters according to viewed this session, or previously viewed (would need supporting backend data)
* Will be nodes only so cannot use RelNode objType, have a separate ("InitialNode") objType that points to nodes only
* for graph, to identify the node require objType (serviceTag_objectType) and identifier values (maybe field=value pairs)


= Working documents =
= Working documents =


[[:Category:Working_documents - GraphNavigation Config|GraphNavigation Config]]
[[:Category:Working_documents - GraphNavigation|GraphNavigation]]


[[Category:Backend services| GraphNavigation Config]]
[[Category:Backend services| GraphNavigation]]

Latest revision as of 05:33, 30 September 2023

Overview

Manages configuration and handling of frontend graph navigation (eg forum system)

Repository

https://bitbucket.org/izara-core-shared/izara-core-shared-graphnavigation

DynamoDB tables

GraphNavigationConfigMain

{
	graphNavigationConfigId: "xx", // {random uuid}
	graphNavigationConfig: "xx", // json encoded object of configuration
	graphNavigationConfigName: "yy", // user specified name of the config
	userId: "xx"
}
  • partition key: graphNavigationConfigId
  • sort key: {none}

UsersGraphNavigationConfigs

{
	userId: "xx" // user who owns the GraphNavigationConfig
	graphNavigationConfigId: "xx",
}
  • partition key: userId
  • sort key: graphNavigationConfigId

graphNavigationConfig Object

{
	// grouping/row/cell/elements structure same tableConfig
	// add css theme and overwrite settings
	// standardize property names to match tableConfig structure (eg elementTypes)
	sections: [
		{
			sectionName: "xx",
			groupings: [
				{
					groupingName: "xx",
					rows: [
						{
							rowName: "xx",
							cells: [
								{
									cellName: "xx",
									elements: [
										{
											// displays the graph
											elementType: "graphNav",
											focusOnSelected: { //settings how to center viewport to selected element
												// eg speed of moving viewport focus
											}
											objTypes: { // which objectTypes are shown and settings for their display
												{serviceTag}: {
													{objType}: {
														// config for nodes of each objType
														// what fields to present, title, label, shape, colour (or css) etc..
														// filters
													},
													//..
												},
												//..
											],
											relationshipTags:[ // which relationshipTags are shown and settings for their display
												{
													relationshipTag: "xx",
													// config for each relationship type
													// which field sets weight etc
													// filters
												},
												//..
											]
										},
										{
											//presents detailed information about the selected element (eg node)
											elementType: "elementDetail",
											objTypes: { // objectType settings for detailed display
												{serviceTag}: {
													{objType}: {
														formObjectEditConfigId: "xx",
													},
													//..
												},
												//..
											],
										},
										{
											// present list of relationships for the selected node
											elementType: "relationships",
											relationshipTags:[ // which relationshipTags are shown and settings for their display
												{
													relationshipTag: "xx",
													// config for each relationship type
													// filters
												},
												//..
											]
										},	
										{
											elementType: "freeText",
											text: "xxx",
										},					
									]
								},
								// ..
							]
						},
						//...
					],
				},
				//...
			],
		},
		//...
	]
}

Multiple graphNav or elementDetail

  • One GraphNavigation setup can have multiple graphNav or elementDetail configs showing
  • Each has it's own settings so can present the navigation or detail for different uses

RelNode objType

  • identifies a single target node and the relationship that connects it to the source node
  • in most cases a Relnode will reflect data in a graph database, but could be other storage types
  • RelNodeId (unique identifier/dataId) for RelNode must be able to identify one node+relationship pair
  • for graph, to identify the node will require the objType (serviceTag_objectType) and identifier values (maybe field=value pairs), and the relationship UUID (relUuid)
  • how to combine all these into one string, maybe use Object Schema deliminator code, adding a level for the additional serviceTag_objectType/relUuid fields

InitialNode objType

  • Multiple Node initial queries may or may not have relationship based filters, this means results may not include relationship details
  • Will be nodes only so cannot use RelNode objType, have a separate ("InitialNode") objType that points to nodes only
  • for graph, to identify the node require objType (serviceTag_objectType) and identifier values (maybe field=value pairs)

Working documents

GraphNavigation