{
    "componentChunkName": "component---src-templates-article-tsx",
    "path": "/blog/2019-12-20-patchbay",
    "result": {"data":{"article":{"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Patchbay\",\n  \"date\": \"2019-12-20T00:00:00.000Z\",\n  \"author\": \"Mathieu Ledru\",\n  \"cover\": \"images/cover.svg\",\n  \"coverSeo\": \"images/cover.png\",\n  \"coverAuthor\": \"Patchbay\",\n  \"coverOriginalUrl\": \"https://patchbay.pub\",\n  \"tags\": [\"case-study\"]\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://patchbay.pub\"\n  }, \"Patchbay\"), \" is stripped-down service that includes the\\nMPMC functionality. This is the Poor man's replacement for services such as\\nngrok, IFTTT, serverless applications.\"), mdx(\"p\", null, \"Here, we will see how to implement a simple consumer producer, to reflect\\nPatchbay philosophy.\"), mdx(\"p\", null, \"As example here, we will run two consumer that will display the message\\nreturned by one consumer.\"), mdx(\"p\", null, \"You can go to \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://uniflow.io/public/feed/simple-patchbay-consumer\"\n  }, \"simple-patchbay-consumer\")), mdx(\"p\", null, \"Run one Uniflow consumer by clicking on play button to run the flow.\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"168px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/330c9f301cf0091c28c89cf5f28d10b5/9d904/play.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"53.37423312883436%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVQoz2P4TwFguP/mYdTystDl5WHLy8OXl4evADGQUTgqO3R5edTysvtvHoI07755hKHGlK3dnbXVhanFiaXNhb3dnaXNhaXVhbXNlbUVxmhzYWlzYW11YWt3Z6gx3X3zCEjzgTsnuFucJPqDRXr8ZSeGifYFsLe7ifT4i/YGCHb78nf5iPT6C/b4Cvb4ifQGCPf4SfQHc7c4HbhzAqR5/+3jHM0OYv3BnO3u9osK9t4/G7qmQbQvQKDb12t5RfT6FqfFRapTYxQnR4r1BUhNCBbuDeBodth/+zgWzf///3/y6bXNglzuDs/0rX1JmzpD1tanbulO29obtb5FZWq0YI8/Rwu65iCuDg+r+Tm9J1apTYvh6/IW6Q0wm5sp1ONnv6ggbmO7+7KyxM2dIMf3BaLYzNniKNYfLNIbINIbwNnhLtDtK9oXKNIbINjjB/J5jy93p6f85AjVabFCPX7i/SGcLY5QzftuHWOoMWVtc2VucWJucWIHBakzhM0CZrC0OoNEmh2Zmh1YWpxY21wZakz33ToG0vz2y7uJhxZ07pvdtX8OHtQNRl3753Tumz3x0IK3X96BNFOSwgA5PXF5+2a7lAAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"play\",\n    \"title\": \"play\",\n    \"src\": \"/static/330c9f301cf0091c28c89cf5f28d10b5/9d904/play.png\",\n    \"srcSet\": [\"/static/330c9f301cf0091c28c89cf5f28d10b5/222b7/play.png 163w\", \"/static/330c9f301cf0091c28c89cf5f28d10b5/9d904/play.png 168w\"],\n    \"sizes\": \"(max-width: 168px) 100vw, 168px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"Run one Node consumer by executing\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"node -e \\\"$(curl -s https://uniflow.io/assets/node.js)\\\" - --api-key={your-api-key} simple-patchbay-consumer\\n\")), mdx(\"p\", null, \"The two running consumers will wait for the consumer to be executed.\"), mdx(\"p\", null, \"You can go to \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://uniflow.io/public/feed/simple-patchbay-producer\"\n  }, \"simple-patchbay-producer\")), mdx(\"p\", null, \"Run Node consumer by executing\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"node -e \\\"$(curl -s https://uniflow.io/assets/node.js)\\\" - --api-key={your-api-key} simple-patchbay-producer\\n\")), mdx(\"p\", null, \"It will then unlock the two previously consumers. On Uniflow and Node\\nconsumers, you should then see the delivered message from the producer. \\uD83C\\uDF89\"));\n}\n;\nMDXContent.isMDXComponent = true;","timeToRead":1,"excerpt":"Patchbay  is stripped-down service that includes the\n MPMC functionality. This is the Poor man's replacement for services such as\n  ngrok…","frontmatter":{"title":"Patchbay","author":{"fields":{"slug":"mathieu-ledru"},"name":"Mathieu Ledru","image":{"childImageSharp":{"gatsbyImageData":{"layout":"fixed","backgroundColor":"#c8d8e8","images":{"fallback":{"src":"/static/fb9823e91c2bfd9991aad3fd789bd4f7/e6240/mathieu-ledru.jpg","srcSet":"/static/fb9823e91c2bfd9991aad3fd789bd4f7/e6240/mathieu-ledru.jpg 36w,\n/static/fb9823e91c2bfd9991aad3fd789bd4f7/cbeb2/mathieu-ledru.jpg 72w","sizes":"36px"},"sources":[{"srcSet":"/static/fb9823e91c2bfd9991aad3fd789bd4f7/9a807/mathieu-ledru.webp 36w,\n/static/fb9823e91c2bfd9991aad3fd789bd4f7/de323/mathieu-ledru.webp 72w","type":"image/webp","sizes":"36px"}]},"width":36,"height":36}}}},"cover":{"childImageSharp":null,"extension":"svg","publicURL":"/static/f0bdfa5878d3c3efee61d7528be520e6/cover.svg"},"coverSeo":{"publicURL":"/static/245dc208de0923193f3641ce3e92c1f7/cover.png"},"coverAuthor":"Patchbay","coverOriginalUrl":"https://patchbay.pub","tags":["case-study"],"date":"December 20th 2019"},"parent":{"relativePath":"2019-12-20-patchbay/index.md"}}},"pageContext":{"id":"949f36b5-90fa-531a-a5aa-55a323db8a36","fields":{"slug":"2019-12-20-patchbay"},"frontmatter":{"title":"Patchbay","tags":["case-study"],"author":{"fields":{"slug":"mathieu-ledru"}}},"previous":{"id":"1632b2e5-9ae9-59c0-93ac-876c87b580d3","fields":{"slug":"2020-01-19-autofill-forms"},"frontmatter":{"title":"Autofill forms","tags":["case-study"],"author":{"fields":{"slug":"mathieu-ledru"}}}},"next":{"id":"eb793cad-db4b-5ee2-a2eb-852c95c37e33","fields":{"slug":"2019-12-11-symfony"},"frontmatter":{"title":"Symfony","tags":["blog"],"author":{"fields":{"slug":"mathieu-ledru"}}}}}},
    "staticQueryHashes": ["2578145036","2664713623","316950330"]}