This repo contains a Bndtools Workspace Template. In Bndtools 7.1+, when a Bnd workspace is created a workspace template can be used in order to support a specific kind of development. This workspace template has project templates for OSGi Remote Services development, and Model Context Protocol Server and Client Development.
To use this template, when creating a new Bnd Workspace (Menu: File->New->Other...->Bndtools->Bnd OSGi Workspace), select the ECF Bndtools Workspace template
Three project templates have been added to this workspace template:
MCP ToolGroups Example API Project - Declares an OSGi service interface with tools and toolgroups annotations
MCP ToolGroups Example Servers Project - Implements the API as an OSGi service, and dynamically adds tools from the service to an MCP Server
MCP ToolGroups Example Client Project - Implements a simple client that connects to running MCP Server and makes tool calls
To create and run these projects in your bnd workspace and launch the example MCP servers and client:
Create a ToolGroups API project using the MCP ToolGroups Example API project template
Menu: File->New->Bnd OSGi Project...
Create a ToolGroups Server project using the MCP ToolGroups Example Servers project template
Menu: File->New->Bnd OSGi Project...
Create an ToolGroups Client project using the MCP ToolGroups Example Client project template
Menu: File->New->Bnd OSGi Project...
This will leave you with three complete projects in your Bndtools workspace
See the Readme.md in the server project to launch the servers, and after launching the server, see Readme.md in the client project to start and connect the client.
There has been a new project template added to the ECF Bndtools Workspace Template that uses the ECF Python.Java Distribution Provider. This distribution provider is based upon py4j, which supports high performance remote procedure call between python and java processes.
To try it out after installing Bndtools 7.1 and the ECF tools add ons
- Create a new Bnd OSGi project
- Open the projectName.hellopython.javahost.bndrun file in the project directory
Choose 'Resolve' and then 'Update'
- Select Debug OSGi to start the example application (Java)
Running Python Example Program
-
Install iPOPO v 3.1.0 in your Python (3.9 or greater) local environment
-
In a command shell or IDE, navigate to the project directory and run the run_python_example.py script
python run_python_example.py
The examples will output progress to their respective consoles as the remote services are made exported, discovered, and imported by the java process or the python process.
Most of the code that produces output is available in the example project. For java: src/main/java/.../hello/*.java and python: python-src/samples/rsa
GRPC Development via Bndtools
This is a video tutorial showing how to use this workspace for gRPC development. In 4 parts: Part 1 - API Generation, Part 2 - Remote Service Implementation, Part 3 - Remote Service Consumer, Part 4 - Remote Service Debugging