client-server

In a multitier application should a client be allowed to send its own linq expressions to the server?

柔情痞子 提交于 2019-12-10 20:30:05
问题 The rationale: HQL and NH criteria are NHibernate specific constructs and as such they are server side DAL implementation details. I do not want them to "leak" to the client side. So, our client side provides LINQ expressions for the server to process. Seems legitimate to me, some, however, think otherwise and so I would like to know why. Thanks. 回答1: The argument against accepting expressions from (or exposing IQueryable<> to) the client side is that it allows non-client logic like filtering

How can a server know a payment was truly made via PayPal client side REST API?

情到浓时终转凉″ 提交于 2019-12-10 19:22:15
问题 I was looking the PayPal interactive integration demo link. At some point after the user complete the payment flow, the client reach the code: // onAuthorize() is called when the buyer approves the payment onAuthorize: function(data, actions) { // Make a call to the REST api to execute the payment return actions.payment.execute().then(function() { window.alert('Payment Complete!'); }); } In a real scenario, instead of an alert, I would probably like to send the server a instruction to ship a

Visual Basic UDPClient Server/Client model?

拈花ヽ惹草 提交于 2019-12-10 18:34:45
问题 So I'm trying to make a very simple system to send messages from a client to a server (and later on from server to client as well, but baby steps first). I'm not sure exactly how to use UDPClient to send and receive messages (especially to receive them), mostly because I don't have anything triggering the ReceiveMessage() function and I'm not sure what would. Source Code is at this link, go to File>Download. It is already built if you want to just run the exe. So my question is basically: How

Initialize exception with stacktrace from another exception?

﹥>﹥吖頭↗ 提交于 2019-12-10 18:27:34
问题 I have client-server system. They communicate via RMI, so serialization/deserialization is involved. Server sends a response to client upon a request. If exception occurs it is set in the response. However, if some exception occurs at the server and the client does not know about it. So I need to wrap the original exception but to keep the stacktrace for debug purposes. Is there more elegant solution? //response from server to client class Response { private MyException e; public void set

ASP.NET Hidden Field Persistence During Life Cycle

眉间皱痕 提交于 2019-12-10 18:17:11
问题 I feel like I may be overlooking a fundamental concept of the page life-cycle here and have been (either because I can't figure out the right keywords or it hasn't been asked) unable to locate an existing answer so forgive me if this has been asked. Basically, I need to persist a mutable object between the client side and the server side. Since the viewstate is encrypted/serialized and the session state is server-side only, my solution was to use a hidden field--easy enough, right? Well here

Standard Way of Storing User Preferences on Client via Web Application

梦想与她 提交于 2019-12-10 18:11:34
问题 I realize this might not be a best fit for SO, so please tell me where I should move/post this if that is the case. My idea is after a user signs into the system, store the user preferences on the client in the form of cookies. If a user modifies said preferences, update the cookies. I need to do this because some of the preferences are client related and will need to be looked at via JavaScript. I realize I'll need the preferences stored on the server as well. Just wanting to know if pulling

How to get input from server console in a client server program

北城以北 提交于 2019-12-10 16:19:40
问题 I have implemented a customer interface using java (multithreaded). On the client side customer logs in when the server is already running. Multiple clients can login creating a thread for each client. What I want to achieve is when multiple clients are logged in I want to enter a command in server console(eclipse) that lists all the clients logged in after i input something on console. ClientSide of the code: btnLogin.addActionListener(new ActionListener() { @Override public void

communication between Java server and Android client using Network Service Discovery

房东的猫 提交于 2019-12-10 16:17:25
问题 I'm building a Java server application (running on a pc) that register itself to the local network using JmDNS, and an Android client App that should discover the java server using Network Service Discovery. When I run the android app first, and then run the java server, the app succeed to discover the registerd java server. But when I first run the server and then the android app, the onDiscoveryStarted method called but the onServiceFound method never triggered - the android app doesn't

A solution idea for incremental updates using browser cache

為{幸葍}努か 提交于 2019-12-10 14:46:12
问题 Some time ago I asked how to do Incremental updates using browser cache. Here I'm giving a short summary of the problem - for more context, especially the reason why I want to do this, please refer to the old question. I'd like you to review and improve my solution idea (just an idea, so don't send me to code review :D). The problem The client (a single page app) gets rather big lists from the server. This works fine and actually saves server resources as the same list can be served to

Get EXIF data without downloading whole image - Python

久未见 提交于 2019-12-10 14:26:08
问题 Is is possible to get the EXIF information of an image remotely and with only downloading the EXIF data? From what I can understand about EXIF bytes in image files, the EXIF data is in the first few bytes of an image. So the question is how to download only the first few bytes of a remote file, with Python? (Edit: Relying on HTTP Range Header is not good enough, as not all remote hosts support it, in which case full download will occur.) Can I cancel the download after x bytes of progress,