PHPackages                             habil/microservice-remote-models - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. habil/microservice-remote-models

ActiveLibrary[Framework](/categories/framework)

habil/microservice-remote-models
================================

A Lumen package to provide a familiar model paradigm for distributed data.

v0.6.2(7y ago)020MITPHPPHP &gt;=5.6.4

Since Apr 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/amirkhiz/microservice-remote-models)[ Packagist](https://packagist.org/packages/habil/microservice-remote-models)[ RSS](/packages/habil-microservice-remote-models/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (6)Versions (15)Used By (0)

Lush Digital - Microservice Remote Models
=========================================

[](#lush-digital---microservice-remote-models)

A Lumen package to provide a familiar model paradigm for distributed data.

Description
-----------

[](#description)

This package provides a model system, similar to Eloquent, but with the key focus on distributed data. Each model class is bound to a remote microservice with an expected RESTful API. This allows developers to create service aggregators which can manipulate data, via models, just as easily as if the data was in a local database.

To allow this to work the package is quite opinionated on the request/response data in the remote services. This data should always conform to the following standard:

> This package is intended to operate within a Kubernetes cluster whereby service discovery is handled by DNS names.

### Relationships

[](#relationships)

The package also handles relationships between remote models via the use of gRPC. As well as the microservices existing to power the remote models, it is also expected that a gRPC application will be available to manage the relationships. This gRPC application is based upon this [protocol buffer](https://github.com/LUSHDigital/lush-global-soa-architecture/blob/feature/SOA-66/protos/relationship/v1/relationship.proto).

See the [Configuration](https://github.com/LUSHDigital/microservice-remote-models/tree/master/docs/config.md) documentation for information on DNS and ports.

Installation
------------

[](#installation)

Install the package as normal:

```
$ composer require lushdigital/microservice-remote-models
```

Register the service provider with Lumen in the bootstrap/app.php file:

```
$app->register(LushDigital\MicroServiceRemoteModels\RemoteModelServiceProvider::class);
```

The package requires that the following changes are made to the Lumen config in `bootstrap/app.php`

```
