Giter Club home page Giter Club logo

duda's Introduction

Monkey Server

Monkey is a fast and lightweight Web Server for Linux. It has been designed to be very scalable with low memory and CPU consumption, the perfect solution for Embedded Linux and high end production environments.

Besides the common features as HTTP server, it expose a flexible C API which aims to behave as a fully HTTP development framework, so it can be extended as desired through the plugins interface.

For more details please refer to the official documentation.

Features

  • HTTP/1.1 Compliant
  • Hybrid Networking Model: Asynchronous mode + fixed Threads
  • Indented configuration style
  • Versatile plugin subsystem / API
  • x86, x86_64 & ARM compatible
  • More features:
    • SSL
    • IPv6
    • Basic Auth
    • Log writer
    • Security
    • Directory Listing
    • CGI
    • FastCGI
    • Much more!
  • Embeddable as a shared library

Requirements

When building Monkey it needs:

  • CMake >= 2.8
  • Glibc >= 2.5
  • GNU C Compiler >= 3.2

Monkey requires the following components on runtime:

  • Linux Kernel >= 2.6.32
  • Pthreads support

Writing Scalable Web Services

If you are interested into use Monkey as a base platform build scalable web services, we recommend you check our Duda I/O project made for that purpose.

Join us!

Monkey is an open organization so we want to hear about you, we continue growing and you can be part of it!, you can reach us at:

If you want to get involved, please also refer to our Contributing guidelines.

Author

Eduardo Silva [email protected]

duda's People

Contributors

edsiper avatar mhandb avatar ncroustillac avatar necrophcodr avatar sourabh0612 avatar swpd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duda's Issues

Quality Assurante Project

Starting from (and before the inital release), a new Quality Assurante project will exists around Duda. Due to Linux and OSX support we need to make sure that every API of the stack behaves as expected under similar conditions.

The main goal is: every existent API will have an unit test. This is a hard job but will make sure we release something stable across different versions and operating systems.

The work can be tracked here: https://github.com/monkey/duda-qa

