Giter Club home page Giter Club logo

convergence-project's People

Contributors

alalonde avatar mmacfadden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

convergence-project's Issues

Clicking "Browse" on the Models page does not refresh the models.

Steps to recreate:

  1. Create a new collection.
  2. Create a model in the new collection.
  3. Browse the collection in the models page.
  4. In another tab create a second model in the same collection.
  5. Click the browse button in the first tab.

The new model will not show up.

In offline mode, when a model is created after the resync process starts, it doesn't ever get synced

In our application JS logic, there is a process that is attempting to create a model at the same time that an offline mode attempts to connect again. Usually this model isn't created until after the connection completes / authenticates / background resync process begins. Immediately after creating the model, we attempt to open it. Convergence attempts to get the model from the server rather than opening the local (offline) version, where it of course doesn't exist yet.

Deleting an open model results in several errors

There are a few issues that arise. The first on is the following error:

ERROR 20:12:42.588 The model with id 'test' was forcefully closed by the server: The model was deleted undefined
  1. The model is left open locally, and is then forcefully closed, due to the delete. We should probably close thee model locally before the delete.
  2. I do not believe this should be an Error logged the console. This is probably just event we need to emit.
  3. The model id was undefined in the error message.

Then we get this:

ERROR 20:12:42.594 Unexpected error closing a model: test Error: the requested model was not open
    at ProtocolConnection_ProtocolConnection.onReply (convergence.global.js:8673)
    at ProtocolConnection_ProtocolConnection.onSocketMessage (convergence.global.js:8622)
    at convergence.global.js:8518
    at SafeSubscriber._next (convergence.global.js:8079)
    at SafeSubscriber.__tryOrUnsub (rxjs.umd.js:831)
    at SafeSubscriber.next (rxjs.umd.js:769)
    at Subscriber._next (rxjs.umd.js:716)
    at Subscriber.next (rxjs.umd.js:693)
    at FilterSubscriber._next (rxjs.umd.js:3555)
    at FilterSubscriber.Subscriber.next (rxjs.umd.js:693)

Then we get this:

