Giter Site home page Giter Site logo

swellrt / swellrt Goto Github PK

View Code? Open in Web Editor NEW
233.0 27.0 34.0 227.72 MB

SwellRT main project. Server, JavaScript and Java clients

Home Page: http://swellrt.org/

License: Apache License 2.0

Shell 0.05% Java 94.13% CSS 0.91% HTML 1.17% Smalltalk 0.17% JavaScript 3.56% Batchfile 0.01% Dockerfile 0.01%
swellrt java javascript-client realtime wave gwt operational-transformation storage-platform jsinterop swellrt-server

swellrt's Introduction

SwellRT Build Status Gitter

SwellRT is an open source backend-as-a-service. It provides prebuilt features to speed up development of collaborative Web applications:

  • Realtime storage (eventual consistency)
  • Extensible text collaborative editor
  • User management and authentication
  • Server federation with Matrix
  • Events and Bots (in development)

The main feature of SwellRT is realtime storage based in objects. They can be shared among participants that can mutate them in realtime. All changes are persisted and propagated transparently. Object's state is eventually consistent.

Check out API basics:

service.open({

	id: '<object-id>'

}).then(object => {

 	// Anyone can open the object
	object.setPublic(true);

});

Set and get a property:

object.set('person', 
  { 
	name: 'Alice',
	city: 'New York'
  });
  
object.get('person.city');

  

Listen for updates (local or remote):

object.node('person').addListener( event => {
	
	console.log('Property Updated ');

});	

Client libraries for Web and Java/Android (experimental) are provided.

Documentation and examples

API documentation can be found here

Basic examples can be found here. Try them running a SwellRT server and visiting http://localhost:9898

Running a SwellRT Server

You can build the server yourself or use our pre-built Docker image.

Building SwellRT from source code

Prerequisites

Clone the project

git clone [email protected]:SwellRT/swellrt.git
cd swellrt

Build

./gradlew compileJava devWeb

If you get a "User limit of inotify watches reached" error, please increase this limit following stesp here

Start the server

./gradlew run

Visit http://localhost:9898 to check server installation and try some demos.

Standalone installation (Jar)

To create a standalone installation of SwellRT, use the createDistBinTar or createDistBinJar tasks:

./gradlew createDistBinJar

The generated file is placed at distributions/ folder. Extracts the file and use the run-server.sh or run-server.bat scripts to start the server.

Edit configuration in config/wave.conf based on config/reference.conf.

Docker

Get docker image of SwellRT (latest version by default). Check out all available SwellRT versions at Docker Hub:

$ docker pull p2pvalue/swellrt

Run docker container in deattached mode (-d).

$ docker run \ 
-e MONGODB_HOST=<host> \
-e MONGODB_PORT=<port> \
-e MONGODB_DB=<db name> \
-p 9898:9898 \
-h swellrt \
--name swellrt \
-d p2pvalue/swellrt

This commands also binds default SwellRT server port 9898, to port 9898 in the host machine (-p 9898:9898). Sets hostname to "swellrt" (-h). And configures SwellRT to use a MongoDB server instance with the provided parameters.

See following section to configure a MongoDB instance.

Persistent folders

For productive installations of SwellRT, config and data folders should be outside the container. For example, to put all log files in host's folder /var/log/swellrt, run docker with -v parameter:

$ docker run -v /usr/local/swellrt/log:/var/log/swellrt  -p 9898:9898 -h swellrt -d p2pvalue/swellrt

These are all the folders you can map outside the container:

Folder (Docker cointainer) Description
/usr/local/swellrt/config Server config files
/usr/local/swellrt/log Server log files
/usr/local/swellrt/sessions Persistent HTTP Sessions
/usr/local/swellrt/avatars Users avatar images
/usr/local/swellrt/attachments User files

Server config

Server configuration can be adjusted by editing files in the config/ folder. Default settings can be found in the repo.

If you map the config/ folder in your host machine, you must copy those files to it.

Post installation

