Source Code Embedding in Semantic Vector Spaces Towards Decentralized Microservice Workflows

Abstract In previous work we have shown how service work- flows can be executed in a decentralized manner using Vector Symbolic Architectures (VSA) to describe workflows as compact vector representations that enable dynamic service discovery and workflow execution. In this paper, we explore the applicability of using source code embedded in a semantic vector space (SVS) as a foundation for constructing self-describing microservices. The target of this approach is to enable goal-directed decentral- ized workflows that identify and select available microservices with functionality matching workflow requirements at execution. This means that microservices that differ in name, description, physical/virtual location and even in implementation—yet achieve the same result—may be automatically discovered and utilised at runtime, as service availability changes. This is of particular relevance in a coalition environment, where different partners permit resource sharing, but with limited data privilege and differing conventions. We investigate code2vec, which uses a neural attention mechanism over paths in the abstract syntax tree of the source-code as a means of source-code embedding. We illustrate a simplified workflow using binary-mapped code2vec vectors as a demonstration of this functionality. We then outline issues in the scalability of this approach to more complex distributed applications composed of multiple microservices.
  • Declan Millar (IBM UK)
  • Graham Bent (IBM UK)
  • Chris Simpkin (Cardiff)
Date Sep-2020
Venue 4th Annual Fall Meeting of the DAIS ITA, 2020