Comments (24)
hey @amanaman118
The java master is currently using websockets as part of our move from engine.io to uws.
Can you use this version:
from deepstream.io-client-java.
Thnx @yasserf I have downloaded zipped content of commit id (0b6d304) 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.
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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.(EndpointTCP.java:36)
10-12 17:29:42.565 com.aman.ds W/System.err: at io.deepstream.Connection.createEndpoint(Connection.java:308)
10-12 17:29:42.565 com.aman.ds W/System.err: at io.deepstream.Connection.(Connection.java:54)
10-12 17:29:42.565 com.aman.ds W/System.err: at io.deepstream.DeepstreamClient.(DeepstreamClient.java:79)
10-12 17:29:42.565 com.aman.ds W/System.err: at io.deepstream.DeepstreamClient.(DeepstreamClient.java:67)
10-12 17:29:42.565 com.aman.ds W/System.err: at com.semusi.sdk.MainActivity$1.doInBackground(MainActivity.java:251)
10-12 17:29:42.565 com.aman.ds W/System.err: at com.semusi.sdk.MainActivity$1.doInBackground(MainActivity.java:241)
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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!
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
Great! Will try and normalize everything by end of today so all masters are using websockets.
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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?
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
Perfect!
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
You can start using it against deepstream master, ill be doing a alpha release soon with artifacts
from deepstream.io-client-java.
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
from deepstream.io-client-java.
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
from deepstream.io-client-java.
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?
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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.
from deepstream.io-client-java.
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();
}
}
from deepstream.io-client-java.
Related Issues (20)
- Serious Issues with Login if Deepstream Host is Down HOT 2
- Android app hangs on client.close() after client.login()
- client.record.getRecord() hangs for ever if no internet connection is available
- deepstream.io-client-java v2+ not able to login API 21-
- Update Java Web Sockets Dependency
- DeepstreamClient.close() throwing NullPointerException on Android 8(Oreo) HOT 3
- Connection Error
- Don't know if subscribed to event with DeepstreamClient.event.subscribe
- No updates on repository. HOT 3
- NPE when calling unsubscribe() while not subcribed
- Reconnect throw exception but didn't return it to the method who wants to connect
- Add source jars?
- Include custom Gson serialization
- getRecord() method hangs on simultaneous request.
- Redundant JsonElement handling in method Record:set if pass JsonElement as value
- App crashes on connection change using deepstream
- v4 support? HOT 6
- deepstream java v2.2.2 cannot login to deepstream server v4.2.5 HOT 5
- java client code does not work well HOT 2
- Would love some information about the android/ios integration, to work on the code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepstream.io-client-java.