Visit "http://localhost:9898" and "http://localhost:9898/chat" to check server installation and try some demos.

MongoDB

This section explains how to install and configure a MongoDB server with SwellRT.

Get latest MongoDB Docker image

$ docker pull mongo

Run mongo container

$ docker run -p 27017:27017 --name mongo -d mongo

Run SwellRT (it assumes Docker containers are using default bridge network)

$ docker run \
-e MONGODB_HOST=172.17.0.1 \
-e MONGODB_PORT=27017 \
-e MONGODB_DB=swellrt \
-p 9898:9898 \
-h swellrt \
--name swellrt \
-d p2pvalue/swellrt

The database swellrt is created automatically if it doesn't exist.

Federation

SwellRT servers can be federated using Matrix protocol. A set up guide and technical documentation can be found here.

Contact and Support

Visit our Gitter Channel or email to [email protected].

Java/Android client

An experimental Java library is in package org.swellrt.beta.client.platform.java Check out chat demo app in *org.swellrt.beta.client.platform.java.ChatDemo".

Contributing

Read our contributing guide to learn more about our development process, how to propose bugfixes and improvements, and how to build and test your changes to SwellRT.

Acknowledgments

The SwellRT project is a fork of Apache Wave. Initial work of SwellRT has been funded by the EU research project P2Pvalue and supported by GRASIA research group of the Universidad Complutense of Madrid.

Cryptographic Software Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software:

Wave requires the BouncyCastle Java cryptography APIs: http://www.bouncycastle.org/java.html

swellrt's People

Contributors

alown avatar atd avatar atfornes avatar berlincount avatar dyukon avatar jorkey avatar llopv avatar pablojan avatar prastut avatar renfeng avatar s-a-m avatar vega113 avatar vjrj avatar waqee avatar wisebaldone avatar yuribf 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swellrt's Issues

TypeError: b.getDelegate is not a function

When trying to post to the pad, I get this error:

