shared errno for server/client? [closed] - rpc

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Using remote procedure calls, how can we have shared errno for the server side and client machines?
To clarify, here is the context of my question:
I am trying to implement a distributed file system. I aim for a centralized design where I keep files on the server and clients access them through remote procedure call. So when a client opens a file, I call open on the server machine and return a buffer to the client. I want to keep shared errno values so the client will be able to detect a failure on the open call and prints the right error message.

Seems like your options are either:
1) add an errno (output) parameter to each of your RPC calls, or
2) define an additional RPC call to "retrieve latest errno"
Option 2 is probably a bad idea if you have any possibility for multiple simultaneous RPCs to occur (for example, threading), leaving option 1 as the remaining choice. That's the straightforward approach in any case: if the client wants to know the status of the open(), it looks at the results of that RPC call.

Related

I keep getting errors when I try to make a multiplayer game in python [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have been running into problems recently where the client-side of a networking game never read/recognizes the server. When I tried to use the socket module the client never accepts the socket. I used a module called NetworkZero, but that never returned more than None when I used .discover(). I have no idea what the problem is. Any ideas are appreciated
There are many ways to set up an interface between clients and servers.
The easiest is probably to start with HTTP especially in Python where you can just use requests and poll for your data.
This will get you to prototyping quickly and then you can put your focus into optimizing when you start running into issues.
Of course this may be a less than optimal solution depending upon the nature of your game. Without context I would recommend using simple client/server communication systems you understand.

Nodejs write file progress bar in html [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am trying to generate a file in nodejs and I want to show writing file progress bar in the client-side HTML page. because I am writing a 5 lakh data into a file. once files generates complete in nodejs, it should notify users on the client side.
A typical design pattern for communicating server-side progress back to the client is to have the client establish a webSocket (or socket.io) connection to the server and then the server can send regular progress updates over the socket. When the client receives the updates and when it receives the final notification indicating completion, it can use Javascript to update the visual progress in the web page or do anything else it wants to in the page.
I would recommend using the socket.io library on both client and server as it makes things simpler than a plain webSocket.

What is the difference between JDBCRealm and DataSourceRealm? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I read this comment: "don't use JDBCRealm at all: it does not scale at all since there is a single JDBC Connection object used for all database communication. You are better off using DataSourceRealm"
What does it mean in a greater detail?
Incase you don't know about why and what realms are- for JAVA web applications, authentication and authorization can be handled either by the application or by the container(Tomcat etc.). If one chooses to use the container, you need to specify a user-store(a place where usernames,hopefully encrypted passwords, roles etc are stored). This could even be your tomcat-users xml incase of Tomcat. Or you could use a database(MYSQL etc.) or a directory(Active Directory etc.) . Tomcat connects to the database using JDBC(your JDBC realm) and to the directory using JNDI(your DataSourceRealm).
Coming to your question JDBC connections are expensive, have pooling limitations, and suffer from high synchronization which means in a high load application, authentication may fail for some requests due to unavailability JDBC. JNDI has better pooling being read optimized, and as such gives better performance.

How does the dropbox client for Linux work? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How does the dropbox client for Linux work ?
Does it intercept read/write system calls using something like FUSE and then makes HTTP put/get calls to the dropbox server accordingly?
Linux supports file change detection through iNotify and so there is no need for any clever filing system hacks.
The really clever parts of any of the file synchronisation tools revolve around detecting which bits of a file have changed and only sending those parts (delta changes). Any file sync service that doesn't include this is pretty hopeless. Thankfully, Dropbox have this reasonably well nailed.

Weather API on remote server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
My idea was creating iOS applications where the user can enter a location. This location is stored in a remote database with the device id for push notifications.
Then the application on the remote server periodically checks the weather and when it's about to rain in one of the locations stored in the database it sends push notifications to all device ids for that location.
So basically I need to create iOS applications to store data (I like to call these "listeners") and a application for the server which connects to a weather api and sends notifications ("controller").
My idea on the controller is still kind of vague and I don't really know how to achieve this. Is it even a good idea to create an application that runs 24/7 on the server to checks the weather and sends notifications. And if not, what would be a good way to achieve something like this?
This should be the only way to do it in my opinion. You server could check for more people per update then the app could do it self. Also by using push notification you will make sure that you app is not running in the background (this is not even possible for your kind of app) and draining the battery.
A cron job that runs every so often that calls a web page, shell script, etc.. will also do. There are many option and there is no 1 answer.

Resources