[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Support for distributed applications



This question is an extension from an OpenShift forum post [1].

We at Spilgames are using Erlang as a core component of our architecture. One of the core strengths of Erlang is the support for building distributed applications. Erlang also makes it trivial to hook various components together in a network and execute RPC calls between them. These features all rely on being able to interconnect the components. A custom TCP-based binary protocol is used between Erlang components. Erlang wants to build a fully connected network where all components can talk directly with eachother. In order to do this, we need to know the endpoints of the other instances (host/ip + listen port).

Currently in OpenShift all Gears are fully isolated containers and those containers normally do not talk to eachother. This prevents building any kind of distributed application, including distributed Erlang. We believe we can work around this with custom components that register the new instances, but we also believe that this functionality is generic enough that the platform should offer support for it. Let's first talk about the proposed work-around and then about let's come back to the vision that RedHat has for OpenShift PaaS.

For the work-around I am thinking of introducing a "gearfinder" REST application. This gearfinder starts in the primary gear [2] and offers a REST component. It is thus available through a fixed location (dns). Whenever a new gear starts, it attempts to register with the gearfinder. The new gear also asks the gearfinder for a list of known gears, which returns a list of information such as cartridge-name, gear-id, listen ip+port and host. My Erlang application can then get all the unique hosts and connect to each of those EPMDs to get a list of nodes on that host. Next it can connect to the Erlang gears indirectly via the proxy. See attached picture; the numbers in the notes help to understand the proposed flow. Basically this component is just keeping track of the gears, which is information that is probably already in the system.

Whether distributed applications should be supported, depends on the vision that RedHat has for OpenShift. Does RedHat just want simple web-based applications that run in a silo? Or do you also want to offer a platform that can be used to build complex distributed applications. I believe with a few minor tweaks it can do both. Do note that my example is probably not suitable for the Online platform, but those issues can be solved. I think distributed applications are not disallowed by the PaaS concept. A PaaS should try to support as many different languages and architectures as possible. It would also be a nice competitive advantage that OpenShift has over other PaaS provider; I believe nobody offers this yet.


[1] https://www.openshift.com/forums/openshift/clustered-applications-knowing-the-topology
[2] thinking about solutions to avoid the SPOF

Attachment: openshift_and_erlang_.png
Description: PNG image


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]