fhoenig / kellner Goto Github PK
View Code? Open in Web Editor NEWAsynchronous, Scalable I/O Framework for PHP
Home Page: http://code.google.com/p/kargo-event/
License: Other
Asynchronous, Scalable I/O Framework for PHP
Home Page: http://code.google.com/p/kargo-event/
License: Other
About Kellner is a framework to scale high-frequency API-type HTTP traffic, using a new methodology for PHP network programming, centered around a libevent php extension. Motivation Web traffic has gone a long way from simply serving HTML pages and image files and is now much more often a transport layer for remote procedure calls (AJAX, REST, SOAP,...). This not just for public web services, but also often used as a communication method between the layers of a multi-tiered enterprise architecture. We have found that current web application/server solutions are sometimes quite inadequate for handling this kind of traffic under high loads, and usually a broad set of optimizations and workarounds are required to gain scalability (in-memory caching, op-code caches, etc). Proposal How about skipping things like "installing the latest web server" or "let's implement memcached" or "have you tried an op-code cache" and writing a super scalable api server in PHP with very few lines of code? (no web server required) Examples Check out the code for the libevent php extension. Examples are found in the demo directory. demos |-- library <-some patched ZF classes (the ZF version is outdated) |-- misc <-basic network programming examples to play with the extension | |-- bufferbot.php | |-- bufferevent.php | |-- chatserver.php | |-- httpclient.php | |-- httpdtest.php | `-- simple_client.php |-- zf <-Zend Framework MVC app demo `-- zf-apiserver <- Zend Framework Api demo server (JSON-RPC and XML-RPC) ZF App Demo This is a highly experimental sample poll application. It uses evhttp as an integrated webserver, serving a persistent Zend Framework MVC application. Performance and scalability is pretty interesting, but security concerns might result in heart attacks. So play with it, but don't use this anywhere in a production environment. (It's also work in progress) To start: Make sure you have your Zend Framework copy linked correctly as /library/Zend. > cd demos/zf/bin > php main.php To test: Point your web browser to: http://127.0.0.1:8080/ Note that the app is not meaningful yet. Feel free to play and extend it. ZF API Server Demo A more stable and useful example can be found in demos/zf-apiserver. It exports a basic poll service class as JSON-RPC and XML-RPC. Soap could be added pretty easily. We found that without the front controller Zend Framework components work amazingly well with long running PHP processes. Have fun playing and load testing. To start: Make sure you have your Zend Framework copy linked correctly as /library/Zend. > cd demos/zf-apiserver/bin > php main.php To test, in a new shell type: > cd demo/zf-apiserver/bin > php test.php Contribute The current state of the project presents an interesting, new way of building php applications. If you're as excited about this the same way that we are, please check out a copy of the code and start playing with it. Feedback and contributions are more than welcome! Best, Florian
hello, recently I installed the extension and tried to use the httpclient.php in the demos/misc.. the file sends the request but it only has a GET /dir_goes_here HTTP/x.x\r\n in the headers and it totally ignores the evhttp_add_header function (most webservers return 400 - bad request) .. if anyone knows what goes wrong here, please let me know.
edit:
after some digging I found out that evhttp_make_header uses output_headers to append the key value in the request/response.. so the evhttp_request_add_header needs to use output_header too in order to work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.