server

Implementing sessions in a java web server?

What's the best (most secure) way of implementing session handling in a web server? I'd like to add that, but don't know how to implement it really. Is cookies a "must" for session handling? (To be able to identify which session) ...

Multithreaded Server Issue

I am writing a server in linux that is supposed to serve an API. Initially, I wanted to make it Multi-threaded on a single port, meaning that I'd have multiple threads working on various request received on a single port. One of my friends told me that it not the way it is supposed to work. He told me that when a request is received,...

How to use HTML pages as a UI sending POST/GET's to main app on Android?

How to use HTML pages as a UI sending POST/GET's to main app on Android? So my point is to use some flash/html for the UI and some kind of server as an app core and pages provider. ...

Can Cron jobs be used to simultate multi threading with PHP?

I have a mysql database table filled with 1000+ records, lets say 5000 records. Each record has a processed boolean flag, default to false (0). What I'd like to do is have a PHP script run on cron every minute. Its code would be something like this: <?php process(); function process() { $sql = "SELECT id FROM items WHERE processed =...

Cron jobs using php

Hi, I am trying to set a cron job using PHP and so far having no luck. I am following a tutorial PHP - Create a Cron Job with PHP The file is being created succesfully and all my permissions are correct but the job just dosen't get processed. Any ideas??? ...

data transmission using TCP

How the data is tranmitted through the network using TCP header fromclient to server or server to client? Please explain it clearly. ...

iphone sdk/mac - problem with sockets

Hi guys My program consists of 2 parts - A server socket running on a different thread, and a client to test the server. I'm 99.9% sure that the server is correctly written (because I have tested it with a client socket), and all it does is returns "hello world" as a response. The server sits on port 3490. Now what I tried to do is t...

What is the effect of recursion on a server?

I've heard that running recursive code on a server can impact performance. How true is this statement, and should recursive method be used as a last resort? ...

Help me differentiate between a truly distributed setup and a merely redundant system

i understand that a master/slave setup is redundant, in that data is mirrored to all slaves from a central master. how does this vary from a distributed architecture? ...

Sending "Set-Cookie" in a Python HTTP server

How do I send the "Set-Cookie" header when working with a BaseHTTPServerRequestHandler, and Cookie? BaseCookie and children don't provide a method to output the value to be passed into send_header(), and *Cookie.output() does not provide a HTTP line delimiter. Which Cookie class should I be using? Two have survived into Python3, what ar...

How do I start GWT devmode on a particular port from the console?

So, within the directory containing my GWT application, I can type in the console ant devmode And it will start up my GWT application as per usual. So far so good. However, what if wish to specify the port as a dynamic argument when starting devmode. Something conceptually like: ant devmode port=8821 Or am I supposed to pas...

Can't initialize local server for my Rails apps

Hi all, My rails apps have been freaking out on me lately. I start my local server by running "ruby script/server" like normal. The server starts, but when I try to access it via "http://localhost:3000/", it throws me a 500 error. This happens for all my rails apps, even the old ones I've left unchanged for several months now. Here ...

iphone sdk - networking problem

Hi guys I'm trying to run a simple server-client program on the iphone. The server and client are 2 different threads. Basically the server is supposed to send "hello world" to the client, and the client should print it. The server sends it like so: send(new_fd, "Hello, world!", 13, 0); The client receives it like that: if ((numbyte...

What is the most efficient way to update a server database?

I have a database in a server. Around 100 client PCs are connected to it from different locations. Now these clients are inserting data in this database within an interval of 10 seconds. Now what is the most efficient way to do this? I can open connection from every client pc to the server database. OR I can have a web service in the s...

iPhoneHttpServer fails to start, after restarting multiple times.

Hi all, I am facing the same issue regarding restarting the server multiple times. ( on: http://code.google.com/p/cocoahttpserver/issues/detail?id=8&amp;can=1 ) I am doing it in the viewWillAppear and stop the server in viewWillDisappear, then I also release the httpServer object. The problem is when I do this multiple times the serve...

Ruby Server #eliminate garbage build up

I have a working TCP/IP socket server that loads 3-flash files in succession. How can I unload previous files and eliminate the garbage build up? 2-Flash clients are active, 1-the loader, 2-the next Flash file being loaded, however "the Flash files don't unload." Maybe there's a "put - kill" method or something similar to addChild remo...

Stopping a parallel java task with ant

I am developing two java programs that run in separate VM's that have a typical server/client relationship. Using ant's parallel/sequential tasks I've been able to get ant to run the server and then the client. I would now like it so that when the client process has stopped, ant kills the server. I've seen this done with custom ant tasks...

Optimal CPU utilization thresholds

I have built software that I deploy on Windows 2003 server. The software runs as a service continuously and it's the only application on the Windows box of importance to me. Part of the time, it's retrieving data from the Internet, and part of the time it's doing some computations on that data. It's multi-threaded -- I use thread pool...

What does Django do with `MEDIA_ROOT`?

What does Django do with MEDIA_ROOT exactly? I never understood it. Since Django itself doesn't serve static media, and you have to set up apache or something similar for it, why does it care in which directory it sits? ...

Can anyone recommend a java FOSS server that does all the typical protocols (ssh etc).

I would like to add the ability for users to telnet into my app where by they can type in commands etc. I would like a simple Java Telnet server whereby i can provide the authentication strategy. By "telnet" i am not referring what lib provides telnet connectivity but something a little more. I want the boring protocol stuff done along ...