<commit_before>---
title: Multi-Lang Protocol
layout: documentation
documentation: true
---
This page explains the multilang protocol as of Storm 0.7.1. Versions prior to 0.7.1 used a somewhat different protocol, documented [here](Storm-multi-language-protocol-(versions-0.7.0-and-below\).html).

# Storm Multi-Language Protocol

## Shell Components

Support for multiple languages is implemented via the ShellBolt,
ShellSpout, and ShellProcess classes.  These classes implement the
IBolt and ISpout interfaces and the protocol for executing a script or
program via the shell using Java's ProcessBuilder class.

### Packaging of shell scripts

By default the ShellProcess assumes that your code is packaged inside of your topology jar under the resources subdirectory of your jar and by default will change the current working directory of
the executable process to be that resources directory extracted from the jar.
A jar file does not store permissions of the files in it.  This includes the execute bit that would allow a shell script to be laoded and run by the operating systme. 
As such in most examples the scripts are of the form `python mybolt.py` because the python executable is already on the supervisor and mybolt is packaged in the resources directory of the jar.

If you want to package something more complicated, like a new version of python itself, you need to instead use the blob store for this and a `.tgz` archive that does support permissions.

See the docs on the [Blob Store](distcache-blobstore.html) for more details on how to ship a jar.
<commit_msg>Update Multilang-protocol.md<commit_after>---
title: Multi-Lang Protocol
layout: documentation
documentation: true
---
This page explains the multilang protocol as of Storm 0.7.1. Versions prior to 0.7.1 used a somewhat different protocol, documented [here](Storm-multi-language-protocol-(versions-0.7.0-and-below\).html).

# Storm Multi-Language Protocol

## Supported Lanugages

Storm Multi-Language has implementation in the following languages:

- [JavaScript](../storm-multilang/javascript)
- [Python](../storm-multilang/python)
- [Ruby](../storm-multilang/ruby)

Third party libraries are available for the following languages:

- [c# (on .net core 2.0)](https://github.com/Azure/net-storm-multilang-adapter)

## Shell Components

Support for multiple languages is implemented via the ShellBolt,
ShellSpout, and ShellProcess classes.  These classes implement the
IBolt and ISpout interfaces and the protocol for executing a script or
program via the shell using Java's ProcessBuilder class.

### Packaging of shell scripts

By default the ShellProcess assumes that your code is packaged inside of your topology jar under the resources subdirectory of your jar and by default will change the current working directory of
the executable process to be that resources directory extracted from the jar.
A jar file does not store permissions of the files in it.  This includes the execute bit that would allow a shell script to be laoded and run by the operating systme. 
As such in most examples the scripts are of the form `python mybolt.py` because the python executable is already on the supervisor and mybolt is packaged in the resources directory of the jar.

If you want to package something more complicated, like a new version of python itself, you need to instead use the blob store for this and a `.tgz` archive that does support permissions.

See the docs on the [Blob Store](distcache-blobstore.html) for more details on how to ship a jar.

{'fraction_non_alphanumeric': 0.05492638731596829, 'fraction_numerical': 0.0056625141562853904, 'mean_word_length': 4.528951486697966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1750268', 'n_tokens_mistral': 894, 'n_tokens_neox': 849, 'n_words': 494}