Review of the most interesting reports Joker 2018: version of EastBanc Technologies

    Hi, habrovchane! In this post we want to share our impressions of the conference for Java-developers Joker 2018 , which we heard most of all we heard.

    We hope this will help you navigate the video from the conference when they appear in the public domain. In the meantime, we added links to presentations wherever possible.

    Day 1

    Don't walk away from complexity, run - Venkat Subramaniam

    Agile is the ability to adapt to changes. Efficient use of Agile prevents us from creating the complexity of the systems with our own hands.

    The Venkata report contains a list of issues that complicate the system and general speaker advice on software development. It is unlikely that this report will become a revelation, but even obvious things need to be known, it is useful sometimes to refresh them in memory and to use them.

    As we ourselves make the system complex:

    • Moving parts
      Making unnecessary configuration, creating unused components, creating too many layers, etc.
    • Unreadable code
      "This code works, but it looks like it should not." Complicated code leads to invisibility of changes. Opaque changes create bugs and interfere with understanding what is happening with the object.
    • Too many dependencies
      Dependencies quickly become incompatible, the more they are, the harder it is to manage.
    • Reckless passion to introduce new technologies
      Try to answer the following questions:

      - What is the price of introducing a new technology?
      - How easy will it be to abandon the selected technology?
      - Library or framework? You use the library, and the framework surrounds you. From the library is much easier to give up than the framework. Therefore, the decision to use the framework should be made more balanced. If it is easy to return to the old approach and if we can prove it, then we need to take it. Do not download what you really do not need.
      - Resume Driven Development.
    • Random complexity.
      For example, low-level multithreading. If you have solved the problem using the thread pool, then you now have a problem pool.

    Transaction cascades or Harald Wendel ( presentation )

    Harald told how the project solved the problem of organizing distributed transactions by removing transactions and replacing them with the State Machine. To maintain consistency between microservices, they must implement support for states, including the disabled, and respond to their change. For communication between services in the project is used Kafka.

    In fact, the report has one idea - to abandon transactions when switching to a distributed system.

    How the former transaction operation works:

    1. It is still transactional, but only one business transaction (conditionally one) is committed to the database. Others as part of the transaction, save to the database for Kafka.
    2. Also as part of the transaction, we get a new State business transaction. This is a fully valid, self-contained State.
    3. A special handler reads the base: either polling or commit hooks on the entity, if the handler is in the same place as the entity. Then sends a message to Kafka.
    4. Kafka subscribers are processing messages. Here we can use the standard delivery guarantee mechanism. Messages are in Kafka right time and someday processed by the service.
    5. When processing, subscribers can commit to their database and change their State. In doing so, the services exchange the State.
    6. Rollback business transaction no. And there are three options for handling problems:

      • Wait for the victory to correctly process the message from Kafka.
      • In case of an error (and the required number of repetitions) it translates to start the corresponding “erroneous” State.
      • Send a message to Kafka so that the initiator of the business transaction (and other participants) will process it to take measures to roll back their local transactions.

    Memory Java-process on the shelves - Andrey Pangin

    Andrei's talk can be used as a reference and how-to debug problems with native memory leakage using the example of non-heap memory.

    The report is useful for understanding who and what eats up memory. Andrew shows tools for analyzing memory, including the AsyncProfiler, which is built into Idea: "The upcoming IntelliJ IDEA 2018.3 integrates a low overhead sampling profile and canvassing profile".

    We recommend everyone to look at it and drive their modules and microservices along the same steps.

    Pattern matching and his imaginary friends - Tagir Valeev

    Tagir talks about the possibilities of programming languages: what, how, when and with what crutches can appear in Java, what problems this has to be solved by the developers and the language community. There is little explicit practical applicability, but it may be useful in the long term.

    The Adventures of Senor Holmes and Junior Watson in the world of software development [Joker Edition] - Evgeny Borisov and Baruch Sadogursky ( presentation )

    Abstract report has already intrigued. Holmes and Watson promised to uncover several puzzles from the daily development: tools, libraries and frameworks that perplex ordinary developers in their daily routine.

    We noted the most useful moments in the story:

    • In Spring 5, you can add bins and other things in the external groovy file. Those. no need to rebuild, just restart, for example, to add a BeanPostProcessor.
    • It is necessary to remember the name of bins. For example, you cannot create a bin ConversionService, because This is already in the intestines of the spring.
    • Need to remember about the standards. For example, multipart is allowed only for post, and Spring is behind it.
    • Need to read the documentation. We will explain on the example of the cuts. AllArgsConstructor adds java.beans.ConstructorProperties annotation for the constructor. Moreover, if there is no annotation, Jacson uses the default constructor and getters, since constructor parameter names are not saved after compilation. If there is an annotation, it contains the parameter names (in accordance with the java beans convention), and Jacson uses the constructor. Lombok annotation SneakyThrows changes the Checked exceptions to Unchecked exceptions.
    • Also in the report we voiced an interesting question: “Do we really need Checked exceptions in principle?” We thought.

    Day 2

    Reactive hardcore: how to build your Publisher <?> - Oleg Dokuka

    It can be said that this is an introduction to reactive programming: the report describes basic concepts and abstractions. Oleg shows the entire evolution of our reasoning, which leads us to the implementation of Publisher from the standard library of Reactive Streams. We advise you to look in order to understand where your legs grow from.

    Derek Ferguson ( presentation )

    You can listen if you are learning Machine Learning. Although it is not very clear for whom the report was intended. If people understand, then for them it is no longer interesting. If they do not understand, then they will not understand the report, too little information is needed for understanding.

    The basic message is this: you can use google TensorFlow to train models from Java, but support for learning is limited. But you can use trained models. For example, load a trained model into TensorFlow-microservice and send it requests from Java or another microservice to get a response. For example, recognize the picture, tell by the symptoms, what a disease ...

    And the TensorFlow team has a Docker Image with TensorFlow, which can be used to upload models there and send requests for applications of these models. Sweet!

    Micronaut vs Spring Boot, or Who is the smallest? - Kirill Tolkachev and Maxim Gorelikov

    Cyril and Maxim compared modern frameworks in terms of launch speed, in terms of the amount of memory required for starting up, and in terms of coding complexity.

    One fact caught our attention: Micronaut implements DI at compile time, and Spring implements at startup / work. This allows Micronaut to run faster. But until the release version of Micronaut came out, I have to take my word for it. jet distributor - Vadim Tsesko ( presentation )

    Vadim Tsesko talks about the architecture of the music distributor in Odnoklassniki. The report has a description of servers and their roles, a description of balancing and how Fault Tolerance and High Availability are provided. Separately - about the reactive approach on a real case without any special technical details. OK showed a working example of using a reactive approach.

    Various concepts, best practices and architecture for obtaining a fault-tolerant service due to balancing and replication, and other data caching tricks for fast delivery of data to the user are presented. As always, in the presentation, OK has a bunch of links for more in-depth study of the topic from the slide.

    Reactive Spring - Josh Long

    The report for which we were driving :) Actually, no, but Josh Long is one of the two big stars of the conference. His report is cool, combines both humor and technology.

    What we call a report in practice was this live coding session on creating reactive microservices using Spring WebFlux. It gives a general understanding of what the Reactive API is, offers an example of use in Spring 5, and the bonus is a cheerful presentation of material. There was also an example with Reactive Proxy as an alternative to Zuul. We advise everyone to look.

    The world has finally become reactive. Or the overall impression of the Joker reports

    There were many reports about this and even more it was discussed in the discussion areas. In fact, the big question is whether the world has become reactive or has it been like this for a long time, but now they have come up with a new name for the old patterns and poured new blood into them.

    Among the reports on reactivity were for every taste: and purely technical, for example, Josh Long, who told how to do reactivity in the spring. And real cases of reactivity - for example, Vadim Tsesko from Schoolmates.

    Our main technology is Spring, so the Josh Long report is a must-see. ( Link to the repository from the report ). There is an example of a reactive service that works with Mongo reactively and a reactive service that reactively proxies another reactive service. It was quite helpful for us to find out.

    Also popular now: