Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Java client for DP 2.0 #39

Closed
gioma68 opened this issue Nov 21, 2016 · 14 comments
Closed

Java client for DP 2.0 #39

gioma68 opened this issue Nov 21, 2016 · 14 comments
Assignees

Comments

@gioma68
Copy link

gioma68 commented Nov 21, 2016

Hi, my company is testing DP technology. We have build a game server (in java) that use DP as gateway beetwen js client (built with react) and the backend (java server). Actually it work well with DP 1.1.1 (on ubuntu 16) using java client 1.0-SNAPSHOT (installed in local mvn some weeks ago) and js library 1.1.1.
Now setting up a new ubuntu server we have seen that apt get, install a new version 2.0 of DP with this new versione the old java client doesn't work. We have tried to download and compile the actual java client (master branch) present on git but DP get some errors about auth request (AREQ).
So it seems that the actual version on git for java client is not yet compatible with DP 2.0, my question then is when it's planned the official release of the related java client?

Thanks in advance for any reply.

Regards, Giovanni

@yasserf
Copy link
Contributor

yasserf commented Nov 21, 2016

Hey Giovanni,

I'll look into why tagging the release did not update it correctly, as far as I'm aware the connection type has been updated so the AREQ is an odd regression.

I'll be looking into this today and inform you once its complete,
Thanks,
Yasser

@gioma68
Copy link
Author

gioma68 commented Nov 21, 2016

Thanks very much Yasser for your prompt reply. I'll wait for your next info. Have a nice day and good work.

@jdmnd
Copy link
Contributor

jdmnd commented Nov 21, 2016

Hey @gioma68,

We've just released a fix for some authentication issues in the client and I managed to get the release deploying properly on tags, so it's now available as v1.0.1 on bintray/maven.

Let me know if this fixes the issues you were having,
John

@gioma68
Copy link
Author

gioma68 commented Nov 21, 2016

hi @jdmnd, i'll try and let you the result soon ..thank very much for your strong support.

Giovanni

@gioma68
Copy link
Author

gioma68 commented Nov 21, 2016

We compile the java project with the new client v1.0.1 on bintray/maven (adding the repo reference to pom.xml).
But DP server hang with this error log when client establish the first connection:
INFO | Listening for health checks on path /health-check CLUSTER_JOIN | ivsavwkl-whjldk4pd40g INFO | Listening for websocket connections on 0.0.0.0:6020/deepstream INFO | Deepstream started INCOMING_CONNECTION | from undefined (undefined) TypeError: name.charCodeAt is not a function TypeError: name.charCodeAt is not a function at DistributedStateRegistry._createCheckSum (nexe.js:21420:55) at DistributedStateRegistry._add (nexe.js:21345:20) at DistributedStateRegistry.add (nexe.js:21236:9) at PresenceHandler._handleJoin (nexe.js:26705:26) at emitOne (events.js:96:13) at ConnectionEndpoint.emit (events.js:188:7) at ConnectionEndpoint._registerAuthenticatedSocket (nexe.js:24444:8) at ConnectionEndpoint._processAuthResult (nexe.js:24532:8) at HttpAuthenticationRequest._onComplete (nexe.js:20536:9) at done (nexe.js:19477:14) CLUSTER_LEAVE | ivsavwkl-whjldk4pd40g

In the client side, the flow work with login OK (even if we can't parse the json response - obviously). Consider we have enabled http auth that point to a rest server for user login credentials verification, but this work well in the previous version.

@AlexBHarley
Copy link
Contributor

Hey @gioma68, we tried to replicate this but weren't able to. Could you get back to us with a java code snippet we can run?

@gioma68
Copy link
Author

gioma68 commented Nov 29, 2016

Hi @AlexBHarley this is the code part of our java server that establish a connection to DP and login with a test account (this code work well with DP 1.1.1)

`......

		try {
			ds = new DeepstreamClient(ServerParams.DEEPSTREAM_HOST);
			Trace.println("DEEPSTREAM: Try to login with GAME-SERVER account...");
			JsonObject authData  = new JsonObject();
			// USE UID/PWD credentials for GAME SERVER
			authData.addProperty("username", "test");	
			authData.addProperty("password", "test");
			LoginResult res = ds.login(authData); 
			// Checking if logged...
			if (res.loggedIn()){
				Trace.println("DEEPSTREAM: LOGIN OK.");
                      .........

`

@AlexBHarley
Copy link
Contributor

Hi @gioma68, I tried this again with a various combination of the java client 1.0.1, master and deepstream 2.0.0, 2.0.1 and couldn't recreate this.

Could you confirm that you're on deepstream 2.0.1? We were aware of some issues with undefined connection data in 2.0.0

@gioma68
Copy link
Author

gioma68 commented Nov 29, 2016

No @AlexBHarley the test was done only with DP 2.0.0. Now we came back to DP 1.1.1 because we are busy with game server development...when it was possible we will try to migrate to DP 2.0.1 and related java+js client. Thanks for your strong support.

@gioma68
Copy link
Author

gioma68 commented Nov 29, 2016

Hi @AlexBHarley, just for completeness.
I notice that the java source on git have version 1.0-SNAPSHOT yet in build.gradle, and the repo was changed from jcentral to mavencentral. Where I can find the 1.0.1 version to set in my pom file and try with the right java client for DP 2.0.1? Thanks in advance.

@yasserf
Copy link
Contributor

yasserf commented Nov 29, 2016

Hey @gioma68,

The snapshot version in the gradle file is actually picked up from a seperate section ( using bin tray ).

The way bintray works is via https://bintray.com/deepstreamio/maven/deepstream.io-client-java, which uploads to bintray which then gets mirrored to jCenter. As far as I'm aware it should not go near mavencentral.

@gioma68
Copy link
Author

gioma68 commented Nov 29, 2016

Hi @yasserf,
we recompile our java server using jar client 1.0.1 on bintray and as backend DP 2.0.1, but also in this case DP server hang with trace error TypeError: name.charCodeAt is not a function TypeError: name.charCodeAt... when java client try to get login auth.

@yasserf
Copy link
Contributor

yasserf commented Nov 29, 2016

hey @gioma68,

Thank you for your update. We are not able to reproduce the issue, but it is something we certainly we want to fix.

Can you run ./deepstream info so we can get an idea about your platform on 2.0.1?

@AlexBHarley
Copy link
Contributor

Closing due to age

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants