New? concept of app/server communication

Hello fellas.

I was thinking of a “new” way to connect apps/servers that are both “secure” and enables fast development. The whole idea is to

  1. Define functions on a server. Each function belongs to a certain group.
  2. let clients/apps register to different groups.
  3. let clients/apps “run” these functions on the server
  4. send back the response/return value of the functions back to the client

1. On the server: teleport.define(‘adminGroup’,save_data_to_db(gData) => {await mongoDb.saveData(gData); return ‘OK’}
2. On the client:‘hello world’)) // If the client is an in adminGroup => the server will run the function and send back the reposne.

I have implemented an example class (named Teleport), code available at :

The goal is to

  1. quickly include this class both on the server and client/app side
  2. add groups and functions on the server
  3. run these functions on the clients
  4. no need to care about authentication, and authorization as it is done in the background


  • The class should be possible to use both in the server and client code
  • It is a lightweight, only REST requests supported
  • It is not fully functional yet but should be soon

Now to the questions:

  1. Is this a “good enough” way from a security point of view?
  2. Is this “good enough” from performance point of view? (lets skip sockets and assume REST communication is enough)
  3. is there any similar service/OSS code already out there?
  4. other thoughts