{"id":19056264,"url":"https://github.com/tidal/peip","last_synced_at":"2025-04-24T04:34:09.270Z","repository":{"id":856974,"uuid":"590045","full_name":"tidal/PEIP","owner":"tidal","description":"Event Driven Messaging Framework for PHP","archived":false,"fork":false,"pushed_at":"2016-07-07T01:58:01.000Z","size":708,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"v1.ns","last_synced_at":"2025-03-30T06:51:18.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidal.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-04-01T12:34:21.000Z","updated_at":"2023-12-24T00:18:33.000Z","dependencies_parsed_at":"2022-08-16T11:10:46.033Z","dependency_job_id":null,"html_url":"https://github.com/tidal/PEIP","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidal%2FPEIP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidal%2FPEIP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidal%2FPEIP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidal%2FPEIP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidal","download_url":"https://codeload.github.com/tidal/PEIP/tar.gz/refs/heads/v1.ns","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566022,"owners_count":21451223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T23:48:54.349Z","updated_at":"2025-04-24T04:34:09.244Z","avatar_url":"https://github.com/tidal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/tidal/PEIP.svg?branch=v1.ns)](https://travis-ci.org/tidal/PEIP)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tidal/PEIP/badges/quality-score.png?b=v1.ns)](https://scrutinizer-ci.com/g/tidal/PEIP/?branch=v1.ns)\n\u003ch1\u003ePEIP - PHP Event Integration Patterns\u003c/h1\u003e\n\u003csmall\u003e\u003cem\u003epronounced: pipe\u003c/em\u003e\u003c/small\u003e\u003cbr\u003e\u003cbr\u003e\n\u003cem\u003eThe first Event Driven Messaging Framework (for PHP)\u003c/em\u003e\n\u003ch2\u003ePREFACE\u003c/h2\u003e\nLet your Database speak to your Chat-App\u003cbr\u003e\nMake your MVC concentrate on its job\u003cbr\u003e\nDesign your Workflow without any headache\u003cbr\u003e\nLet your Mobile talk with your Blog\u003cbr\u003e\u003cbr\u003e\n\nLet your Mailserver twitter to Facebook\u003cbr\u003e\nUpdate your Offline-App on connect\u003cbr\u003e\nFree your Controller from making choices\u003cbr\u003e\nLet your Dependencies off the Hook\u003cbr\u003e\u003cbr\u003e\n\nLet your CRM talk to Twitter\u003cbr\u003e\nMake your Config Context aware\u003cbr\u003e\nRoute your Custom-Events through the Pipeline\u003cbr\u003e\nMake your Messages easy to share\u003cbr\u003e\u003cbr\u003e\n\nTransform your Documents to any Format\u003cbr\u003e\nForgett about Coupling and Vendor-Locks\u003cbr\u003e\nOn Demand build your Index and Caches\u003cbr\u003e\nAnd if you want to, Change all of that!\u003cbr\u003e\u003cbr\u003e\n\n\u003ch2\u003eWHERE?\u003c/h2\u003e\nInterim Homepage can be found \u003ca href=\"http://tidal.github.com/PEIP/\"\u003ehere\u003c/a\u003e\u003cbr\u003e\n\u003cs\u003eAPI docs can be found \u003ca href=\"http://tidal.github.com/PEIP/docs/api/latest/classes.html\"\u003ehere\u003c/a\u003e\u003cbr\u003e\u003c/s\u003e\nExamples can be found in the \u003ca href=\"http://github.com/tidal/PEIP/tree/master/examples/\"\u003esource\u003c/a\u003e.\u003cbr\u003e\nIssue/Bug Tracker can be found \u003ca href=\"http://tidal.lighthouseapp.com/projects/50364-peip/tickets\"\u003ehere\u003c/a\u003e\u003cbr\u003e\nohloh metrics can be found \u003ca href=\"http://www.ohloh.net/p/peip\"\u003ehere\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e\nSee also:\u003cbr\u003e\n\u003ca href=\"http://github.com/tidal/PEIP_Gearman\"\u003ePEIP Gearman Extension\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"http://github.com/tidal/PEIP-Editor\"\u003eProof Of Concept: Visual Web-Editor for PEIP\u003c/a\u003e\u003cbr\u003e\n\n\u003ch2\u003eWHAT?\u003c/h2\u003e\n\nPEIP is a pure PHP Middleware Framework to easily create Messaging- and Work-Flows.\u003cbr\u003e\nOne of PEIP's goals is to provide implementations of \u003ca href=\"http://www.eaipatterns.com/eaipatterns.html\"\u003eEnterprise Integration Patterns\u003c/a\u003e for PHP (but with a bit different approach then usually).\u003cbr\u003e\nPEIP can be used by scripting or configuration (recommended).\u003cbr\u003e\nPEIP is noninvasive - it plays nicely and integrates with your favorite MVC, Library, Services or PHP Applications.\u003cbr\u003e \nPEIP itself (contrary to any other Messaging Framework) is Event Driven. This allows for easily combining it's components without a need for coupling.\u003cbr\u003e \nPEIP's Event Objects are first class Messages and can travel through the same components as Generic Messages.\u003cbr\u003e \nPEIP can be easily extended and integrated (by using its interfaces).\u003cbr\u003e\nPEIP's configuration (ability) can be easily augmented by simple plugins.\u003cbr\u003e\u003cbr\u003e\nPEIP's main Components are:\u003cbr\u003e\n\u003ch3\u003eMessages\u003c/h3\u003e\nMessages are basically generic wrappers for PHP Objects or any other type (strings, integers, arrays, ...).\u003cbr\u003e\nMessages contain special header fields to provide meta data/information. For example: a return address (channel).\n\u003ch3\u003eEvents\u003c/h3\u003e\nEvent Objects are special Messages which are created on certain incedents on PEIP components.\u003cbr\u003e\nEvents Objects wrap the object where the event happend and can provide further data in headers.\u003cbr\u003e\nSince Event Objects are first class Messages, they can travell through the messaging system to allow further processing.\u003cbr\u003e\nEvent Objects are only created when there is a listener registered for the certain event-type on the object. (So no 'event-spamming')\n\u003ch3\u003eChannels\u003c/h3\u003e\n(Message) Channels are the objects on which Messages can be send and received from\u003cbr\u003e\nA Producer would send a Message and a Consumer would receive it.\u003cbr\u003e\nBasically there are two types of Channels:\u003cbr\u003e\n\u003cem\u003e(Note, that in implementation there is also a difference in how the Messages are received - that is publishing vs. polling)\u003c/em\u003e\n\u003ch4\u003ePoint-to-Point Channels\u003c/h4\u003e\nA Point-to-Point Channel (for example a PollableChannel) let exactly one Consumer receive a certain Message\u003cbr\u003e\n\u003ch4\u003ePublish-Subscribe Channels\u003c/h4\u003e\nA Publish-Subscribe Channel broadcasts any Message to all of its subscribers.  \n\u003ch3\u003ePipes\u003c/h3\u003e\nPipes are PEIP's most powerfull components.\u003cbr\u003e\nThey are not to be mixed up with \"pipes\" in a \"pipes-and-filters architecture\" - That would be the Channels.\u003cbr\u003e\nInstead Pipes in PEIP are pipes-and-filters combinded in one. They can act as a filter (or router, splitter, aggregator, ...),\u003cbr\u003e\nMessage-Handler and can be hooked up in any place, where actually a channel would be needed.\u003cbr\u003e Hence Pipes can be chained together without the need for channels to connect them.\u003cbr\u003e\nPipes are the base component for any component handling, examining, manipulating or routing messages.\u003cbr\u003e\u003cbr\u003e\nA special sub-type of Pipes are EventPipes:\u003cbr\u003e\nEventPipes can be hooked up on any component implementing the Connectable (Event-Publisher) Interface and pass its \u003cbr\u003e\nEventObjects to the Messaging System for further routing or processing.\n\u003ch3\u003eService Activators\u003c/h3\u003e\nServiceActivators are Adapters to decouple your Services from the Messaging System.\u003cbr\u003e \nService as used in PEIP does mean any arbitrary object instance which may can be manipulated before\u003cbr\u003e\ncalling a certain method on it, hence it'd fit with any of your typically used objects (including webservices). \u003cbr\u003e\n(In Java-land service in this case would refer to a bean, but since we are talking about PHP-land there \u003cbr\u003e\nare no beans - you could call them Peas if you like.) \n\u003ch3\u003eGateways\u003c/h3\u003e\n(Message) Gateways are Adapters to decouple the entry to the Messaging System.\u003cbr\u003e\nThey will take care of creating Message Objects from arbitrary inputs and send them on an appropriate channel.\u003cbr\u003e\nOn the output-level a Gateway will extract data from the received messages and pass it to a caller.\u003cbr\u003e\nGateways can be designed to mimick the API of your existing application, framework or library.   \n\n\u003ch2\u003eWHY?\u003c/h2\u003e\n\nsoon to follow as a blog-post.\n\n\u003ch2\u003eHOW?\u003c/h2\u003e\n\nsoon to follow\u003cbr\u003e\nAPI docs can be found \u003ca href=\"http://tidal.github.com/PEIP/docs/api/latest/classes.html\"\u003ehere\u003c/a\u003e\n\n\u003ch2\u003eREQUIREMENTs:\u003c/h2\u003e\nPEIP needs PHP5.3 to run.\u003cbr\u003e\nThis requirement came out while developing PEIP and is mostly based on the usage of inline functions\u003cbr\u003e\n(Lamdas/Closures), the use of SplObjectStorage and some usage of late static binding.\u003cbr\u003e\nSo the reason why there are no Namespaces used in PEIP is because the PHP5.3 dependency crept in \u003cbr\u003e\nwhile developing. (This may change in future).\u003cbr\u003e\nAlso PEIP could be backported to be able to be used with lower PHP5 versions. While there is actually\u003cbr\u003e\nno plan to do this, it would not be so hard (but worse performing), because the 5.3 dependencies are \u003cbr\u003e\nnot used in to many places.     \n\u003ch3\u003eSPECIAL REQUIREMENTs:\u003c/h3\u003e\nSince PEIP is to be used with a variety of Applications, Frameworks and Services there might be special\ndependencies to use them with PEIP\u003cbr\u003e\nFor example the PEIP Gearman extension (PEIP_Gearman) has a dependency on PHP's Gearman extension and a Gearman server.\n\n\u003ch2\u003eINSTALLATION:\u003c/h2\u003e    \n\u003ch3\u003ePEAR Install\u003c/h3\u003e\nrun:\u003cbr\u003e\npear channel-discover pear.peip-project.de\u003cbr\u003e\npear install peip/peip\n\u003ch3\u003eInstall From Download\u003c/h3\u003e\nDownload source from Downloads \u003ca href=\"http://github.com/tidal/PEIP/downloads\"\u003ehttp://github.com/tidal/PEIP/downloads\u003c/a\u003e\u003cbr\u003e\nExtract file to your include directory.\n\u003ch3\u003eInstall From Source\u003c/h3\u003e\nChange to one of your include directories.\u003cbr\u003e\nrun:\u003cbr\u003e\ngit clone git://github.com/tidal/PEIP.git \n\u003ch2\u003eTODOs:\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003ewrite readme\u003c/li\u003e\n\u003cli\u003esetting up the website\u003c/li\u003e\n\u003cli\u003eAdd proper comments/doctags to every class/method\u003c/li\u003e\n\u003cli\u003eadd unit-tests for every class (code-coverage can be found \u003ca href=\"http://tidal.github.com/PEIP/docs/tests/coverage/\"\u003ehere\u003c/a\u003e)\u003c/li\u003e\n\u003cli\u003ewriting documentation\u003c/li\u003e\n\u003cli\u003ecleanup/write more examples\u003c/li\u003e\n\u003cli\u003esetting up proper build and CI system\u003c/li\u003e\n\u003cli\u003ewrite/publish extensions\u003c/li\u003e\n\u003c/ul\u003e\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidal%2Fpeip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidal%2Fpeip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidal%2Fpeip/lists"}