GithubHelp home page GithubHelp logo

nord001 / click-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akalend/click-server

0.0 2.0 0.0 120 KB

the light HTTP server for accounting clicks (using in banner system)

C++ 30.18% Makefile 1.21% C 68.61%

click-server's Introduction

Click server is light HTTP server for accounting clicks. Your could be like to use in banner system.

The click-server process incoming HTTP request, get data from InStorage and make redirect to data string.  

The request uri must be format http://some.host/some/url/prefix?key.

The inStorage is key/value storage an have data: key / redirect url. 
The click-server find redirect url by key and send HTTP header Location.

So click server save request info to log file and OutStorage.
The click-server storages is extendable. The inStorage is using memcacheDB, but You can to use any storage or Database. The output storage is MondoDb, but You can to change to any storage engine.

The click server have friendly config click.conf. The default config placed is /usr/local/etc/.

The click-server have one parametr: "stop" or "/path/to/config/file.conf"
The "stop" is the stopping server;

You can to use click-server after nginx or Apache  (lighttpd) proxy. 

the part of nginx config:
location  /leads/ {
    proxy_pass   http://127.0.0.1:8080/leads;
}


INSTALLATION

You must to edit the Makefile and set var INCLUDES, MONGOINC, MONGOLIB:
INCLUDES = -I/usr/local/include -I/opt/local/include    
MONGOINC = -I/Users/akalend/dist/mongodb-o++  
MONGOLIB = -L/opt/local/lib -lmongoclient -lboost_thread-mt -

make
make install


TESTING

ab -c 25 -n 1000 http://127.0.0.1:8080/xxx?12345

Server Software:        clicker-server
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /xxx?12345
Document Length:        0 bytes

Concurrency Level:      25
Time taken for tests:   0.911 seconds
Complete requests:      1000
Requests per second:    1097.15 [#/sec] (mean)
Time per request:       22.786 [ms] (mean)
Time per request:       0.911 [ms] (mean, across all concurrent requests)
Transfer rate:          67.50 [Kbytes/sec] received


LICENSE

The BSD public licence:

Copyright (c) 2010, Alexandre Kalendarev
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
   must display the following acknowledgement:
   This product includes software developed by the <organization>.
4. Neither the name of the <organization> nor the
   names of its contributors may be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY Alexandre Kalendarev ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

click-server's People

Contributors

akalend avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.