HTTPSQS is a Simple Queue Service based on HTTP GET/POST protocol. It can
handle more than 10000 requests/sec concurrent connections. Currently it's widely deployed throughout the xoyo.com under the Kingsoft Corporation. WWW: https://code.google.com/p/httpsqs/ PR: ports/156595 Submitted by: Zhihao Yuan <lichray at gmail.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# New ports collection makefile for: httpsqs
|
||||
# Date created: 2011-04-22
|
||||
# Whom: Zhihao Yuan <lichray@gmail.com>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= httpsqs
|
||||
PORTVERSION= 1.6
|
||||
CATEGORIES= www devel
|
||||
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
|
||||
|
||||
MAINTAINER= lichray@gmail.com
|
||||
COMMENT= Simple Queue Service based on HTTP GET/POST protocol
|
||||
|
||||
LIB_DEPENDS+= tokyocabinet:${PORTSDIR}/databases/tokyocabinet \
|
||||
event-2.0:${PORTSDIR}/devel/libevent2
|
||||
|
||||
BUILD_DEPENDS+= pkg-config:${PORTSDIR}/devel/pkg-config
|
||||
|
||||
MAKE_ENV= LIBS="${PTHREAD_LIBS}"
|
||||
|
||||
LICENSE= BSD
|
||||
|
||||
PLIST_FILES= bin/${PORTNAME}
|
||||
|
||||
post-patch:
|
||||
${CP} ${PATCHDIR}/Makefile ${WRKSRC}
|
||||
@${REINPLACE_CMD} -e 's|{ 0 }|"${PREFIX}/bin/${PORTNAME}"|' \
|
||||
${WRKSRC}/httpsqs.c
|
||||
|
||||
post-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -0,0 +1,2 @@
|
||||
SHA256 (httpsqs-1.6.tar.gz) = 784043357e52556830e9efa20dfb1d66161cbca781dcd6c367b017fe5d3dbb68
|
||||
SIZE (httpsqs-1.6.tar.gz) = 8871
|
||||
@@ -0,0 +1,18 @@
|
||||
# $FreeBSD$
|
||||
# Makefile for httpsqs (pmake)
|
||||
|
||||
tokyocabinet_CFLAGS!= pkg-config --cflags tokyocabinet
|
||||
libevent_CFLAGS!= pkg-config --cflags libevent
|
||||
tokyocabinet_LIBS!= pkg-config --libs tokyocabinet
|
||||
libevent_LIBS!= pkg-config --libs libevent
|
||||
CFLAGS+= ${tokyocabinet_CFLAGS} ${libevent_CFLAGS}
|
||||
LIBS+= ${tokyocabinet_LIBS} ${libevent_LIBS}
|
||||
|
||||
all: httpsqs
|
||||
|
||||
httpsqs: httpsqs.o prename.o
|
||||
${CC} ${LDFLAGS} ${LIBS} -o ${.TARGET} ${.ALLSRC}
|
||||
httpsqs.o: httpsqs.c
|
||||
prename.o: prename.c
|
||||
|
||||
install: httpsqs
|
||||
@@ -0,0 +1,19 @@
|
||||
--- httpsqs.c.orig 2011-04-14 00:46:09.000000000 -0500
|
||||
+++ httpsqs.c 2011-04-23 03:19:34.920926265 -0500
|
||||
@@ -30,6 +30,7 @@ This is free software, and you are welco
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <event.h>
|
||||
@@ -656,7 +657,7 @@ int main(int argc, char *argv[], char *e
|
||||
char httpsqs_path_file[1024] = { 0 }; // httpsqs_path_file 为 httpsqs 程序的绝对路径
|
||||
struct evbuffer *httpsqs_prename_buf; /* 原命令行参数 */
|
||||
httpsqs_prename_buf = evbuffer_new();
|
||||
- readlink("/proc/self/exe", httpsqs_path_file, sizeof(httpsqs_path_file));
|
||||
+ //readlink("/proc/self/exe", httpsqs_path_file, sizeof(httpsqs_path_file));
|
||||
evbuffer_add_printf(httpsqs_prename_buf, "%s", httpsqs_path_file);
|
||||
for (httpsqs_prename_num = 1; httpsqs_prename_num < argc; httpsqs_prename_num++) {
|
||||
evbuffer_add_printf(httpsqs_prename_buf, " %s", argv[httpsqs_prename_num]);
|
||||
@@ -0,0 +1,5 @@
|
||||
HTTPSQS is a Simple Queue Service based on HTTP GET/POST protocol. It can
|
||||
handle more than 10000 requests/sec concurrent connections. Currently it's
|
||||
widely deployed throughout the xoyo.com under the Kingsoft Corporation.
|
||||
|
||||
WWW: https://code.google.com/p/httpsqs/
|
||||
Reference in New Issue
Block a user