Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/couchbaselabs/libev-couchbase-example
Example of integration libev application with couchbase
https://github.com/couchbaselabs/libev-couchbase-example
Last synced: 2 days ago
JSON representation
Example of integration libev application with couchbase
- Host: GitHub
- URL: https://github.com/couchbaselabs/libev-couchbase-example
- Owner: couchbaselabs
- Created: 2012-10-02T02:23:58.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-07T20:21:25.000Z (over 11 years ago)
- Last Synced: 2024-04-12T16:19:15.760Z (9 months ago)
- Language: C
- Size: 162 KB
- Stars: 3
- Watchers: 148
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Integration Demo
This demo shows how to integrate libcouchbase with the application which
already use its own event loop, moreover, this event loop (in the
example libev) built-in statically into host application.In the directory `step1` stored the application before integration:
simple echo server which unlike popular echo server examples accessible
in the internets, doesn't make an assumption that socket is writable on
EV_READ event. Therefore it just copy received data into the ringbuffer
and setup the write watcher.In the directory `step2` you can find almost the same application, but
it is forwarding incoming message to couchbase server and reply its CAS
value back to the client. The interesting thing here, that libcouchbase
could be used without any event library dependency, because the host
server application already has builtin event loop.For second example libcouchbase version 2.0.0+ needed. See
http://www.couchbase.com/develop/c/current for installation details.To build examples use simple command sequence:
$ ./autogen.sh && ./configure && make