"TypeError: b.getDelegate is not a function
    at Object.f.edit (swellrt-0.js:3495:95)
    at Array.<anonymous> (http://192.168.1.112:8000/js/app.min.js:14:8248)
    at Object.<anonymous> (http://192.168.1.112:8000/js/app.min.js:8:9700)
    at f.$get.f.$digest (http://192.168.1.112:8000/js/app.min.js:6:4045)
    at f.$get.f.$apply (http://192.168.1.112:8000/js/app.min.js:6:5766)
    at es.$$debounceViewValueCommit (http://192.168.1.112:8000/js/app.min.js:8:9477)
    at es.$setViewValue (http://192.168.1.112:8000/js/app.min.js:8:9203)
    at HTMLTextAreaElement.l (http://192.168.1.112:8000/js/app.min.js:6:21811)
    at HTMLTextAreaElement.Z.event.dispatch (http://192.168.1.112:8000/js/app.min.js:2:15875)
    at HTMLTextAreaElement.Z.event.add.v.handle (http://192.168.1.112:8000/js/app.min.js:2:12650)"

Swellrt.org pad does not load with Firefox

I have issues accessing the pad at swellrt.org with firefox, while I do not have those issues neither accessing pear2pear app pad nor accessing the pad at swellrt.org with chromium.

I do not have the issue neither accessing with chromium.

Here I copy the browser log:

message code line
Session started /swellrt/ (línea 381)
Atmosphere Connection Close 501 atmosphere.js (línea 2898)
Network disconnected null /swellrt/ (línea 367)
Atmosphere callback 501 atmosphere.js (línea 2898)
Websocket failed. Downgrading to Comet and resending atmosphere.js (línea 2898)
Atmosphere Connection Transport Failure Websocket failed. Downgrading to Comet and resending

Rich Text operations in API

The API should expose methods to grammatically change text objects.
Currently in P2Pvalue/pear2pear we need to append a string to the end of the text, but probably we will need later to add it in any position of the text.

Rich text editor diffs display: erased text not propertly shown

SwellRT editor shows the differences between the last time you visited the text and the current version:

  • In yellow background new text
  • with a weird grey box, the erased text.

This grey box is unexpected, while the diff functionality is not really important in this phase of development. Please consider to remove the diff functionallity or fix the way erased text is displayed.

Do not require domain in login & register

I cannot finish the setup the test of pear2pear, because the domain at swellrt.p2pvalue.eu is different from the default one.

I propose letting users to send the username without the @domain.net, and let SwellRT fill that with the default domain, in the case @domain.net is not present.

openModel callback is overriden when several calls are done

Executing following code, the obtained result is 'bar' 'bar' while the expected result is either 'foo', 'bar' or 'bar', 'foo' (each callback called once).

window.SwellRT.openModel(
  waveId1,
  function(model) {
    console.log('foo');
  });
window.SwellRT.openModel(
  waveId2,
  function(model) {
    console.log('bar');
  });

Bind to 0.0.0.0

Let jetty to bind to every network interface and any host name

Pad issues in Android 5

Android 5 - Fefault browser:
Bad focus and auto-write words

Android 5 - Chrome
After entering a word in the collaborative editor, in the pad, the keyboard is hidden.

IPad OSX 7.1.1- Safari
Accepting 3rd party cookies must be enabled on Safari preferences. It still took quite time to load
but it works

SwellRT.query error when first parameter in the string form contains a wave id

I expect the following two queries to be equivalent, however, the second produces an error, am I doing something wrong?:

  • parameter in JSON format:
  var id = 'local.net/s+VPmCWEf0GGA';
  SwellRT.query({'root.id': id}, function(res){console.log(JSON.stringify(res))})
  • parameter in string format:
  var id = 'local.net/s+VPmCWEf0GGA'
  SwellRT.query("{'root.id': " + id + "}", function(res){console.log(JSON.stringify(res))})

Last form produces the following error GET http://swellrt:9898/swell/model?q=%7B%27root.id%27%3A+local.net%2Fs%2BVPmCWEf0GGA%7D 500 (Server Error)

maybe the problem is related with escaped characters in the URL?

Moving log files to log/ folder

Currently the root directory is flooded with wiab-server.log.* files.

What do you think about moving them to a log folder?

This would help the dockerization of the app

Wrong API callback (CONNECTION_CLOSE) on network transport downgrade to long-polling

The Atmosphere layer raises a Connection Close 501 on a transport downgrade.
SwellRT wraps and rethrown this Close 501 as a Connection Close API event. This prevents the client app to make further operations agains the API.

It seems clear that Atmosphere/SwellRT are not able to detect total connection closures, as long as Atmosphere Close events (500, 501...) can be both a reconnection step, a network temporary disconnection...

The proposed solution is to have following SwellRT connection states:

CONNECTED: the server-client connection is up and running so the app can keep using the API.

DISCONNECTED: can be triggered during a temporary o total disconnection situation, however, the client won't know this. The client app should avoid using the API

WebSocket connection to 'wss://swellrt.p2pvalue.eu:4343/atmosphere?X-Atmosphere-tracking-id=0&X-Atmo…ket&X-Atmosphere-TrackMessageSize=true&X-Cache-Date=0&X-atmo-protocol=true' failed: Error during WebSocket handshake: Unexpected response code: 200 atmosphere.js:1018
Atmosphere Connection Close 501 atmosphere.js:2898
Disconnected data [object Object] (index):183
Atmosphere callback 501 atmosphere.js:2898
Websocket failed. Downgrading to Comet and resending atmosphere.js:2898
Atmosphere Connection Transport Failure Websocket failed. Downgrading to Comet and resending atmosphere.js:2898
XHR finished loading: GET "https://swellrt.p2pvalue.eu:4343/atmosphere?X-Atmosphere-tracking-id=0&X-At…-TrackMessageSize=true&X-Cache-Date=0&X-atmo-protocol=true&_=1436946479688". atmosphere.js:1828
Atmosphere Connection Open atmosphere.js:2898
Atmosphere callback 200 

SwellRT's communication is broken after websocket is closed

This issue refers to wave.p2pvalue.eu server.

Symptoms:

  • Created a Wave with showcase list example project.
  • A Websocket connection is created successfully by the Atmoshphere layer
  • After 6 minutes with no activity (no messages sent to the server), the Websocket receives a "Connection Close Frame (Opcode 8, mask)" message and the websocket is closed.
  • Atmosphere layer sends a Transport close message to the server ("https://wave.p2pvalue.eu/atmosphere?X-Atmosphere-Transport=close&...") but it gets a 504 Gateway Time-out response after 1 minute from the NGINX server.
  • The broswer doesn't pass this response to the Atmoshphere layer because of CORS restriction (no 'Access-Control-Allow-Origin' is present in the response).

Current GWT config does not support Firefox.

After signing in with Firefox 36.0 but before the Wave dashboard has loaded, I get the following popup:

ERROR: Possible problem with your *.gwt.xml module file.
The compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8). Expect more errors.

In Chromium, Wave seems to works nicely.

When trying to reply to messages in Firefox instead, I'm unable to write anything. Deleting works once and then none of the message actions react to clicking. I get errors with varying stack traces. Here's one for your viewing pleasure:

Stack trace:
Token: 1425544159402
Exception caught: (TypeError) : this$static.setBaseAndExtent is not a function
Unknown.$collect (JsArrayString.java:42)
Unknown.fillInStackTrace_2 (StackTraceCreator.java:180)
Unknown.fillInStackTrace_0 (StackTraceCreator.java:518)
Unknown.fillInStackTrace (Throwable.java:115)
Unknown.Throwable_2 (Throwable.java:62)
Unknown.Exception_2 (Exception.java:33)
Unknown.RuntimeException_2 (RuntimeException.java:33)
Unknown.UmbrellaException_1 (UmbrellaException.java:71)
Unknown.UmbrellaException_2 (UmbrellaException.java:26)
Unknown.$fireEvent (HandlerManager.java:129)
Unknown.$fireEvent_1 (Widget.java:129)
Unknown.fireEvent_3 (Widget.java:127)
Unknown.fireNativeEvent (DomEvent.java:125)
Unknown.$onBrowserEvent (Widget.java:177)
Unknown.onBrowserEvent (Widget.java:163)
Unknown.dispatchEventImpl (DOM.java:1714)
Unknown.dispatchEvent_3 (DOM.java:1653)
Unknown.dispatchEvent_5 (DOMImplStandard.java:325)
Unknown.apply_0 (Impl.java:299)
Unknown.entry0 (Impl.java:356)
Unknown.anonymous (Impl.java:94)
Caused by: Token: 1425544159405
(TypeError) : this$static.setBaseAndExtent is not a function
Unknown.$collect (JsArrayString.java:42)
Unknown.fillInStackTrace_2 (StackTraceCreator.java:180)
Unknown.fillInStackTrace_0 (StackTraceCreator.java:518)
Unknown.fillInStackTrace (Throwable.java:115)
Unknown.Throwable_0 (Throwable.java:51)
Unknown.Exception_0 (Exception.java:25)
Unknown.RuntimeException_0 (RuntimeException.java:25)
Unknown.JavaScriptException_1 (JavaScriptException.java:117)
Unknown.JavaScriptException_0 (JavaScriptException.java:109)
Unknown.getCachableJavaScriptException (Exceptions.java:45)
Unknown.wrap (Exceptions.java:29)
Unknown.$setBaseAndExtent (SelectionW3CNative.java:203)
Unknown.$setAnchorAndFocus (SelectionW3CNative.java:130)
Unknown.$set_8 (SelectionImplW3C.java:170)
Unknown.set_21 (SelectionImplW3C.java:133)
Unknown.set_18 (NativeSelectionUtil.java:222)
Unknown.setCaret_5 (NativeSelectionUtil.java:232)
Unknown.$setCaret (PassiveSelectionHelper.java:274)
Unknown.setCaret_0 (PassiveSelectionHelper.java:263)
Unknown.$safelyRestoreSelection (EditorImpl.java:1977)
Unknown.focus_5 (EditorImpl.java:1932)
Unknown.$startNewSession (EditSession.java:184)
Unknown.$startEditing (EditSession.java:141)
Unknown.$focusAndEdit (ActionsImpl.java:151)
Unknown.addContinuation (ActionsImpl.java:114)
Unknown.onMouseDown_2 (ReplyIndicatorController.java:90)
Unknown.$dispatch_35 (EventDispatcherPanel.java:279)
Unknown.dispatch_35 (EventDispatcherPanel.java:278)
Unknown.$dispatch_31 (EventDispatcherPanel.java:183)
Unknown.onMouseDown (EventDispatcherPanel.java:284)
Unknown.$dispatch_8 (MouseDownEvent.java:56)
Unknown.dispatch_9 (MouseDownEvent.java:55)
Unknown.dispatch (GwtEvent.java:76)
Unknown.dispatchEvent_1 (EventBus.java:40)
Unknown.$doFire (SimpleEventBus.java:194)
Unknown.$fireEvent_0 (SimpleEventBus.java:88)
Unknown.$fireEvent (HandlerManager.java:127)
Unknown.$fireEvent_1 (Widget.java:129)
Unknown.fireEvent_3 (Widget.java:127)
Unknown.fireNativeEvent (DomEvent.java:125)
Unknown.$onBrowserEvent (Widget.java:177)
Unknown.onBrowserEvent (Widget.java:163)
Unknown.dispatchEventImpl (DOM.java:1714)
Unknown.dispatchEvent_3 (DOM.java:1653)
Unknown.dispatchEvent_5 (DOMImplStandard.java:325)
Unknown.apply_0 (Impl.java:299)
Unknown.entry0 (Impl.java:356)
Unknown.anonymous (Impl.java:94)

README.md missing server config step

Following the steps in README.md, ant run-server complains about missing server.config:

check-server-config:
[available] Unable to find server.config to set property server.config.present
check-server-config:  duration 0 seconds

BUILD FAILED

/home/USER/incubator-wave/build.xml:543: You need to copy server.config.example to server.config and edit it.

cp server.config.example server.config did not help as it gave an error:

The ' characters around the executable and arguments are
not part of the command.
     [java] Feb 18, 2015 12:05:38 PM com.google.inject.internal.MessageProcessor visit
     [java] INFO: An exception was caught and reported. Message: java.lang.NumberFormatException: For input string: "@SESSION_COOKIE_MAX_AGE@"
     [java] org.apache.commons.configuration.ConversionException: 'session_cookie_max_age' doesn't map to an Integer object

Instead, ant -f server-config.xml created a working config. How do you prefer to have it done?

Bug with the char '&'

On Google Chrome :

1/ With your keyboard, enter 'a&²'

Excepted : see 'a&²' string on the textarea

Actual : display 'a²&'

Server reboot causes client reconnection issues with anonymous sessions

After a server restart, two anonymous sessions editing the same text get server error sending changes even if clients pages have been reloaded.

Problem hypothesis is Server is keeping the wave channel for the anonymous session because the http session haven't change. However the wave channel status in client has been reset:

"Wavelet does not appear to have been initialized by client. Continuing anyway."

    [java] ago 06, 2015 11:37:37 AM org.waveprotocol.box.server.frontend.WaveViewSubscription submitRequest
     [java] Información: Submit oustandinding on channel ch5
     [java] ago 06, 2015 11:37:37 AM org.waveprotocol.box.server.waveserver.WaveServerImpl submitDelta
     [java] Información: Submit to [WaveletName local.net/s+y7Ukjg1ktpA/local.net/swl+root] by [email protected] @ 334 with 1 ops
     [java] ago 06, 2015 11:37:37 AM org.waveprotocol.box.server.frontend.ClientFrontendImpl waveletUpdate
     [java] Advertencia: Wavelet does not appear to have been initialized by client. Continuing anyway.
     [java] ago 06, 2015 11:37:37 AM org.waveprotocol.box.server.waveserver.WaveletNotificationDispatcher waveletUpdate
     [java] Grave: Runtime exception in update to wave bus subscriber org.waveprotocol.box.server.frontend.ClientFrontendImpl@31626345
     [java] java.lang.IllegalStateException: Expected deltas starting at version 0:d2F2ZTovL2xvY2FsLm5ldC9zK3k3VWtqZzFrdHBBL3N3bCtyb290, got 334
     [java]     at com.google.common.base.Preconditions.checkState(Preconditions.java:177)
     [java]     at org.waveprotocol.box.server.frontend.WaveletInfo.syncWaveletVersion(WaveletInfo.java:183)
     [java]     at org.waveprotocol.box.server.frontend.ClientFrontendImpl.waveletUpdate(ClientFrontendImpl.java:260)
     [java]     at org.waveprotocol.box.server.waveserver.WaveletNotificationDispatcher.waveletUpdate(WaveletNotificationDispatcher.java:127)
     [java]     at org.waveprotocol.box.server.waveserver.WaveletContainerImpl.notifyOfDeltas(WaveletContainerImpl.java:186)
     [java]     at org.waveprotocol.box.server.waveserver.LocalWaveletContainerImpl.submitRequest(LocalWaveletContainerImpl.java:109)
     [java]     at org.waveprotocol.box.server.waveserver.WaveServerImpl.submitDelta(WaveServerImpl.java:567)
     [java]     at org.waveprotocol.box.server.waveserver.WaveServerImpl.submitRequest(WaveServerImpl.java:369)
     [java]     at org.waveprotocol.box.server.frontend.ClientFrontendImpl.submitRequest(ClientFrontendImpl.java:194)
     [java]     at org.waveprotocol.box.server.frontend.WaveClientRpcImpl.submit(WaveClientRpcImpl.java:166)
     [java]     at org.waveprotocol.box.common.comms.WaveClientRpc$ProtocolWaveClientRpc$1.submit(WaveClientRpc.java:11213)
     [java]     at org.waveprotocol.box.common.comms.WaveClientRpc$ProtocolWaveClientRpc.callMethod(WaveClientRpc.java:11352)
     [java]     at org.waveprotocol.box.server.rpc.ServerRpcControllerImpl.run(ServerRpcControllerImpl.java:202)
     [java]     at org.waveprotocol.box.server.executor.RequestScopeExecutor$1.run(RequestScopeExecutor.java:69)
     [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
     [java]     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
     [java]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     [java]     at java.lang.Thread.run(Thread.java:744)
     [java] 
     [java] ago 06, 2015 11:37:37 AM org.waveprotocol.box.server.waveserver.PerUserWaveViewDistpatcher waveletUp


Improve GWT exceptions messages

GWT exceptions shown a nasty object reference code. Please review GWT exception handling.

Class$S1361: Invalid address 'asas': Missing domain prefix: @

SwellRT connection fails after web sockets upgrade GET call

After a web socket connection upgrade, the SwellRT connection fails and the events such as as SwellRT.events.ITEM_ADDED, ITEM_REMOVED and ITEM_CHANGED are not received:

This can be reproduced with P2Pvalue/swellrt-showcase connecting to an external wave server such as wave.p2pvalue.eu:

  1. Connect to the same wave id in two browser tabs/windows
  2. add some items to the list and see that it works as expected
  3. wait until a socket upgrade GET call is done (for instance in network tab o firebug)
  4. the tab/window where the GET call has been done is no longer updated with new additions to the list (i.e. the model changed events such as SwellRT.events.ITEM_ADDED, ITEM_REMOVED and ITEM_CHANGED are not received.)

See related issue Grasia/teem#20

Connection to SwellRT error

Using P2Pvalue/swellrt-showcase and current version of SwellRT (efec826), the connection seams to have problems:

Data is not sent to the server, being the info message of the form Sending data... (0/8/8)

I am not sure if it is related but, when refreshing, an atmosphere error is shown in console:
InvalidAccessError: A parameter or an operation is not supported by the underlying object

String added to list lost.

Using the API, a string is missed when added to a recently created and attached list.

Steps to reproduce issue:

1 open a model and register some events:

      window.WaveJS.openModel(
        window.configTimelineTests.testimoniesWaveId,
        function (model) {
          window.WaveJS.model = model;
          ...
          //register some events 
          model.root.get($scope.userId).registerEventHandler(
          ...

2 create a string, create a list, attach it to the root map and add the string to the list

      var str = window.WaveJS.model.createString(s);
      var list =  window.WaveJS.model.createList();
      var map = window.WaveJS.model.root;
      list = map.put(receiver,list);
      list.add(str);

3 try to access that string from the API after refreshing or using another tab or browser or comuter...
result: the list is attached to the root map as expected but the string is missing!

note: trying to access the string from the context (browser's tab) where it was created succed, i.e. it is in the client model but the change has not been propagated.

NoClassDefFoundError: org/swellrt/model/WaveConversationUtils

Starting the last version of SwellRT jar throws the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/swellrt/model/WaveConversationUtils
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
        at java.lang.Class.getDeclaredMethods(Class.java:1860)
        at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:662)
        at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:356)
        at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:151)
        at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:585)
        at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:543)
        at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:529)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:847)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:761)
        at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
        at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
        at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
        at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:967)
        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1000)
        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
        at org.waveprotocol.box.server.ServerMain.run(ServerMain.java:177)
        at org.waveprotocol.box.server.ServerMain.main(ServerMain.java:147)
Caused by: java.lang.ClassNotFoundException: org.swellrt.model.WaveConversationUtils
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 21 more

debugger in swellrt.js

Maybe we can get rid of this debugger sentence in SwellRT

function getAssertionsOn(){
  try {
    debugger;
    throw makeAssertionError();
  }
   catch ($e0) {
    $e0 = wrap($e0);
    if (instanceOf($e0, Q$AssertionError)) {
      $e0;
      return true;
    }
     else 
      throw unwrap($e0);
  }
  return false;
}

It usually pops up while developing pear2pear

Parameters in the ITEM_CHANGED's event function does not match README.md description

When registering an ITEM_CHANGED event, the old and new values of the string that has changed are passed to the registered function in the first parameter of the function as values of an array. However, README.md shows that the function will be called with two string parameters:

function(oldStr, newStr) 

Proposed solution: either change README file or change the way the registered function is called.
What do you think is better? personally I prefer the two parameters version (i.e. change the way the function is called)

Atmosphere try to load resources from the client's location instead from server

With Browser's websockets disable, we launch a local (file://) web client of SwellRT, then we got a error connecting to /atmosphere resource....

[17:14:43.557] GET https://wave.p2pvalue.eu/swellrt/swellrt.nocache.js [HTTP/1.1 200 OK 60ms]

[17:14:43.657] GET https://wave.p2pvalue.eu/swellrt/8B597D817312E120079BD2F1E778A897.cache.js [HTTP/1.1 200 OK 1632ms]

[17:14:49.112] POST https://wave.p2pvalue.eu/auth/signin?r=none [HTTP/1.1 200 OK 57ms]
[17:14:49.198] GET https://wave.p2pvalue.eu/atmosphere/atmosphere.js [HTTP/1.1 200 OK 337ms]
[17:14:49.488] "Unable to connect to file://wave.p2pvalue.eu/atmosphere"

SwellRT version

Add support for SwellRT version

Ideally, it should be shown with a command, like:

$ ant version
0.5.1

NullPointerException when authenticating

With the incubator-wave server running at http://localhost:9898, I created a user named "user". As I tried to sign in with it, I got an HTTP response with status code 500. The server log contained this:

[java] INFO: Authenticated user [email protected]
[java] 68681 [qtp772489482-32] WARN org.eclipse.jetty.servlet.ServletHandler - /auth/signin
[java] java.lang.NullPointerException
[java]  at org.waveprotocol.box.server.rpc.AuthenticationServlet.checkNoRedirect(AuthenticationServlet.java:432)
[java]  at org.waveprotocol.box.server.rpc.AuthenticationServlet.doPost(AuthenticationServlet.java:256)
[java]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
[java]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[java]  at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
[java]  at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
[java]  at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
[java]  at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
[java]  at org.waveprotocol.box.server.stat.RequestScopeFilter.doFilter(RequestScopeFilter.java:81)
[java]  at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
[java]  at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
[java]  at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
[java]  at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
[java]  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615)
[java]  at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:248)
[java]  at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:211)
[java]  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1615)
[java]  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
[java]  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
[java]  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
[java]  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
[java]  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
[java]  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:479)
[java]  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
[java]  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
[java]  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[java]  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
[java]  at org.eclipse.jetty.server.Server.handle(Server.java:459)
[java]  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:281)
[java]  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
[java]  at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
[java]  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
[java]  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
[java]  at java.lang.Thread.run(Thread.java:745)
[java] Feb 18, 2015 12:36:32 PM org.waveprotocol.box.server.rpc.AuthenticationServlet doPost
[java] INFO: User authentication failed: Login Failure: all modules ignored

