Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help #38

Open
Blobme opened this issue Jun 19, 2016 · 3 comments
Open

help #38

Blobme opened this issue Jun 19, 2016 · 3 comments

Comments

@Blobme
Copy link

Blobme commented Jun 19, 2016

Hi,
I'm trying to recreate it with no success.
I did like you with mysite.github.io/map where I upload the static file using git.

And I'm using OpenShift cloud to host the server :
so I have Vert.x 2.1 on it and now what I have to do ? upload ChatVerticle.java and run it?
I tried on Putty command to run the server : java ChatVerticle.java but it's not working
or do I have to edit vertx.env to add ChatVerticle.java?

Just need some clue

Thanks for you help
PS ; sorry for my bad english

@idoco
Copy link
Owner

idoco commented Jun 19, 2016

Hi @franck38170 ,
First I see that http://franck38170.github.io/map-chat/ redirects to an https page which will be a problem if you do not enable wss on the server (Which the current ChatVerticle.java code does not support)

Other than that you will make sure that you have the Java JDK bin directory is on your PATH and follow these instructions to install vertx on you PATH http://vertx.io/vertx2/install.html . Go to the server folder and run the server with this command: vertx run ChatVerticle.java

@Blobme
Copy link
Author

Blobme commented Jun 22, 2016

hello,
Thanks it's all good I got it working. But I have another problem:
Example
User 1 (PC) goes on map and his geolocation is displayed
User 2 (android phone) goes on map and his geolocation is displayed

User 1: geolocation of user 2 appears at the same time as the other (so I have 2 blue points)
User 2: only its own geolocation appears

So user 2 never see User 1 except if User 1 send a message to User 2 then the blue point appears.

Do you have an idea for all geolocations appear?
Using the session or a database?

@idoco
Copy link
Owner

idoco commented Jun 22, 2016

Hi @franck38170 , This is actually by design.
After a user connects to the server, it publishes an empty message just to notify the existing users of its location. This is why users connecting after other users already connected and published their initial empty message will not see them until they will send another message.

If you want to fix that, you can change the UI code to send an empty message every minute or so if no other message was sent by the user; And if you will write me a pull request with this change I can merge it to the main branch 😄

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

No branches or pull requests

2 participants