Do not hang when using stack API in the wrong way. (Trac #8)

If for some reason a callback misses a final response->end(dr..) call or it do not put the event to sleep, when the callback returns will let the server in an infinite loop.

This do not affect a production environment as is noticed in the development environment, but bother too much trying to kill the service.

Proposed solution: add a new flag into the duda_request_t context specifying if a 'next step or status' have been done. This flag should be modified by response->end(), response->finalize() and response->wait() calls.

Migrated from http://bugs.duda.io/ticket/8

{
    "status": "new", 
    "changetime": "2014-01-02T19:50:33", 
    "description": "If for some reason a callback misses a final response->end(dr..) call or it do not put the event to sleep, when the callback returns will let the server in an infinite loop. \n\nThis do not affect a production environment as is noticed in the development environment, but bother too much trying to kill the service.\n\nProposed solution: add a new flag into the duda_request_t context specifying if a 'next step or status' have been done. This flag should be modified by response->end(), response->finalize() and response->wait() calls.", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388692233461102", 
    "component": "API", 
    "summary": "Do not hang when using stack API in the wrong way.", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2014-01-02T19:50:33", 
    "milestone": "", 
    "owner": "edsiper", 
    "type": "defect"
}

Console seems a bit broken?

The console, http://duda.io/api/console.html https://web.archive.org/web/20190807111954/http://duda.io/api/console.html, enabling messages, interface map and, jemalloc statistics seems to have a problem when not built by dudac with jemalloc enabled and jemalloc stats enabled.

It looks like the line at 215 in https://github.com/monkey/duda/blob/dst-1/src/duda.c
was commented out to avoid a duplicate call further down at line 224?
I assume because duda, via dudac as is encouraged for using the dst-1 stack, it will enable jemalloc
and so expect to run the code at line 224?
This works if Jemalloc and Jealloc stats are enabled, but not if only Jemalloc is enabled.
I added an #else to the #if JEMALLOC block at lines 218-225 to call mk_list_add() and everything started to work as expected.

Packages and Trace support

Duda core inherits Monkey trace system that is build on demand (--trace), it can be used through PLUGIN_TRACE(..) macro.

But when using packages this feature is disabled, we need to add similar features for packages to makes easier when debugging issues.

The requested URL was not found on this server

I am running Monkey HTTP Server v1.7.0. The startup log show:
Built : Jun 6 2016 17:24:12 (/usr/lib64/ccache/cc 5.3.1)
Home : http://monkey-project.com
[2016/06/13 09:03:38] [Warning] Listen check: consider build monkey with basic socket handling!
[2016/06/13 09:03:38] [ Info] Duda: loading service 'hello'
[+] Process ID is 4434
[+] Server listening on 0.0.0.0:80
[+] 8 threads, may handle up to 999996 client connections
[+] Loaded Plugins: liana duda
[+] Linux Features: TCP_FASTOPEN SO_REUSEPORT
[2016/06/13 09:03:38] [ Info] HTTP Server started

As far as I know, this already started Duda and Liana. But when running request to duda web service:
http://localhost/hello/
It prints: The requested URL was not found on this server.
I'd already configured Duda and Monkey as your guide.
How could I fix it? Thank you very much.

Best web services and application stack ever! (Trac #1)

almost near :)

Migrated from http://bugs.duda.io/ticket/1

{
    "status": "new", 
    "changetime": "2013-12-30T15:57:55", 
    "description": "almost near :)", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388419075018564", 
    "component": "Core", 
    "summary": "Best web services and application stack ever!", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-30T15:57:55", 
    "milestone": "", 
    "owner": "edsiper", 
    "type": "defect"
}

Service Root feature (Trac #7)

able to avoid the usage of web services short name prefix on URLs.

Migrated from http://bugs.duda.io/ticket/7

{
    "status": "closed", 
    "changetime": "2013-12-31T22:17:08", 
    "description": "able to avoid the usage of web services short name prefix on URLs.", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "fixed", 
    "_ts": "1388528228971058", 
    "component": "API", 
    "summary": "Service Root feature", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-31T22:16:04", 
    "milestone": "", 
    "owner": "", 
    "type": "defect"
}

example can not build

I am using dudac client to build these example.

but I try the first hello world example, the client seems fail to build:


root@vultr:~/duda-examples/001_hello_world# make
[CC] main.o
main.c: In function ‘_duda_main’:
main.c:95:5: error: ‘router’ undeclared (first use in this function)
router->map("/foo/", cb_foo);
^
main.c:95:5: note: each undeclared identifier is reported only once for each function it appears in
Makefile:25: recipe for target 'main.o' failed
make: *** [main.o] Error 1

PostgreSQL package (Trac #5)

Merge PostgreSQL, this ticket is on hold in the meanwhile Ticket #2 is fixed

Migrated from http://bugs.duda.io/ticket/5

{
    "status": "new", 
    "changetime": "2013-12-30T16:08:05", 
    "description": "Merge PostgreSQL, this ticket is on hold in the meanwhile Ticket #2 is fixed", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388419685525594", 
    "component": "Package PostgreSQL", 
    "summary": "PostgreSQL package", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-30T16:08:05", 
    "milestone": "", 
    "owner": "", 
    "type": "enhancement"
}

Adding duda to yocto build...

Has anyone successfully added the duda plugin to a yocto build? Trying to write a recipe to do so and wanted to check first...

Prepare for TechEmpower Framework Benchmark Round #9 (Trac #6)

TechEmpower are running interesting benchmarks for web services frameworks, we should be counted in for the next round. Links:

  1. http://www.techempower.com/benchmarks/

  2. Info about Roadmap for Round-9:

  • Thursday, January 9: Last day for change and addition PRs prior to starting the Round 9 preview run.
  • Tuesday, January 14: Round 9 preview posted.
  • Thursday, January 16: Last day for fix PRs. Final run started.
  • Tuesday, January 21: Round 9 posted.

Migrated from http://bugs.duda.io/ticket/6

{
    "status": "accepted", 
    "changetime": "2014-01-04T18:52:40", 
    "description": "TechEmpower are running interesting benchmarks for web services frameworks, we should be counted in for the next round. Links:\n\n1) http://www.techempower.com/benchmarks/\n\n2) Info about Roadmap for Round-9:\n\n - Thursday, January 9: Last day for change and addition PRs prior to starting the Round 9 preview run.\n - Tuesday, January 14: Round 9 preview posted.\n - Thursday, January 16: Last day for fix PRs.  Final run started.\n - Tuesday, January 21: Round 9 posted.\n\n", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388861560089519", 
    "component": "Core", 
    "summary": "Prepare for TechEmpower Framework Benchmark Round #9", 
    "priority": "blocker", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-30T17:38:51", 
    "milestone": "", 
    "owner": "edsiper", 
    "type": "defect"
}

CMAKE ERROR

Hi,

I am trying to compile duda webservice framework i am getting the following error.  How to solve this?

CMake Error at CMakeLists.txt:34 (MONKEY_PLUGIN):
Unknown CMake command "MONKEY_PLUGIN".

Thanks,

With Regards,
Vishnu Kumar T S

Router: map_table()

string matching is a pain, using regex is not a solution for the URL matching context. Take the following scenario as an example:

router->map("/myapp/users/foo", cb_users_foo);
router->map("/myapp/users/bar", cb_users_bar);
router->map("/myapp/users", cb_users_all);

if the URL matches the last pattern /myapp/users, we are wasting resources doing many strings comparissons for a same prefix pattern, map_table() should implement something like this:

router->map_table("/myapp/users",
                  NULL, cb_users_all,  DUDA_METHOD_ANY,
                  "foo",   cb_users_foo, DUDA_METHOD_GET,
                  "bar",   cb_users_bar, DUDA_METHOD_POST | DUDA_METHOD_PUT );

on this way we provide two extra features:

  • Reduce the number of strings comparisons required setting sub-patterns over a root prefix.
  • Provide an extra flag to determinate the expected methods to match the callback.

Streams support

We need to design and implement an Stream object and interface API to flush data in async mode between two sockets. The goal is to abstract the handling of "bytes sent are less than expected" so with simple callbacks notify when the process was done.

Also on receiving the first chunk of data, must be considered to add a callback that needs to be invoked as some filtering could be required.

CMake Error at lib/CMakeLists.txt:40 (add_library):

Hello when compile the master branch in debian stretch

  • Looking for accept4
    -- Looking for accept4 - found
    -- Looking for execinfo.h
    -- Looking for execinfo.h - found
    -- Performing Test HAVE_C_TLS
    -- Performing Test HAVE_C_TLS - Success
    -- Performing Test HAVE_EPOLL
    -- Performing Test HAVE_EPOLL - Success
    -- Performing Test HAVE_KQUEUE
    -- Performing Test HAVE_KQUEUE - Failed
    -- Performing Test HAVE_TIMERFD_CREATE
    -- Performing Test HAVE_TIMERFD_CREATE - Success
    -- Performing Test HAVE_EVENTFD
    -- Performing Test HAVE_EVENTFD - Success
    -- Plugin liana enabled [== static ==]
    -- Performing Test DUDA_HAVE_VALGRIND
    -- Performing Test DUDA_HAVE_VALGRIND - Failed
    -- Configuring done
    CMake Error at lib/CMakeLists.txt:40 (add_library):
    Cannot find source file:

    duda_request.c

    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx

CMake Error: Cannot determine link language for target "duda-static".
CMake Error: CMake can not determine linker language for target: duda-static
-- Generating done
-- Build files have been written to: /home/parallels/github/duda

Web Sockets package does not work with SSL.

To reproduce the problem:

  • compile wschat example with SSL
  • change javascript to connect to wss://...
  • open 2 tabs of chat and write a message

Output I get:

Monkey HTTP Daemon 1.4.0
Built : Aug 13 2014 22:11:35 (gcc 4.6.3)
Home  : http://monkey-project.com
[2014/08/13 22:43:10] [   Info] Linux TCP_FASTOPEN enabled.
* Process ID is 9438
* Server socket listening on Port 2001
* 1 threads, 508 client connections per thread, total 508
* Transport layer by polarssl in https mode
[2014/08/13 22:43:10] [   Info] Duda: loading service 'wschat'
[2014/08/13 22:43:10] [   Info] HTTP Server started
[FD 16] WebSockets Connection Upgrade
[FD 16] WebSockets Upgrade to 'websocket'
[FD 14] WebSockets Connection Upgrade
[FD 14] WebSockets Upgrade to 'websocket'
monkey: polarssl.c:587: context_new: Assertion `cur != ((void *)0)' failed.

Enable / Disable packages on demand (Trac #2)

Duda Client manager needs the feature to enable or disable packages when building the stage environment, at the moment it just builds everything by default. This feature will need also some cooperation from duda/packages/Makefile.in to populate the proper entries.

Migrated from http://bugs.duda.io/ticket/2

{
    "status": "new", 
    "changetime": "2013-12-30T16:01:11", 
    "description": "Duda Client manager needs the feature to enable or disable packages when building the stage environment, at the moment it just builds everything by default. This feature will need also some cooperation from duda/packages/Makefile.in to populate the proper entries.", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388419271755071", 
    "component": "Duda Client Manager (DudaC)", 
    "summary": "Enable / Disable packages on demand", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-30T16:01:11", 
    "milestone": "", 
    "owner": "", 
    "type": "defect"
}

Docker Support

Docker is the perfect and natural pick to distribute services for Enterprise Servers.

This issue will track the progress of Docker Support in Duda environment. Goals are:

  • Provide Duda-Docker container per API levels (e.g: dst-1)
  • Improve DudaC to add support for generating dynamic Dockerfile files
  • Make Duda stack aware about runtime container and expose specific information about it.

Pre worker-loop call

When the HTTP server starts, it begins in process context, then it moves to thread context, so if per configuration it have 4 threads (workers), we need to place a "pre worker" feature where Duda core invokes our call before to enter the worker loop.

This behavior is used by the global object to initialize thread-specific data.

MySQL & MariaDB package (Trac #4)

Merge MySQL & MariaDB package into Duda sources.

This package is on hold in the mean while ticket #2 is done.

Migrated from http://bugs.duda.io/ticket/4

{
    "status": "new", 
    "changetime": "2013-12-30T16:05:11", 
    "description": "Merge MySQL & MariaDB package into Duda sources.\n\nThis package is on hold in the mean while ticket #2 is done.", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388419511162514", 
    "component": "Package Mysql & Maria DB", 
    "summary": "MySQL & MariaDB package", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-30T16:05:11", 
    "milestone": "", 
    "owner": "", 
    "type": "defect"
}

DudaC Makefiles and INCDIR (Trac #11)

When DudaC runs, it override the INCDIR line to generate the output Makefile. It should take care of the previous value or even better use a DUDA SPECIFIC INCDIR like:

INCDIR = DUDA_HEADERS ...

so it only modify the value of DUDA_HEADERS

Migrated from http://bugs.duda.io/ticket/11

{
    "status": "new", 
    "changetime": "2014-01-08T14:37:57", 
    "description": "When DudaC runs, it override the INCDIR line to generate the output Makefile. It should take care of the previous value or even better use a DUDA SPECIFIC INCDIR like:\n\n  INCDIR = DUDA_HEADERS ...\n\nso it only modify the value of DUDA_HEADERS", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1389191877763647", 
    "component": "Duda Client Manager (DudaC)", 
    "summary": "DudaC Makefiles and INCDIR", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2014-01-08T14:37:57", 
    "milestone": "", 
    "owner": "", 
    "type": "enhancement"
}

Integrate third party packages on stage (Trac #3)

the client manager should be able to add third party packages from the command line when building the environment.

Migrated from http://bugs.duda.io/ticket/3

{
    "status": "new", 
    "changetime": "2013-12-30T16:03:45", 
    "description": "the client manager should be able to add third party packages from the command line when building the environment.", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388419425382430", 
    "component": "Duda Client Manager (DudaC)", 
    "summary": "Integrate third party packages on stage", 
    "priority": "major", 
    "keywords": "", 
    "version": "", 
    "time": "2013-12-30T16:03:45", 
    "milestone": "", 
    "owner": "", 
    "type": "enhancement"
}

More examples please.

I'd like to see some more example code; primarily the use of the Events, Global Worker and Workers APIs.

FastCGI

Monkey HTTP Server already support FastCGI through the plugin, the intention of this issue is to log an enhancement request for Duda where a callback may be able to route back the complete request to a FastCGI backend server. On this way we can add general support for:

  • PHP
  • ASP (through Mono FastCGI interface)
  • Python
  • Others

Expose new Monkey Polling API on Duda Events

Monkey v1.6 comes with a new Event Polling mechanism (multi-OS support: Linux / OSX), Duda needs to expose the new calls and document them.

note: unit test cases needs to be added to @monkey/duda-qa

Build against Monkey v1.6 stack (DST-2)

Duda (DST-2) must compile against Monkey v1.6, it means:

  • Duda migrates to CMake build system
  • Upgrade to the new Monkey API
  • Deprecate stream buffer implementation, use Monkey Streams

Impossible to build

The last commit to this project says "basic service functional again" but I don't see how. The build instructions do not work, the project is broken in a few ways.

  1. The submodule update step expects a github login. OK this is easy enough to resolve, but in the readme this isn't mentioned at all. The first barrier to making use of this.
  2. The cmake step fails due to missing files:
CMake Error at lib/CMakeLists.txt:40 (add_library):
  Cannot find source file:

    duda_request.c
  1. If 2 is fixed, by removing the missing file, the compile step then also fails:
[ 52%] Building C object lib/CMakeFiles/duda-static.dir/duda.c.o
In file included from /home/leeb/Development/duda/include/duda/duda_api.h:29:0,
                 from /home/leeb/Development/duda/include/duda/duda.h:32,
                 from /home/leeb/Development/duda/lib/duda.c:20:
/home/leeb/Development/duda/include/duda/objects/duda_gc.h:23:10: fatal error: duda/duda_request.h: No such file or directory
 #include "duda/duda_request.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
  1. If 3 is fixed, by pointing at the existing duda_request.h in include/duda/objects, then this still fails with a whole bundle of compilation errors, mainly about the missing type duda_request_t #42

Is there any hope that any of this may be fixed? I know there is monkey/monkey#276 but this has been broken for some time.

Upload large content & callbacks

Duda stack should support an API to allow the server to listen for large data uploads, where Monkey server after receive the HTTP request headers (on PUT/POST), let Duda handle each incoming data frame.

The API should be something like this:

map->static_upload_stream("/upload", int (*callback)(struct duda_request *dr,  void* buffer, ssize_t len));

so all POST/PUT request with content length > 0 that arrives over /upload URI, will be handled by the callback function which also sets a buffer and a size, that function will be invoked many times until the upload is complete or for some reason the connection is closed.

Cross Compile problem

Hi,

While compiling with cmake, i am getting the following error. Shall i know how to get rid of this and proceed.

CMake Error at CMakeLists.txt:34 (MONKEY_PLUGIN):
Unknown CMake command "MONKEY_PLUGIN".

Thanks,

With Regards,
Vishnu Kumar T S

Not able to workaround limit of IOV_MAX on en queuing response data (Trac #9)

When composing a response from a callback, the stack is not able workaround cases where the developer wants to enqueue more than IOV_MAX number of entries.

The stack on boddy_buffer and sendfile use an unique array, it should support multiple IOV arrays for special cases like this:

response->http_status(dr, 200);
response->printf(dr, "%s", "");

for (i = 1 ; i <= 2000; i++) {
response->printf(dr, "%s ", " ");
}

response->printf(dr, "%s", "");
response->end(dr, NULL);

when this situation happen the stack will stop working and raise the following error:

[Error] Boddy buffer flush: enqueued data is larger than IOV_MAX (1024)

Migrated from http://bugs.duda.io/ticket/9

{
    "status": "accepted", 
    "changetime": "2014-01-02T21:25:54", 
    "description": "When composing a response from a callback, the stack is not able workaround cases where the developer wants to enqueue more than IOV_MAX number of entries. \n\nThe stack on boddy_buffer and sendfile use an unique array, it should support multiple IOV arrays for special cases like this:\n\n   response->http_status(dr, 200);\n   response->printf(dr, \"%s\", \"<html><body>\");\n \n   for (i = 1 ; i <= 2000; i++) {\n        response->printf(dr, \"%s \", \"&nbsp;\");\n   }\n\n   response->printf(dr, \"%s\", \"</body></html>\");\n   response->end(dr, NULL);\n\nwhen this situation happen the stack will stop working and raise the following error:\n\n   [Error] Boddy buffer flush: enqueued data is larger than IOV_MAX (1024)\n\n", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388697954272644", 
    "component": "Core", 
    "summary": "Not able to workaround limit of IOV_MAX on en queuing response data", 
    "priority": "critical", 
    "keywords": "", 
    "version": "", 
    "time": "2014-01-02T21:25:44", 
    "milestone": "", 
    "owner": "edsiper", 
    "type": "defect"
}

Local Store object (Trac #10)

We would need an API object called "Local Store" with a short name for the api "lstore", that should implement two methods:

  1. set(duda_request_t _dr, void (_exit_callback) (duda_request_t *dr)) :
 first parameter to refer to the context, and the second a callback that must be called (if set) every time the request was closed for some unknown reason (connection drop, explicit return , etc).

 also the stack should not allow to finish a request based on a specific *dr* where it local store is not NULL (we need to avoid leaks and make sure users are using the API properly).
  1. void *get(duda_request_t *dr)
 return the data.

to implement a new object in the stack you need to add a new duda_objectname.c , like duda_lstore.c and create the API (plus documentation) as is done for others.

Migrated from http://bugs.duda.io/ticket/10

{
    "status": "new", 
    "changetime": "2014-01-03T02:25:02", 
    "description": "We would need an API object called \"Local Store\" with a short name for the api \"lstore\", that should implement two methods:\n\n 1)   set(duda_request_t *dr,  void (*exit_callback) (duda_request_t *dr)) :\n\n     first parameter to refer to the context, and the second a callback that must be called (if set) every time the request was closed for some unknown reason (connection drop, explicit return , etc).\n\n     also the stack should not allow to finish a request based on a specific *dr* where it local store is not NULL (we need to avoid leaks and make sure users are using the API properly).\n\n 2)   void *get(duda_request_t *dr)\n\n     return the data.\n\nto implement a new object in the stack you need to add a new duda_objectname.c , like duda_lstore.c and create the API (plus documentation) as is done for others.\n", 
    "reporter": "edsiper", 
    "cc": "", 
    "resolution": "", 
    "_ts": "1388715902224183", 
    "component": "API", 
    "summary": "Local Store object", 
    "priority": "minor", 
    "keywords": "", 
    "version": "", 
    "time": "2014-01-03T02:25:02", 
    "milestone": "", 
    "owner": "", 
    "type": "enhancement"
}

MongoDB Support

Duda DST-2 needs a package that supports MongoDB in async mode + co-routines

OSX: clang compiler warnings

CC plugins/duda/src/duda_log.o
duda_log.c:120:36: error: use of undeclared identifier 'i'
log_ctx = evl->events[i].data;
^
duda_log.c:153:20: warning: implicit declaration of function 'splice' is invalid in C99 [-Wimplicit-function-declaration]
slen = splice(fd, NULL, flog,
^
duda_log.c:154:40: error: use of undeclared identifier 'SPLICE_F_MOVE'
NULL, bytes, SPLICE_F_MOVE);
^
1 warning and 2 errors generated.

CC plugins/duda/packages/kv/unqlite.o
warning: warning: unknown warning option unknown'-Wno-unused-but-set-parameter'; did youwarning mean option'-Wno-unused-parameter'? '-Wno-unused-but-set-parameter';[-Wunknown-warning-option] did
you mean '-Wno-unused-parameter'? [-Wunknown-warning-option]
1 warning generated.
unqlite.c:3185:19: warning: function 'SyStrncmp' has internal linkage but is not defined [-Wundefined-internal]
JX9_PRIVATE sxi32 SyStrncmp(const char *zLeft, const char *zRight, sxu32 nLen);
^
unqlite.c:54143:12: note: used here
if (0 == SyStrncmp("msdos", fsInfo.f_fstypename, 5)) {
^
2 warnings generated.
-n

warning: unknown warning option '-Wno-unused-but-set-parameter'; did you mean '-Wno-unused-parameter'? [-Wunknown-warning-option]
Undefined symbols for architecture x86_64:
"_SyStrncmp", referenced from:
_unixOpen in unqlite.o
ld: symbol(s) not found for architecture x86_64

CC plugins/duda/packages/websocket/request.o
request.c:161:17: warning: incompatible pointer to integer conversion assigning to 'pid_t' (aka 'int') from 'pthread_t' (aka 'struct _opaque_pthread_t *') [-Wint-conversion]
bw->pid = thinfo->tid;
^ ~~~~~~~~~~~
1 warning generated.
-n

Routing / Namespaces

originally started as https://gist.github.com/edsiper/2ee041ea7517bf7ea105

New routing model proposal

The Routing core object aims to replace old Map object that perform hooks between URIs and specific callbacks.

It should be used in the following way:

route->something(...);

Features

  • Static URI that alias some content from web service html/ directory.
  • Dynamic namespaces

Static

The goal of this Routing feature is to map specific URIs to static content that exists in the web service html/ directory, usage:

route->static("/static", "static_files");

note: static_files is a directory that exists as:

/path/to/web_service/html/static_files                                                                                                                                                

so every hit on /static will resolve static_files internally.

Dynamic Namespaces

A dynamic namespace allows to set fixed URI patterns and define others as incoming variables:

route->map("/users/:name/:lastname", void (*callback)(duda_request_t *));
route->map("/forum/:fid/thread/:tid", void (*callback)(duda_request_t *));

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.