ant compile fails with OpenJDK 8

I get the following error when trying to compile with OpenJDK 8:

compile:
     [echo] Compiling wave-api-0.4-incubating
    [javac] Compiling 108 source files to /home/USER/incubator-wave/build/src
    [javac] /home/USER/incubator-wave/src/org/waveprotocol/wave/model/document/MutableDocument.java:80: warning: [overloads] with(Action) in MutableDocument is potentially ambiguous with <V>with(Method<V>) in MutableDocument
    [javac]   public void with(Action actionToRunWithDocument);
    [javac]               ^
    [javac]   where V is a type-variable:
    [javac]     V extends Object declared in method <V>with(Method<V>)
    [javac] error: warnings found and -Werror specified
    [javac] /home/USER/incubator-wave/src/org/waveprotocol/wave/model/document/ObservableMutableDocument.java:54: warning: [overloads] with(Action) in ObservableMutableDocument is potentially ambiguous with <V>with(Method<V>) in ObservableMutableDocument
    [javac]   public void with(Action actionToRunWithObservableMutableDocument);
    [javac]               ^
    [javac]   where V is a type-variable:
    [javac]     V extends Object declared in method <V>with(Method<V>)
    [javac] /home/USER/incubator-wave/src/org/waveprotocol/wave/model/document/indexed/IndexedDocumentImpl.java:1699: warning: [rawtypes] found raw type: ReadableStringMap
    [javac]             ReadableStringMap annotations = rawInterval.annotations();
    [javac]             ^
    [javac]   missing type arguments for generic class ReadableStringMap<V>
    [javac]   where V is a type-variable:
    [javac]     V extends Object declared in interface ReadableStringMap
    [javac] /home/USER/incubator-wave/src/org/waveprotocol/wave/model/document/indexed/IndexedDocumentImpl.java:1700: warning: [rawtypes] found raw type: ReadableStringMap
    [javac]             ReadableStringMap diffFromLeft = rawInterval.diffFromLeft();
    [javac]             ^
    [javac]   missing type arguments for generic class ReadableStringMap<V>
    [javac]   where V is a type-variable:
    [javac]     V extends Object declared in interface ReadableStringMap
    [javac] 1 error
    [javac] 4 warnings

BUILD FAILED
/home/USER/incubator-wave/build.xml:250: The following error occurred while executing this line:
/home/USER/incubator-wave/build-common.xml:33: The following error occurred while executing this line:
/home/USER/incubator-wave/build-macros.xml:73: Compile failed; see the compiler error output for details.

java -version output:

openjdk version "1.8.0_31"
OpenJDK Runtime Environment (build 1.8.0_31-b13)
OpenJDK 64-Bit Server VM (build 25.31-b07, mixed mode)

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.