Integrating Other Technologies

Spring Cloud and the entire Netflix Stack are based on Java. Thus, it seems impossible for other programming languages and platforms to use this infrastructure. However, there is a solution: the application can be supplied with a sidecar. The sidecar is written in Java and uses Java libraries to integrate into a Netflix-based infrastructure. The sidecar, for instance, takes care of registration and finding other microservices in Eureka. Netflix itself offers for this purpose the Prana project.[1] The Spring Cloud solution is explained in the documentation.[2] The sidecar runs in a distinct process and serves as an interface between the microservice itself and the microservice infra?structure. In this manner other programming languages and platforms can be easily integrated into a Netflix or Spring Cloud environment.

Tests

The example application contains test applications for the developers of microservices. These do not need a microservice infrastructure or additional microservices— in contrast to the production system. This enables developers to run each microservice without a complex infrastructure.

The class OrderTestApp in the “Order” project contains such a test application. The applications contain their own configuration file application-test. properties with specific settings within the directory src/test/resources. The settings prevent that the applications register with the Service Discovery Eureka. Besides, they contain different URLs for the dependent microservices. This configuration is automatically used by the test application as it uses a Spring profile called “test.” All JUnit tests use these settings as well so that they can run without dependent services.

  • [1] http://github.com/Netflix/Prana/
  • [2] http://cloud.spring.io/spring-cloud-static/Brixton.SR5/#_polyglot_support_with_sidecar
 
Source
< Prev   CONTENTS   Source   Next >