ConvergenceError: Model already closing.
    at RealTimeModel_RealTimeModel._initiateClose (http://localhost:63342/convergence-client-javascript/dist/convergence.global.js:16061:19)
    at RealTimeModel_RealTimeModel._handleLocallyDeleted (http://localhost:63342/convergence-client-javascript/dist/convergence.global.js:16304:14)
    at http://localhost:63342/convergence-client-javascript/dist/convergence.global.js:18031:23

Then finally:

ERROR 20:12:45.230 Error removing model from offline store undefined

Editing a Convergence user saves the values in the wrong fields

From the admin console, I updated a user. Then when viewing the user detail again, the email, firstName, lastName, and displayName fields are all mixed up. Looks like the PUT request is correct so it seems to be an issue in the REST endpoint itself.

User API Key Support

Convergence users should be able to generate API Keys to use for integration with other services. This key would allow other services to make REST API Calls on behalf of a user.

The user should be able to create multiple named and individually enabled / disabled API Keys from within the Admin Console. This key should be useable in stead of a username / password authentication in the REST API.

Automatic reconnection

When the client gets disconnected, it should try to reconnect. While disconnected the various API functions should continue to work as reasonably expected, assuming the instance of the client remains in memory:

Models

  • The model API should not detach the model, and should cue local changes. When the client reconnects the model should resynchronize with the server, and the user can then continue editing while online again.
  • When disconnected all remote collaborators should appear to leave the model. When reconnecting the current remote collaborators will appear to open the model.
  • When disconnected remote references will be removed. Local references will still work. Upon reconnection, current references at the server will be re-added. Local references will be re-shared to the server.
  • It will not be possible to create or delete models while offline.
  • If a user looses permissions to a model, when the client reconnects, the mode will be closed.
  • If a model is deleted while the client is disconnected, when the client reconnects, the mode will be closed.

Activities

  • Any currently joined activities will remained joined, but all remote participants will leave.
  • Upon reconnection all joined activities will rejoin.
  • Activities can be joined offline, and will be joined when reconnected.
    Presence
  • When disconnected user presence will appear to go offline.
  • Upon reconnection all presence subscriptions will be re-subscribed.

Chat

  • Joined chat rooms will be re-joined when reconnected.
  • It will not be possible to send messages, or to join / leave chat's while offline.

Identity

  • Cached identities can be looked up, others will return undefined.

Clicking not exactly on the model table dropdown menu text does not work.

In the Domain Models table there is a context dropdown menu right next to the model id. If you go into this menu and click on an item, but not on the icon or text, the action is not taken on several of the items.

The reason is several child elements that are not Links are only taking up part of the space of the MenuItem element. AntD has css for Link elements to make them take up the whole space. We need to do the same for non link element.

Experimental RichText Support

This issue serves as a master issue for initial / experimental RichTextSupport for Convergence.

Goals

The goal is to build a robust core rich text data model that can be adapted to multiple rich text editors including:

  • Slate
  • CKEditor 5
  • Draft
  • Quill

Tasks

  • Design core rich text data model.
  • Prototype core rich text data model.
  • Validate adaptation methodology for Quill, Slate, CK5, and Draft.
  • Design RealTimeRichTextDocument.
  • Prototype RealTimeRichTextDocument.
  • Design Rich Text References.
  • Prototype Rich Text References.
  • Design rich text operations.
  • Design rich text transformations.
  • Design new protocol messages.
  • Prototype new protocol messages.
  • Prototype operations and transformation functions in client.
  • Prototype operations and transformation functions in server.
  • Test
  • Docs

Design

TBD

API

TBD

Invalid Pong Timeout message on the Server

If a Pong Timeout occurs from the client, the ClientActor produces an error message.

18:12:43 ERROR ClientActor - DomainId(convergence,default): Invalid message: 'PongTimeout'

Convergence CLI Conf has wrong application name

Versions
Please fill in all that apply:

  • Convergence Version: 1.0..0-rc.4
  • OS: Linux
  • Browser: N/A
  • Java Version: 11

Describe the Bug
The version info in the CLI Conf shows the legacy Convergence Server Node name.

Step To Reproduce

  1. Run the ConvergenceServer main with no args.

Expected Behavior
It should just say Convergence Server. We can also add the version from the BuildInfo class now.

Error thrown when the collection filter in the create model screen doesn't match any collections

When a valid collection filter is sent in the collection auto complete the following is returned:

{
  "body": {
    "data": [
      {
        "id": "test",
        "description": "test",
        "worldPermissions": {
          "read": false,
          "write": false,
          "remove": false,
          "manage": false,
          "create": true
        },
        "overrideSnapshotPolicy": false,
        "snapshotPolicy": {
          "snapshotsEnabled": false,
          "triggerByVersion": false,
          "maximumVersionInterval": 1000,
          "limitByVersion": false,
          "minimumVersionInterval": 1000,
          "triggerByTime": false,
          "maximumTimeInterval": 600000,
          "limitByTime": false,
          "minimumTimeInterval": 600000
        }
      }
    ],
    "startIndex": 0,
    "totalResults": 1
  },
  "ok": true
}

When the filter doesn't match any collections, instead of returning no results, it is returning an error:

{
  "body": {
    "error_code": "not_found"
  },
  "ok": false
}

Exception if Model Query returns a model with no data

If you use the ModelService.query() method and a model is returned that has no data (e.g. the root object is {}). The following exception is thrown:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.mapObjectValues (/Users/michael/development/convergence/client/convergence-client-javascript/src/main/util/ObjectUtils.ts:27:17)
    at toModelResult (/Users/michael/development/convergence/client/convergence-client-javascript/src/main/model/ModelMessageConverter.ts:173:5)
    at Array.map (<anonymous>)
    at /Users/michael/development/convergence/client/convergence-client-javascript/src/main/model/ModelService.ts:336:68

The reason is because the data object will likely be undefined, we be not checking for default values coming from the protocol

Setting Domain User password does not work

There are multiple issues here:

  • The admin console is making a bad REST call to the server.
  • The password policy pulls from the convergence settings.
  • The toaster says that the 'namepsace' has been updated.

Can't query for model with only user permissions

Models are not being properly returned by the query API based on permissions.

  1. Create a collection called test
  2. Create a model test-model in collection test

Then issue the query:

"SELECT * FROM test";

The model will be correctly included in the results if:

  1. The collection has world read permissions.
  2. Thee model overrides the collection world permissions and has world read permissions on the model.

The model will not be included (incorrectly) if:

  1. The world read permissions are not set and a user specific read permission is granted.

Experimental Offline Support

Convergence should support editing while offline. The initial implementation will used IndexedDB ad the local data store.

This will require the following additions to the JS client:

  • Implement reconnection strategy for client and server (#5)
  • Update Activity API to Support Offline
  • Update Chat API to Support Offline
  • Update Presence API to Support Offline
  • Settings to enable offline mode
  • Update Model API to support offline
    • Implement model reconnection / reopen algorithm
    • Design pluggable offline storage API
    • Research IndexedDB best practices
    • Create initial concrete implementation
    • Store local and remote operations for models as model is edited
    • Take snapshots of model as needed and clean up no longer needed operations
    • Load model from local storage brining it back to the most recent state, and prepare for resync with server
    • Implement periodic model downloading (add configuration options)
    • Implement strategy for synchronizing non-open models back to the server
    • Handle the case where an offline model was created, and now needs to be created at the server.
    • Handle the case where an offline model was deleted, and now needs to be deleted at the server.
    • Define mechanism to communicate merge / sync conflicts. (e.g. you are trying to update a model that doesn't exists, or you are trying to create a model that now exists.)
  • Update Identity Cache and offline storage to store identity information locally
  • Update API for initial construction of Domains and Connection
  • Complete testing
  • Update documentation

Refactor PresenseService so it can shard

The current presence service is a singleton per-domain on the server side. This will not scale. We must turn it into a sharded subsystem. This requires some design work

Move all ModelDeletedEvent firing to the RealTimeModel class

Right now the ModelService is firing a ModelDeletedEvent when a model is deleted locally. This should actually be fired by the RealTimeModel. This event is fired by the RealTimeModel when the server informs it that the model was deleted. So at the moment we need to listen in two different places. The intention of this event was to let users of an OPEN model that it was deleted.

Add ability to query models by ID

Currently, when doing a ModelService.query you can only query within a model. Thus, there's no way of simply querying by its ID, e.g. select from collection where @id = 'foo'. Presumably you'd need some special syntax to distinguish a model's metadata vs a field within a model.

Use PagedData structure for all paged REST calls

We have implemented a paged data structure as a result type for REST calls that support an Offset and Limit. The data returned looks like:

{
  data: [...],
  offset: 5
  totalResults: 10
}

Many of the server REST calls that support offset / limit, do not return this, and only return the body. This does not allow the admin console to properly support pagination.

Convergence Server Distribution Improvements

The server project initially was intended to be wrapped up in a docker container. It can now be accessed directly. The zip / tgz file contains no documentation (README, etc.) and no configuration file on its own. Both should be added.

Intended file structure should look like this:

bin
lib
conf
README.txt
LICENSE.txt

Convergence Server default config file is incorrect

Versions
Please fill in all that apply:

  • Convergence Version: 1.0.0
  • OS: Linux
  • Browse: N/A
  • Java Version: openjdk 11

Describe the Bug
The default config file is set to /etc/convergence/convergence-server.conf.

Step To Reproduce
A code snippet or gist to reproduce the issue will greatly improve our response time

https://github.com/convergencelabs/convergence-server/blob/f8d65914de754980502ee3d5f091b92c27e62544/src/main/scala/com/convergencelabs/convergence/server/ConvergenceServerCLIConf.scala#L30

Expected Behavior
The default config file should be relative to the convergence server home directory.

REST model PUT wipes out data

Been testing the model-specific rest API endpoints. GET, POST and DELETE work fine with individual models, but the PUT command doesn't seem to overwrite the model's contents properly. It seems to just wipe it out.

Test command:

PUT {{convergenceRestUrl}}/domains/convergence/default/models/created-with-id
{
    "collection": "test",
    "data": {
	"key": "value2"
    }
}

The command executes without an error, but subsequent queries result in NullPointerExceptions:

15:19:45 ERROR ConvergenceRestApi - Error handling rest call: http://localhost:8081/domains/convergence/default/model-query
java.lang.NullPointerException: null
	at com.convergencelabs.server.datastore.mapper.ODocumentMapper.validateDocumentClass(ODocumentMapper.scala:22) ~[classes/:?]
	at com.convergencelabs.server.datastore.mapper.ODocumentMapper.validateDocumentClass$(ODocumentMapper.scala:21) ~[classes/:?]
	at com.convergencelabs.server.datastore.domain.mapper.ObjectValueMapper$.validateDocumentClass(ObjectValueMapper.scala:19) ~[classes/:?]
	at com.convergencelabs.server.datastore.domain.mapper.ObjectValueMapper$.oDocumentToObjectValue(ObjectValueMapper.scala:39) ~[classes/:?]
	at com.convergencelabs.server.datastore.domain.mapper.ObjectValueMapper$ODocumentToObjectValue$.asObjectValue$extension(ObjectValueMapper.scala:35) ~[classes/:?]
	at com.convergencelabs.server.datastore.domain.ModelStore$.docToModel(ModelStore.scala:75) ~[classes/:?]
	at com.convergencelabs.server.datastore.domain.ModelStore.$anonfun$modelDataQuery$2(ModelStore.scala:298) ~[classes/:?]
	at scala.collection.immutable.List.map(List.scala:286) ~[scala-library-2.12.10.jar:?]
	at com.convergencelabs.server.datastore.domain.ModelStore.$anonfun$modelDataQuery$1(ModelStore.scala:297) ~[classes/:?]
	at scala.util.Success.$anonfun$map$1(Try.scala:255) ~[scala-library-2.12.10.jar:?]
	at scala.util.Success.map(Try.scala:213) ~[scala-library-2.12.10.jar:?]
	at com.convergencelabs.server.datastore.domain.ModelStore.modelDataQuery(ModelStore.scala:295) ~[classes/:?]

Immediately apply model permissions changes from REST API to open models

At the present time, changes to model permissions that go through the realtime API take effect immediately on any open models. On the other hand permissions changes through the rest API only take effect after the model is closed an opened.

Changes to both the model permissions, and the collection permissions that impact a given model should be reflected immediately on any open models.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.