Ticket #411 (closed Enhancement: fixed)

Opened 7 years ago

Last modified 7 years ago

Core: on-demand loading of composite values

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.1
Component: DeepaMehta Standard Distribution Version: 4.0.14
Keywords: Cc: dgf, Malte
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description

The server-side (Java) plugin developer should not be required to care about loading the composite value when retrieving an object. Instead, the Core should load the composite value when needed.
That is, the fetchComposite parameters should be vanish from the Core Service API, and only appear in the REST API.

Background: The new optimized approach for updating composite values (see #339) rely on objects with the composite value already loaded. From the framework view it would be unacceptable to require the plugin developer to care about composite value loading or not in dependency what she intends to do with the object. So, at least for an update operation the framework must load the composite value on-demand anyway. From there it would be a small step applying on-demand loading for every relevant operation. Besides "update" it would be "access child topic" as well.

Change History

comment:1 Changed 7 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Jörg Richter

Core: lazy composite value laading (#339, #411).

Before an update operation is performed on an object its composite value is loaded lazily. Applies to facet updating as well.
Pending for a "get child topic" operation.
See ticket 411.

Update optimization: updating a "composition one" child topic involves no further DB read operation.
Pending for:

  • composition many
  • aggregation one
  • aggregation many

See ticket 339.

comment:3 Changed 7 years ago by Jörg Richter

Core: drop [get|set]ChildTopicValue?() (#339, #411)

BREAKING CHANGES

DeepaMehtaObject? (interface):

  • SimpleValue? getChildTopicValue() is dropped
  • void setChildTopicValue() is dropped

CompositeValue? (interface):

To adapt your plugins, replace

    object.getChildTopicValue("child.type.uri")

with

    object.getCompositeValue().getTopic("child.type.uri").getSimpleValue()

Replace

    object.setChildTopicValue("child.type.uri", new SimpleValue(val))

with

    object.getCompositeValue().set("child.type.uri", new SimpleValue(val), clientState, directives)

Furthermore: CompositeValue?'s getTopic() and getTopics() methods do fetch the respective child topics lazily.

See ticket 339.
See ticket 411.

comment:4 Changed 7 years ago by Jörg Richter

Core: add accessors to attached comp value (#339).

CompositeValue? (interface) has new accessor methods:

  • getString(String childTypeUri)
  • getInt(String childTypeUri)
  • getLong(String childTypeUri)
  • getDouble(String childTypeUri)
  • getBoolean(String childTypeUri)
  • getObject(String childTypeUri)
  • getComposite(String childTypeUri)

The respective child topic is loaded lazily.

See ticket 339.
See ticket 411.

comment:5 Changed 7 years ago by Jörg Richter

Core: lazy composite value laading (#339, #411).

Before an update operation is performed on an object its composite value is loaded lazily. Applies to facet updating as well.
Pending for a "get child topic" operation.
See ticket 411.

Update optimization: updating a "composition one" child topic involves no further DB read operation.
Pending for:

  • composition many
  • aggregation one
  • aggregation many

See ticket 339.

comment:6 Changed 7 years ago by Jörg Richter

Core: drop [get|set]ChildTopicValue?() (#339, #411)

BREAKING CHANGES

DeepaMehtaObject? (interface):

  • SimpleValue? getChildTopicValue() is dropped
  • void setChildTopicValue() is dropped

CompositeValue? (interface):

To adapt your plugins, replace

    object.getChildTopicValue("child.type.uri")

with

    object.getCompositeValue().getTopic("child.type.uri").getSimpleValue()

Replace

    object.setChildTopicValue("child.type.uri", new SimpleValue(val))

with

    object.getCompositeValue().set("child.type.uri", new SimpleValue(val), clientState, directives)

Furthermore: CompositeValue?'s getTopic() and getTopics() methods do fetch the respective child topics lazily.

See ticket 339.
See ticket 411.

comment:7 Changed 7 years ago by Jörg Richter

Core: add accessors to attached comp value (#339).

CompositeValue? (interface) has new accessor methods:

  • getString(String childTypeUri)
  • getInt(String childTypeUri)
  • getLong(String childTypeUri)
  • getDouble(String childTypeUri)
  • getBoolean(String childTypeUri)
  • getObject(String childTypeUri)
  • getComposite(String childTypeUri)

The respective child topic is loaded lazily.

See ticket 339.
See ticket 411.

comment:8 Changed 7 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.