Closed amanaman118 closed 7 years ago
hey @amanaman118
The java master is currently using websockets as part of our move from engine.io to uws.
Can you use this version:
Thnx @yasserf I have downloaded zipped content of commit id (0b6d3043ca4963ff83116c5e14d28d46c8938664) shared by you.
But couldn't find any difference in codebase of above commit id and latest code pulled from java master branch.
As i have compared all code file with latest one. Their is no change in the source code of deepstream to connect back with tcp connectivity.
Ah, sorry I assumed you were connecting via websocket which makes connectivity not work against master deepstream.io server
Can you tell me if https://github.com/deepstreamIO/deepstream.io-client-java/tree/master/src/testapplication/java/io/deepstream/testapp works? That covers all the usual subscribe/publish aspects.
Sorry to say, i am getting exception with what above sample code has. Its with url exception.
java.net.URISyntaxException: URL provided is not correct: ws://192.168.1.134:6020/deepstream
10-12 17:29:42.565 com.aman.ds W/System.err: at io.deepstream.EndpointTCP.
yeah thats the problem due to it using pure websockets rather than TCP, you should use the latest release tag. I do apologise, this is a pretty big transition so relying on master isn't the best approach for the next few days.
Hi, @yasserf I have tried 0.8 tag release as well. But same issue persist when tried from android device. Deepstream terminal is showing incoming connection. Do i need to use any older version of deepstream as well. Because i have used 0.8 tag release of java/android client.
Below is what comming over in my terminal window
INFO | logger ready
INFO | deepstream version: 1.1.1
INFO | configuration file loaded from conf/config.yml
INFO | library directory set to: /Aman/SafariDwn/deepstream.io-mac-1.1.1/lib
INFO | messageConnector ready
INFO | storage ready
INFO | cache ready
INFO | authenticationHandler ready: none
INFO | permissionHandler ready: valve permissions loaded from /Aman/SafariDwn/deepstream.io-mac-1.1.1/conf/permissions.yml
INFO | Using uws websocket server
CLUSTER_JOIN | iu7ax5gd-1wlevc7gn9a84
INFO | Listening for tcp connections on 0.0.0.0:6021
INFO | Listening for browser connections on 0.0.0.0:6020
INFO | Deepstream started
CLUSTER_LEAVE | iu7ax5gd-1wlevc7gn9a84
CLUSTER_JOIN | iu7ax5gd-1wlevc7gn9a84
INCOMING_CONNECTION | from 192.168.1.134:51287 via tcp
Also i have tried running below app https://github.com/deepstreamIO/ds-demo-pizza-tracker
but below is what i am getting as an issue
Process: example.deepstream.io.pizzatracker, PID: 11566
io.deepstream.DeepstreamException: CONNECTION_ERROR: Can't connect! Deepstream server unreachable on 52.29.229.244:6021
at io.deepstream.DeepstreamClientAbstract.onError(DeepstreamClientAbstract.java:55)
at io.deepstream.Connection$1.run(Connection.java:163)
at java.util.Timer$TimerImpl.run(Timer.java:284)
Later i thought that server at '52.29.229.244' mite not be working. So i update ip to my local machine ip, i have got it running. But master running on terminal is not able to track the device.
Hey Aman,
I'm about to merge the websockets branches into master, and will then test out the java/android example and let you know the outcome!
Oky, but after doing restart of deepstream 1.1.1 along with 0.5 client. Things are working as expected. Master running on terminal in my mac machine is able to listen to client being connected from android devices.
Great! Will try and normalize everything by end of today so all masters are using websockets.
Thnx @yasserf Is their any way i can do load test to confirm whether things are working perfectly or not. For me to be production ready.
Hey aman,
We load tested the server in different scenarios and are currently working on a test harness for simultaneous connections. We currently managed to get up to 1million concurrent connections using websockets due to its lower footprints than engine.io.
Can you specify what kind of load test you are interested in?
Hello Yaseer,
Thnx for sharing information over test harness. I have gone over to link shared https://deepstream.io/info/performance/four-billion-messages-per-hour/ it had covered what so ever i am looking for.
Perfect!
Hi, Seen your commits with websocket changes. Can i start using it or should i wait for stable release. As i can see their is a build-failure tag marked for repo on master branch.
Also is their any possibility to get 0.5 version codebase, i have checked in tags/branches couldn't find it.
You can start using it against deepstream master, ill be doing a alpha release soon with artifacts
Hi, I have tested the latest master branch. Upon login function of java client deepstream. Its stuck as it not getting listened on server end.
As i said in starting, master running on terminal is not able to intercept incoming new connection. Any help?
Also as i guess server of deepstream 1.1.1 is working over tcp on port 6021 and for browser connection on port 6020. I guess due to which its not intercepting new incoming connection from android devices ends. As they have now been ported to websockets.
INFO | Listening for tcp connections on 0.0.0.0:6021 INFO | Listening for browser connections on 0.0.0.0:6020
INFO | logger ready
INFO | deepstream version: 1.1.1
INFO | configuration file loaded from conf/config.yml
INFO | library directory set to: /Aman/SafariDwn/deepstream.io-mac-1.1.1/lib
INFO | messageConnector ready
INFO | storage ready
INFO | cache ready
INFO | authenticationHandler ready: none
INFO | permissionHandler ready: valve permissions loaded from /Aman/SafariDwn/deepstream.io-mac-1.1.1/conf/permissions.yml
INFO | Using uws websocket server
CLUSTER_JOIN | iue0xld0-1p6wr8svgmgw4
INFO | Listening for tcp connections on 0.0.0.0:6021
INFO | Listening for browser connections on 0.0.0.0:6020
INFO | Deepstream started
INCOMING_CONNECTION | from 127.0.0.1:53702 via tcp
AUTH_SUCCESSFUL | open
Yeah, your currently using the binary version. I'm trying to get a binary built but unfortunately travis isn't enough to spit that. Will let you know as soon as it's sorted
Yes, waiting for binary releases of Deepstream server to check stuff working end to end at my end.
Can you help me how to emit event from master end to client ends for some specific devices connected. Ex. let suppose their are 10k user connected to DS (deepstream) and subscribe to some event '57fb28b9ef70ca0d6238df2d/commands' and now i want to send event from master to client to only 2k users who are connected to DS out of 10k How to emit target specific set of users only?
I think you might be looking for a different messaging paradigm. In pub-sub every client that subscribes to an event will receive the associated message on that event. For more granular sending of messages, just use more granular patterns.
Oky, i am bit confused what to use to target certain set of user base. What i have unique for every device is device-id and its alpha numeric.
Hi @amanaman118 We've just published a beta version of deepstream v1.2.0 that uses pure websockets, which might fix some of the issues that you're having. The mac release currently has a broken config.yml, but if you delete that (or just the logging section), it should work fine.
Hi, @jdmnd thnx for putting up effort to provide me release of web-sockets.
I have downloaded v1.2.0 beta and tried it running. Its started fine after getting it running after commenting out logging part in config.yml file.'
I have tried running web-socket java client from android device shared by @yasserf , but its not working as expected. I am getting connection time out issue.
After bit of debugging to got know that under Connection class authenticate() function.
if( this.connectionState == ConnectionState.AWAITING_AUTHENTICATION )
above line shows that connectionState is Closed. I guess due to which connection is not getting connected.
Hello @yasserf
I have tried your's latest release of websocket server 2.0.0rc1 and its working fine on websockets
But after bit of change in master-clone of java client repo i started working as expected.
Under class 'Connection.java' their is a function 'handleConnectionResponse' if i comment below line to check authArgument then its working fine. As if we don't use any argument in deepstream login() function, then below code block doesn't send over authentication message to server and Ping-Pong keeps on happening between server and client. Auth timeout happens after sometime. Can you please update below issue in codebase. Or let me know any other thing i am missing to set authentication argument. As i guess using of authenticate is made mandatory.
else if( message.action == Actions.ACK ) {
this.setState( ConnectionState.AWAITING_AUTHENTICATION );
//if( this.authParameters != null )
{
this.sendAuthMessage();
}
}
I have done setup of deepstream on my local mac machine. its working fine used js client for creating master to emit event whenever device gets connected to deepstream with listen and its working fine
And below is what i have used in java to connect with deepstream
Its able to connect to deep-stream, as i can see logs coming over deep-stream terminal for Incoming connection But master which is working already is not able to listen to above android incoming device also emitting manual event is not reaching to device.
Whereas, trying same stuff from another terminal window of my mac machine its working fine.
Need help on why android device is not able to listen to any event happening from master. Anything i am missing.