Giter Site home page Giter Site logo

codemation / easyrpc Goto Github PK

View Code? Open in Web Editor NEW
63.0 63.0 8.0 773 KB

An easy to use rpc framework for enabling fast inter-process, inter-container, or inter-host communication

License: MIT License

Python 100.00%
asyncio distributed-systems fastapi rpc websockets

easyrpc's People

Contributors

bluenix2 avatar codemation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

easyrpc's Issues

Convert existing on-premises CICD to GitHub Actions

Description

Need to migrate current Jenkins build CICD to Github actions and implement tests from #2 once created.

Solution

  • - Mirror CICD job testing templates from other 'Easy' projects to implement tests pre-builds
  • - Mirror CICD templates from other 'Easy' projects to implement PYPI Build / Pushes from GitHub Actions

Create Unit / Integration Tests

Description

To ensure default functionality is preserved between new releases, need to create tests on most core functionality. This will also allow for easier contributions in the future.

Required Tests

  • - EasyRpcProxy -> EasyRpcServer - testing core functionality of proxy methods, generators, method discovery, namespace isolation, authentication.
  • - EasyRpcServer -> EasyRpcServer - testing server_proxy functionality - extending proxy tests to include: bidirectional method discovery, clustering & sharing across multiple endpoints,

EasyRpcServer non iterable return types failing

Description

Found in easyjobs, data of only type int sent between RPC endpoints fails with the following exception:

Traceback (most recent call last):
  File "/home/tso/Documents/python/easyjobs/jobs-env/lib/python3.8/site-packages/easyrpc/server.py", line 491, in server_request
    if 'GENERATOR_START' in result:
TypeError: argument of type 'int' is not iterable
07-22 10:31 EasyRpc-server /ws/jobs ERROR    error during server_request
Traceback (most recent call last):
  File "/home/tso/Documents/python/easyjobs/jobs-env/lib/python3.8/site-packages/easyrpc/server.py", line 491, in server_request
    if 'GENERATOR_START' in result:
TypeError: argument of type 'int' is not iterable

Solution:

Check if result is iterable by inspecting for 'contains' attribute, allowing for inspection of 'GENERATOR_START' for generator detectoin

  • - Mirror Proxy implementation of iterable detection
  • - Create Unit tests to ensure values can be transported

Feature / New functionality - Allow transport of less strict data-types non-json serializable data

Description

Requiring strict json serialization capable data types between RPC endpoints can limit users ability to share functionality without creating an additional translation layer.

I.e Custom Data Type -> Json Structured -> Rpc Transport -> Json Load - > Restructure Data Type.

The additional translation often means that data may be serialized / deserialized more than once. JSON serialization is also not the best performing serialization method.

Solution

Core

Using pythons built in pickle serialization, objects & data types can be sent between RPC endpoints as bytes & deserialized as the same data type, removing translation interface requirements.

  • - Implement default serialization between EasyRpc endpoints: EasyRpcServer -> EasyRpcServer, EasyRpcProxy -> EasyRpcServer

Bonus

Function annotations could be implemented but not fully mirrored by their proxy counterparts. While implementing the above pickle serialization, annotations of methods and their associated datatypes can be serialized & sent to a proxy which could then fully mirror the origin methods annotations. This removes

  • - Add support for annotations & transporting associated datatypes to proxies when created by EasyRpcProxies / or with server_proxies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.