server-side

Will server-side JavaScript take off? Which implementation is most stable? [closed]

爱⌒轻易说出口 提交于 2019-12-03 02:20:56
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Does anyone see server-side JavaScript taking off? There are a couple of implementations out there, but it all seems to be a bit of a stretch (as in, "doing it BECAUSE WE CAN" type of attitude). I'm curious to know if anyone actually writes JavaScript for

Next.JS: How to make ALL requests server-side

浪子不回头ぞ 提交于 2019-12-03 00:28:49
I am building a Next.JS app that will be getting data from a Python API and an Postgres Database. Normally this would be simple, except requirements are such that I need to send all requests from the server-side, not the user's client. I have been working with and grokking getInitialProps , but I am not confident that it is the full solution that I need because of this line in the README : For the initial page load, getInitialProps will execute on the server only. getInitialProps will only be executed on the client when navigating to a different route via the Link component or using the

client-MVC vs server-MVC

二次信任 提交于 2019-12-02 20:30:06
I am looking to get some input from other users on the benefits of server-side MVC. With the power of many javascript libraries. What good purpose does server-side MVC server anymore? You can easily use client-side MVC with templating and a REST API to make a much more resposive application with less overhead of reloading a whole page for minor changes. Server MVC benefits: Mature. Widely adopted. Most of the code is inside server so should be more secure. But definitely the tendency is to back to client/server computing but instead of fat clients written in C or another language but now you

Why is Erlang said to be more suited for server side programming in webgames than Java and C++?

跟風遠走 提交于 2019-12-02 20:19:58
I don't really understand, how can Erlang be more efficient than C++? Erlang is far less efficient than C++. Erlang's big strength is scalability, not efficiency. It will linearly scale across multiple CPUs and, due to its programming and communications model, will very easily scale across machine clusters. Just to be clear, Erlang won't scale more than C++; it just scales more easily than C++. A lot more easily. See chapters 5 and 6 of Concurrent Programming in Erlang for a very good explanation of why this is so. Jonas I can see a few reasons for this: Erlang is designed for Concurrency

Want to learn to build a simple java rest server [closed]

放肆的年华 提交于 2019-12-02 18:41:06
Hello people of the world! I'm an Android developer and so far I've worked only on the client side. My next project is in need of a server to communicate with and I wanna try to build it myself. Can someone give me direction to a good source of learning how to build a nice, small and simple Java restful server? I've looked around, there is way too much info out there and it's confusing. Maybe one of you was in my shoes already and know a good source for it? Oleksandr Karaberov At first you should read and learn how to use Jersey.This is the best implementation of JAX-RS API (REST for Java)

How do multiple servers work in sync for web application?

社会主义新天地 提交于 2019-12-02 18:25:08
My first question is, I often read about people using multiple dedicated servers to run their websites, and process queries from users. But how do they exactly do this? I mean, when I enter a domain name, a DNS resolves maps that to an IP address, but I am lost after that.. is there some kind of master/slave architecture there to load balance incoming requests amongst the (potentially) hundreds of servers? If that's the case, how do the various servers, share data (database for e.g.)? Will they be connected to the same hard disk? ultramonkey will give you a good description of how to load

Server-side PHP event page not loading when using while loop

余生颓废 提交于 2019-12-02 17:56:40
问题 I have a file named handler.php which reads data from a text file and pushes it to a client page. Relevant client code: <script> if(typeof(EventSource) !== "undefined") { var source = new EventSource("handler.php"); source.onmessage = function(event) { var textarea = document.getElementById("subtitles"); textarea.value += event.data; textarea.scrollTop = textarea.scrollHeight; }; } else { document.getElementById("subtitles").value = "Server-sent events not supported."; } </script> Handler.php

Templating language for both client-side and server-side rendering

淺唱寂寞╮ 提交于 2019-12-02 16:42:04
I'm investigating JavaScript templates as a way to render our views. The goal is to be able to render client-side for users that have JavaScript enabled to to render the same templates/data server side for those users (and crawlers) that don't. Requirements Client side rendering. Server side rendering (JVM support a nice-to-have). Reasonable support for loops, conditionals, text manipulation, partials, macros and extensions/plugins. Reasonably big/active community of users. Unsatisfactory solutions found so far Mustache : supports server and client side rendering, big/active community, but the

PHP: Obtaining Image Size

主宰稳场 提交于 2019-12-02 10:05:30
I am writing down a function and it takes an argument which is the physical path of an image on server. I was wondering if it is possible in any way to obtain its original size in pixels. In one variable I would like to store its width and in other variable its height. The challenge that made me ask this is because I have to obtain it on server-side thus any client-side solution would not help. Try to use something like this: <?php $size = getimagesize ("img.jpg"); echo "<img src=\"img.jpg\" {$size[3]}>"; ?> An example will help you to get image height and width parameter in their separate

LUA Script - web socket communication

怎甘沉沦 提交于 2019-12-02 09:42:58
I am working with between Linux-based machine and android app. First of all, I need to open a server socket on the machine to communicate with the app. I need to code with LUA Script, and I have no idea with it.. Could you please give me some exmaple to open a server socket and receive the message from android app? thank you. Paul Kulchenko If you are looking for websocket support in Lua, try lua-websockets . For regular sockets, you can use luasocket; the introduction page includes an echo server example working over TCP; this SO answer includes a client example. 来源: https://stackoverflow.com