github.com/Jeffail/benthos/v3@v3.65.0/website/blog/2019-06-17-introducing-benthos-lab.md (about)

     1  ---
     2  title: Introducing Benthos Lab
     3  author: "Ashley Jeffs"
     4  author_url: https://github.com/Jeffail
     5  author_image_url: /img/ash.jpg
     6  description: "Where you can build your very own monstrosities"
     7  keywords: [
     8      "benthos",
     9      "benthos lab",
    10      "web assembly",
    11      "wasm",
    12      "go",
    13      "golang",
    14      "stream processor",
    15  ]
    16  tags: [ "Benthos Lab" ]
    17  ---
    18  
    19  After experimenting with innovative new ways to choke your browser to death I am
    20  pleased to announce Benthos Lab, which lives at
    21  [https://lab.benthos.dev](https://lab.benthos.dev).
    22  
    23  <!--truncate-->
    24  
    25  Benthos Lab is a website where users of the [Benthos stream processor][benthos]
    26  can write, format, execute and share their pipeline configurations. This was
    27  made possible by compiling the entire service (written in Go) into Web Assembly
    28  so that it can run directly in your browser.
    29  
    30  Here's a video of it in action: [https://youtu.be/1ZN-42A0sJU][lab-video].
    31  
    32  Some technical details about how this was achieved can be found in
    33  [a previous post of mine][wasm-blog]. The repo can be found at:
    34  [https://github.com/benthosdev/benthos-lab][lab-repo], feel free to clone it,
    35  hack it and host your own version.
    36  
    37  [![benthos-lab](/img/introducing-benthos-lab/banner.svg)][benthos-lab]
    38  
    39  Like every good laboratory it is scrappy and sometimes explodes. You need a
    40  modern browser version and it doesn't currently support mobile. Regardless, I
    41  think it's a good time to invite you try it out. Don't worry, I'll be watching
    42  from a safe distance.
    43  
    44  Also, if it does break on you then please remember that you don't pay me for
    45  this, you vile parasite.
    46  
    47  ## Why
    48  
    49  At Meltwater we have many distributed teams using Benthos for a wide and ever
    50  increasing list of use cases, which results in a lot of remote collaboration.
    51  
    52  For the slower moving, asynchronous types of work we are usually fine with ye
    53  olde git. However, sometimes it's nice to quickly hash stuff out, at which point
    54  things would suddenly devolve into a barrage of files getting chaotically thrown
    55  at a slack channel.
    56  
    57  ![slamming-slack](/img/introducing-benthos-lab/slamslack.jpg)
    58  
    59  By contrast, the lab is a civilised place where one can quickly and easily
    60  create a pipeline concept, including sample input data, and share it directly
    61  with a group. Opening up a shared lab provides all that same context, allows you
    62  to make your own revisions to it, and even lets you execute it in order to see
    63  the results it produces.
    64  
    65  ![genteel-lab](/img/introducing-benthos-lab/genteel.jpg)
    66  
    67  For our teams this app dramatically reduced the time taken to create, prove and
    68  demonstrate a pipeline concept. It's also much quicker for me to help teams that
    69  have issues with their configs as they can make sure I have all the information
    70  needed up front with a single URL.
    71  
    72  ### Use it to build your own web app
    73  
    74  There's also plenty of unintended use cases for Benthos Lab as it basically
    75  allows you to build your own custom web applications. Here's a session that
    76  lower cases and normalises a JSON document, computes its sha256 hash and then
    77  hex encodes the hash:
    78  [https://lab.benthos.dev/l/N-3sss3WPjj#input](https://lab.benthos.dev/l/N-3sss3WPjj#input).
    79  
    80  Pro tip: if you add the anchor `#input` to the end of the session URL then it
    81  opens up at the input tab for quickly inserting stuff.
    82  
    83  Since there's such a vast catalogue of Benthos
    84  [processors available][benthos-procs] I've already found myself bookmarking a
    85  few lab sessions as general utilities.
    86  
    87  ## Next Steps
    88  
    89  With this running within the sandbox of your browser there's lots of missing
    90  functionality. For example, you can't create TCP/UDP connections (as of right
    91  now) and you can't access a file system.
    92  
    93  However, I don't plan to address this any time soon as the intention of the app
    94  is to test snippets of config, not to execute your whole damn streaming
    95  pipeline. You ought to learn to manage your expectations.
    96  
    97  What I will do though is continue to improve the UI. If a feature you want is
    98  missing (or broken, obviously) then please [open an issue][lab-issues].
    99  
   100  [benthos-lab]: https://lab.benthos.dev
   101  [lab-video]: https://youtu.be/1ZN-42A0sJU
   102  [wasm-blog]: /blog/2019/05/27/compiling-benthos-to-wasm/
   103  [lab-repo]: https://github.com/benthosdev/benthos-lab
   104  [lab-issues]: https://github.com/benthosdev/benthos-lab/issues
   105  [benthos]: https://www.benthos.dev
   106  [under-the-hood]: https://underthehood.meltwater.com/
   107  [benthos-procs]: https://benthos.dev/docs/components/processors/about