server

HazelcastInstance vs HazelcastClient

痞子三分冷 提交于 2019-12-06 21:48:59
问题 I am novice in hazelcast and I have a few questions. As I understand hazelcast comes with two entities HazelcastInstance (as I understand it is server) and HazelcastClient . These entities even packed into different jars. I have noticed that in our project we use only HazelcastInstance . I have asked collegues why don't we use HazelcastClient . As I understand their explanation HazelcastInstance has more possibilities than HazelcastClient . Thus HazelcastInstance = HazelcastClient +

How to make request from server to devices behind router

℡╲_俬逩灬. 提交于 2019-12-06 15:54:55
I need to make requests from the server to application running on hardware at the users home. I can't let the application push the data to the server since i don't store the data, but need to forward it to a client-facing web app (Also i am not allowed to store the data on the server). I am currently unsure how to achieve this. My only idea is to have idle socket connections open where i can write the requests into. This seems complicated and i don't know whether it is scalable (is there a limit on open socket connections? How much resources do idle connections waste?). It is also a bit low

How to keep user Logged-In always “Connected with Server”

别来无恙 提交于 2019-12-06 15:01:31
I'm working on an App, where I wanted the user to keep logged-in means always connected to the server after successful login(just like facebook app). I tried to google this but did not found any correct logic of this. Many website suggests to use SharedPreference but keeping the user's login cred. on SheredPreference is not good idea and did not provide any answer to stay connected to the server. I'm kinda stuck with this idea. I just need logic to implement this. Any suggestions and example code are welcome. I'm android noob. Storing user's credentials on device is not a good way of designing

Send Token ID to server side Android

被刻印的时光 ゝ 提交于 2019-12-06 15:00:50
问题 I want to send notifications without using Firebase console (I want to make with server side). For this,I am trying to send device token id to web service. I am using Firebase Cloud Messaging in this Android project. How can I do this? public class MyFirebaseInstanceIdService extends FirebaseInstanceIdService{ private static final String TAG = "MyFirebaseIIDService"; @Override public void onTokenRefresh() { String token = FirebaseInstanceId.getInstance().getToken(); Log.d(TAG, "Token: " +

Java: Using server to create P2P between two clients

只愿长相守 提交于 2019-12-06 14:56:52
I am experimenting with a file transfer program in Java and I wanted to create a server that would handle creating P2P connection between two clients. Don't know how that should work, exchanging sockets? I don't want to exchange IP address... Seen some questions similar (ev. Connecting two clients via server java ) but I have no idea how to achieve that. Thanks for your time It sounds like you are looking for nat traversal techniques. There is no single solution because there are many different network setups. Most p2p software employs a combination of different solutions, such as using IPv6

How to Store Location information every 15 minutes in sqlite db & send to Server?

假装没事ソ 提交于 2019-12-06 14:50:43
问题 I need to work Location API for android where first the data is to be stored on Local Sqlite datbase in android itself each 15 minutes and then send it to a server, so that data can be tracked offline too. Any suggestions, code or help is really appreciated ! 回答1: You, can simply create a background service then implements a location listener. In that location listener, you can set the time interval in the requestLocationUpdate method to ping the GPS at particular time intervals. or you can

Can someone interpret these apache bench results, is there something that stands out?

隐身守侯 提交于 2019-12-06 14:27:49
Below is a apache bench run for 10K requests with 50 concurrent threads. I need help understanding the results, does anything stand out in the results that might be pointing to something blocking and restricting more requests per second? I'm looking at the connection time section, and see 'waiting' and 'processing'. It shows the mean time for waiting is 208, and the mean time to connect is 0 and processing is 208..yet the total is 208. Can someone explain this to me as it doesn't make much sense to me. Connect time is time it took ab to establish connection with your server. you are probably

Does socket.io (nodejs) emit callback affects server performance by blocking the server during the callback completion?

做~自己de王妃 提交于 2019-12-06 14:27:33
Say A sends a message to B and waits for a callback and then A probably sends new messages and B also sends many messages to A. What I mean other message exchanges happen during this time before callback happens. Does it create a race condition or block other message sending until the first callback is complete or does it enforce the order of callbacks so that say the callbacks of message 1,2,3,4,5 always arrive in the same order as the message was sent out? Assistance would be much appreciated. Well, the question involves a number of concepts - so hard to answer fully. I will try to t least

Missing the first characters using boost::asio::streambuf

感情迁移 提交于 2019-12-06 13:38:39
I make an asynchronous chat server in C++ using the boost library. Almost everything works fine. There are two ways for a client to disconnect: by pressing Ctrl + C (killing the client process) by entering "exit". The former is OK. However, the latter has a problem. If a client disconnects with "exit", the next message, sent by another client, appears without the first several characters. After that it's OK. For example: Several clients chat. One of them disconnects with "exit". After that, another client sends "0123456789abcdefghijk" and all clients receive only: "abcdefghijk". I don't know

django - run project from PyCharm server not accessible

隐身守侯 提交于 2019-12-06 12:14:05
When I run my django server from PyCharm it is not accessible from the outside world. I read that you can run in the cmd like that, and it works. python manage.py runserver 0.0.0.0:8000 How do I run it to be accessible to the outside world from PyCharm ? I need to run it from there is order to debug. thanks! At the upper-right corner (by default) of PyCharm you can edit the configuration for your server: In there specify as host 0.0.0.0 . Don't forget to take care of your firewall/NAT by opening and forwarding the appropriate ports. 来源: https://stackoverflow.com/questions/30422421/django-run