• Rating:
  • Views: 407
  • Author: JLupin
  • Comments: 0

Welcome to REACTIVE JLupin

The new version of JLupin Next Server, as a component of the JLupin platform is another very big step in the development of microservice platforms. Together with version 1.4.1, starting from RC5, we are entering new possibilities to create applications in the microservice architecture, i.e. using reactive communication models. Reactivity is above all an opportunity to build unique user experiences using the application and to deeply optimize the use of IT resources. What makes JLupin "responsive" and made available in RC5?

  • JLupin Reactive Queues (with callback) - a completely new queue implementation that enables reactive communication patterns while providing a "callback" mechanism. Thanks to the new queues, you can not only call the service asynchronously, but also ask about its result via the JLupina API or ... simply the result can be automatically returned to you once it is ready. And all these are provided also in the microservice architecture - each queue can be an independent JVM process, individually scalable and multiplied, of course according to the main postulate of the platform - without single points of failure, in the scale-out model.

And some code:

Order to perform a task on the queue:

  JLupinQueueManagerService queueManagerService = getQueueTaskManagerService();
  String taskId = queueManagerService.putTaskInput("SAMPLE","sampleMicroservice",
                                                   new Object[]{new Integer(10)});

On the client side - registration of the function, and when the result is ready it will be passed in a completely new thread. Registration of callback functions exempts the previous thread. The result can then be sent to the client eg via a pre-established websocket - see the JLupin Reactive Channels example.

  JLupinClientQueueUtil jLupinClientQueueUtil = new JLupinClientQueueUtil("SAMPLE", queueManagerService);
  jLupinClientQueueUtil.registerFunctionOnTaskResult(taskId, new JLupinQueueReactiveFunction() {
          public void onSuccess(String taskId, Object result) {
              System.out.println("on success with task id:" + taskId + " and result object:" + result);
         public void onError(String taskId, Throwable th) {
             System.out.println("on error with task id:" + taskId + " and exception object:" + th.getMessage());
  • JLupin Reactive Channels - a new platform component through which channel communication is implemented, which is the basis of the reactive programming. How it's working ? Microservices subscribe to the channel through which they communicate with other subscribers, each of whom is responsible for the implementation of a selected group of services (sounds familiar, yes, microservices). Each of the subscribers is not aware of the existence of the others, each of them realizes the functions entrusted to him the best he can and calls them through the channel, which are necessary for the implementation of the entire query carried out by the system. It's like a chain reaction - one query to the system triggers an "avalanche" of atomic operations whose results are returned in accordance with the reactivity paradigm - asynchronously and gradually. As in the case of reactive queues, the channels are also "microservices" and operate in a multi-node system without a single point of failure. Soon there will be full documentation of this functionality and examples of how it can be used in practice. Stay with us.

And some code:

A service that writes to a reactive channel instead of simply returning an answer:

  String streamChannelId = jLupinChannelUtil.openStreamChannel();
  jLupinChannelUtil.putNextElementToStreamChannel(streamChannelId, new Integer(1));
  jLupinChannelUtil.putNextElementToStreamChannel(streamChannelId, new Integer(2));

The client receiving the results using the remote iterator (in the Publish / Subscriber model available from JAVA 8) and sending the incoming (exactly when they are available) results to the browser (phone / tablet) via a web socket using the Flux library.

  JLupinClientChannelIterableProducer jLupinClientChannelIterableProducer = new JLupinClientChannelIterableProducer(jLupinChannelManagerService);
  Iterable iterable = jLupinClientChannelIterableProducer.produceChannelIterable("SAMPLE",streamChannelId);
  return Flux.fromIterable(iterable);
  • JLupin Reactive Protocol - new communication protocol, adapted to the dynamics of data flow and number of calls on the platform, which was additionally optimized in terms of CPU time consumption and the amount of allocated memory. All these to enjoy "reactivity" without compromise, without restrictions and to provide the best business software in the industry.

We have also prepared a significant update of the JLupin Edge Balancer, i.e. along with the RC5 version it is available:

  • Access control, thanks to which the provision of servlet microservices (web) on user-defined JLupin Edge Balcancer ports is controlled and parameterized through the microservice configuration ("externalPort" parameter).
  • Autodiscovery, thanks to which integration with external balancers is automatic, easy and effective :)

And at the end - good news for all fans of alternative programming languages, from version 1.4.1 on JLupin you can run the code written in the following languages:

  • Scala - we have prepared a dedicated tutorial, which describes how to quickly start your adventure with Scala.
  • JavaScript, Groovy, Kotlin - materials are still being prepared, they will soon appear on our website. Stay with us.

What else will be in 1.4.1 ?

We do not slow down and we are still working on the target functional scope of the new version, below we share with you what we know for sure that it will appear in the final release. Do you have any more needs? The platform is for you, please share new ideas in DevZone.

  • JLupin Local Web Console - the first premiere of the graphic (web) console for JLupin right away ... thanks to it, for the first time you will not only experience what the JLupin Platform is, but you will also see it! It's almost finished so we can present the screen from the beta version:

  • Queue persistence - the ability to connect a permanent data carrier (disk, database) to each of the queues, so that each of the sent messages will be preserved and processed regardless of the infrastructure. Therefore, in addition to high operational efficiency thanks to the reactive model, we have additional mechanisms to secure communication, all in a reliable architecture, without a single point of failure (one of the main assumptions of the JLupin platform).
  • Extended JMX Monitoring - monitoring of the entire complex environment in one place? YES ! In JLupin, a whole, powerful environment composed of any number of microservices will be able to be monitored through one interface, in one place. This is another expression of implementation of the JLupin microservice platform development strategy, according to which the entire complexity of the microservice environment is covered with mechanisms simplifying development and maintenance as if it were still a monolith ... The user and the organization have to derive tangible benefits from the microservice architecture (scalability, flexibility) without additional operating costs associated with increasing the complexity of the environment. Are we successful? Check it out yourself!.
  • Advanced autoscalling - multi-level, precise scaling thanks to the new version of JLupin Control Center. This is the best way to ensure the compliance with SLAs thanks to proactive adaptation of IT service resources to load changes with minimal involvement of IT infrastructure. We assure you that JLupin will automatically optimize your resources before "asking" for another machine. Together with the new version of JLupin Control Center, we are entering a new level of integrated provisioning and orchestration services for the managed IT infrastructure. Thanks to JLupin Next Server, you will be able to implement truly "micro" microservices, that is to say separate functions if necessary, and thanks to the new JLupin Control Center these single "micro" microservices will be precisely and independently scaled.

The 1.4.1 is not finished... we are going to release this version in June 2018... we would like to encourage you to share your opinion about what we have done (use our contact form) and what we could do more (use "Your Ideas" in DevZone). Stay in touch !