2017 © Pedro Peláez
 

goridge goridge

High-performance PHP-to-Golang RPC bridge

image

spiral/goridge

High-performance PHP-to-Golang RPC bridge

  • Thursday, June 7, 2018
  • by wolfy-j
  • Repository
  • 27 Watchers
  • 403 Stars
  • 5,414 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 16 Versions
  • 69 % Grown

The README.md

High-performance PHP-to-Golang IPC bridge

GoDoc Linux macOS Windows Go Report Card Codecov , (*1)

PHPClasses Innovation Award, (*2)

Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package. The library allows you to call Go service methods from PHP with a minimal footprint, structures and []byte support.
PHP source code can be found in this repository: goridge-php, (*3)

br/ See https://github.com/roadrunner-server/roadrunner - High-performance PHP application server, load-balancer and process manager written in Golang br/, (*4)

Features

  • no external dependencies or services, drop-in (64bit PHP version required)
  • low message footprint (12 bytes over any binary payload), binary error detection
  • CRC32 header verification
  • sockets over TCP or Unix (ext-sockets is required), standard pipes
  • very fast (300k calls per second on Ryzen 1700X over 20 threads)
  • native net/rpc integration, ability to connect to existed application(s)
  • standalone protocol usage
  • structured data transfer using json
  • []byte transfer, including big payloads
  • service, message and transport level error handling
  • hackable
  • works on Windows
  • unix sockets powered (also on Windows)

Installation

GO111MODULE=on go get github.com/roadrunner-server/goridge/v3

Sample of usage

package main

import (
    "fmt"
    "net"
    "net/rpc"

    goridgeRpc "github.com/roadrunner-server/goridge/v3/pkg/rpc"
)

type App struct{}

func (s *App) Hi(name string, r *string) error {
    *r = fmt.Sprintf("Hello, %s!", name)
    return nil
}

func main() {
    ln, err := net.Listen("tcp", ":6001")
    if err != nil {
        panic(err)
    }

    _ = rpc.Register(new(App))

    for {
        conn, err := ln.Accept()
        if err != nil {
            continue
        }
        _ = conn
        go rpc.ServeCodec(goridgeRpc.NewCodec(conn))
    }
}

License

The MIT License (MIT). Please see LICENSE for more information., (*5)

The Versions

07/06 2018

dev-master

9999999-dev

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

07/06 2018

v2.1.2

2.1.2.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

07/06 2018

v2.1.1

2.1.1.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

03/06 2018

v2.1.0

2.1.0.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

03/06 2018

dev-develop

dev-develop

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

03/04 2018

v2.0.5

2.0.5.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

21/03 2018

v2.0.4

2.0.4.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

20/02 2018

v2.0.3

2.0.3.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

29/01 2018

v2.0.2

2.0.2.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

23/01 2018

v2.0.1

2.0.1.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

17/11 2017

v2.0.0

2.0.0.0

High-performance PHP-to-Golang RPC bridge

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Anton Titov / Wolfy-J

21/08 2017

v1.0.4

1.0.4.0

Goridge, high performance PHP-to-GO net/rpc Codec

  Sources   Download

MIT

The Requires

  • php >=7.0
  • ext-sockets *

 

The Development Requires

by Anton Titov / Wolfy-J

14/08 2017

v1.0.3

1.0.3.0

Goridge, high performance PHP-to-GO net/rpc Codec

  Sources   Download

MIT

The Requires

  • php >=7.1
  • ext-sockets *

 

The Development Requires

by Anton Titov / Wolfy-J

14/08 2017

v1.0.2

1.0.2.0

Goridge, high performance PHP-to-GO net/rpc Codec

  Sources   Download

MIT

The Requires

  • php >=7.1
  • ext-sockets *

 

The Development Requires

by Anton Titov / Wolfy-J

14/08 2017

v1.0.1

1.0.1.0

Goridge, high performance PHP-to-GO net/rpc Codec

  Sources   Download

MIT

The Requires

  • php >=7.1
  • ext-sockets *

 

The Development Requires

by Anton Titov / Wolfy-J

13/08 2017

v1.0.0

1.0.0.0

Goridge, high performance PHP-to-GO net/rpc Codec

  Sources   Download

MIT

The Requires

  • php >=7.1
  • ext-sockets *

 

The Development Requires

by Anton Titov / Wolfy-J