Togglz 🔥 | Runtime Feature Rollouts in Spring Boot Application | JavaTechie

Поделиться
HTML-код
  • Опубликовано: 13 апр 2023
  • A comprehensive guide to simplifying feature rollouts without redeployment using the Togglz library
    Feature Toggle is a design pattern that allows you to enable new features during runtime. The benefit of this strategy is that you can control the feature rollout independently from the deployment process
    #JavaTechie #SpringBoot #Toggle
    Spring boot microservice Premium course lunched with 70% off 🚀 🚀
    Hurry-up & Register today itself!
    COURSE LINK : javatechie5246.ongraphy.com/
    PROMO CODE : JAVATECHIE50
    GitHub:
    github.com/Java-Techie-jt/tog...
    Blogs:
    / javatechie
    Facebook:
    / javatechie
    guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
    Disclaimer/Policy:
    --------------------------------
    Note : All uploaded content in this channel is mine and its not copied from any community ,
    you are free to use source code from above mentioned GitHub account
  • НаукаНаука

Комментарии • 109

  • @siddharathadhumale3683
    @siddharathadhumale3683 6 месяцев назад +2

    Great explanation of toggle features and the Togglz library! Your Amazon example perfectly illustrates the benefits of runtime control. I'll definitely be checking out this approach for my next project. Thanks for sharing!

  • @shashankcool
    @shashankcool Год назад +1

    Nice video , today i learned new thing using spring boot.
    Keep uploading such videos.

  • @adityatripathi60
    @adityatripathi60 Год назад +1

    Well explained Java Techie.,.... wonderful 😊

  • @atulpatil7472
    @atulpatil7472 Год назад +1

    Thanks for wonderful information

  • @Sashikant_Ray
    @Sashikant_Ray Год назад +1

    Nice work 😊

  • @sahilpatel2885
    @sahilpatel2885 Год назад +1

    Great and thanks sir 🔥🔥

  • @psudhakarreddy6548
    @psudhakarreddy6548 Год назад +2

    Thank you.its good

  • @user-uj6qr6ru9i
    @user-uj6qr6ru9i 9 месяцев назад +1

    Nice! 😁

  • @zawedakhtar379
    @zawedakhtar379 Год назад +1

    Thank you Basant Sir

  • @falloumbow7294
    @falloumbow7294 Год назад +1

    Très interessant

  • @nenuanenenuane6645
    @nenuanenenuane6645 9 месяцев назад

    Hi Basant great video

  • @michalechowicz6903
    @michalechowicz6903 Год назад +1

    Thanks! Excellent tutorial!

  • @kavitabora7655
    @kavitabora7655 Год назад +1

    Awesome, i remember we used to maintain enums and if else case. Nice now code is centralized 🙏. Nice happy weekend

    • @Javatechie
      @Javatechie  Год назад +1

      Thanks Kavita Keep learning 😃

    • @kavitabora7655
      @kavitabora7655 Год назад +1

      @@Javatechie if possible, could you make a video on Microservice observability like how actually micrometre project works, how it stores api hit etc does it directly communicate with server configs (devops things) or maintaining data at its end like filter nd own db etc. If possible to show the insight of that projects 🙏.

    • @Javatechie
      @Javatechie  Год назад +1

      Sure Kavita let me Deep dive more into it then i will update 🙂

  • @Aniruddhdwivedi
    @Aniruddhdwivedi Год назад +1

    Hi Basant, can you upload introductory video on RedHat Decision Manager as well?

  • @shivyadav2278
    @shivyadav2278 Год назад +2

    This is wonderful , an u make some videos about distributed caching , service mesh and side cars.

    • @Javatechie
      @Javatechie  Год назад

      No it's not there but I will plan for it .

  • @user-oj6xt8ff5g
    @user-oj6xt8ff5g 8 месяцев назад

    Hi Basant, thanks for the tutorial. But I have a couple of questions/request
    1. If I want to enable/disable a feature across multiple layers (UI, BFF and Backend) how will it help here ? Because Admin console is attached to a particular microservice.
    2. Since there is no database to keep the features, how will it ensure that multiple instances(pod) of a service will contain the same value(especially when we are updating one flag at runtime) ? I agree we can create a separate feature server for that
    3. Can you please cover feature toggle in Java using Optimizely ?

  • @MohaideenA
    @MohaideenA Год назад +1

    can you please integrate with Spring security ? The one here is not production grade implementation and also not working when spring security integration is present.
    I tried for any documentation, but there are none. Seams to be a good candidate for your next video.

  • @GodOfGizmos
    @GodOfGizmos Год назад +1

    Hi, Thanks for creating this video.
    Question : will the state of feature be saved as per the last value set during the case of redeployment of the pod/application? Thx

    • @SunilVerma-gr7yv
      @SunilVerma-gr7yv 3 месяца назад

      I don't think so as those are stored in spring boot in-memory.

  • @preethamumarani7363
    @preethamumarani7363 Год назад +1

    Great tutorial and concise content. Thanks for the awesome video.
    Since most of the systems are distributed these days, not sure how this tool would be useful. Any thoughts ?

    • @Javatechie
      @Javatechie  Год назад

      Thanks buddy. It will work for distributed system

  • @jasper5016
    @jasper5016 Год назад +3

    As always the best tutorial. Can you please cover java code deployment on AWS EKS?

    • @Javatechie
      @Javatechie  Год назад +1

      Yes buddy i will do that give me sometime

    • @jasper5016
      @jasper5016 Год назад +1

      @@Javatechie - Take your time brother. :)

  • @vaibhavshukla444
    @vaibhavshukla444 Год назад +1

    Hey great video, thanks for posting it, just one question that can't we do similar thing using manifests

    • @Javatechie
      @Javatechie  Год назад

      Not getting how manifest file will help here

  • @koushikaddinki8292
    @koushikaddinki8292 Год назад +1

    Great tutorial and very informative but I observed this won't work for the spring boot 3 versions. Can you create a video on how to create those FeatureManager configurations and also on the different strategies implementing part as well. Thanks.

  • @195mano
    @195mano 11 месяцев назад

    Can you help me difference between FF4j vs Togglz . Which one can i choose ? Is both or open source ?

  • @manishadash6737
    @manishadash6737 4 месяца назад

    Hi please make one video on method to toggle with FF4J so that we can able to toggle method depends on FF4J flipping strategy. Please make one video

  • @ainigma100
    @ainigma100 Год назад +1

    Thank you for the video Basant! Can you please show us a good approach of monitoring our services. What is the best approach of monitoring everything related to our services? Is Datadog a good approach? Thank you in advance!

    • @Javatechie
      @Javatechie  Год назад +1

      Prometheus and grafana usually people use . I have not explored more on datadog buddy will check and update you

    • @ainigma100
      @ainigma100 Год назад +1

      @@Javatechie Thank you!

    • @vaibhavshukla444
      @vaibhavshukla444 Год назад +1

      @@Javatechie Can you make a video on Prometheus and Grafana specially the query language , it would be really great as they are used in many good
      companies.

    • @Javatechie
      @Javatechie  Год назад

      Yes buddy i will remake this

  • @sajeeshkumar4510
    @sajeeshkumar4510 Год назад +1

    Hi Basant, Thanks for your nice video on toggle feature. My only concern is how this feature can extensively used and under what scenarios it can be used. Since the admin of the application can set or unset the feature for the application in his web page, this feature usage is minimal or none. I feel that the setting of the various feature through web page by an authorized user is better.

    • @Javatechie
      @Javatechie  Год назад

      Hi Sajeesh , let's take a small use case assume in ecommerce application i am loading location information from one 3rd party application but in future i want to fetch it from my DB instead of getting it from 3rd party app so i have implemented the code by pointing to DB but my project is live and i want to test my New implementation then how can I do that without decommissioning the 3rd party call? In this kind of situation the toggle switch will help you

    • @sajeeshkumar4510
      @sajeeshkumar4510 Год назад +1

      @@Javatechie Thanks for your reply. I got your point. Only in such scenarios we can use toggle features else we can use admin setting the features.

    • @Javatechie
      @Javatechie  Год назад

      Yes absolutely

  • @RamKumaru-xc6wl
    @RamKumaru-xc6wl 6 месяцев назад +1

    Great explanation sir..But i have few questions.
    1. Currently we are using vcap service in app express. I can add a variable in vcap service and i can switch there itself right? What's the difference between vcap service in app express and togglz?
    2. This code will work only if i need ,5% discount right.. Suppose if i want 10% discount then this toggle will not work right?Again i need to do redeployment right?

    • @Javatechie
      @Javatechie  6 месяцев назад

      Yes but your configuration should be always external to your project so redeployment not required

  • @inhtruongvu7618
    @inhtruongvu7618 8 месяцев назад

    00:00 Toggle Library cho phép kiểm soát tính năng thời gian chạy
    02:57 Sử dụng Toggle Library để thay đổi tính năng trong thời gian chạy
    05:40 Kích hoạt và xác thực các chuyển đổi tính năng trong Java
    08:35 Bật và tắt các tính năng khi chạy
    11:21 Bật và tắt các tính năng bằng Toggle Library
    14:00 Chuyển đổi tính năng thời gian chạy cho phép thay đổi hành vi mà không cần thay đổi mã
    16:23 Duy trì trạng thái tính năng bên ngoài bằng hệ thống tệp
    18:57 Sử dụng thư viện chuyển đổi để kiểm tra các tính năng mới một cách an toàn
    Crafted by Merlin AI.

  • @devaamujuri5998
    @devaamujuri5998 Год назад +1

    Nice tutorial, incase my percentage of discount is random. different Pongal season different value, in that case how we will set that in feature. ?? i tried by adding and reading DISCOUNT_PERCENTAGE from feature properties' file but no luck.

    • @Javatechie
      @Javatechie  Год назад +1

      No you can set the parameters dynamically to the toggle itself that will be my next video

  • @durgadutta08
    @durgadutta08 Год назад +1

    Hi will the state of feature be saved as per the last value set during the case of redeployment of the pod/application?

    • @Javatechie
      @Javatechie  Год назад

      Yes i believe manually we need to store past state

  • @rishiraj2548
    @rishiraj2548 Год назад +1

    Thanks

  • @omray1
    @omray1 Год назад +1

    Hi Basant, Could you please let me know which URL you are passing in the postman to update the status? If I will update it from postman do I need console library also ?

    • @Javatechie
      @Javatechie  Год назад

      Hi i have tried below curl
      curl -d '{"name":"DISCOUNT_APPLIED", "enabled":"true"}' -H “Content-Type: application/json” -POST localhost:8080/actuator/togglz/DISCOUNT_APPLIED

    • @omray1
      @omray1 Год назад +1

      Thank you so much. It's really helpful as much as cool.

  • @devjyotidey7165
    @devjyotidey7165 Год назад +1

    If the spring boot application is running on multi-pod cluster, will the toggle work for all pods? Or it will only toggle for the pod the postman http request went to?

    • @Javatechie
      @Javatechie  Год назад

      Even though it's multiple code still code where we are accessing feature management is the same right ?

  • @gurusudharshan4139
    @gurusudharshan4139 Год назад +1

    Hi Basant thanks for the video... I have a doubt... enabled is true in yml file but from console I have disabled it... then if my server is restarted then flag again enabled...right? If yes? What to do to get updated flag (false)?

    • @Javatechie
      @Javatechie  Год назад

      No application restart won't impact much as based on your state it will behave

  • @rafiqulecho
    @rafiqulecho Год назад +1

    Hi, I was curious what is the benefit of this library over something like for example if I keep track of this variable in a db table?

    • @Javatechie
      @Javatechie  Год назад

      If you will keep in the db then how do you toggle, definitely either you need to hit the api or run manual update query right?

    • @rafiqulecho
      @rafiqulecho Год назад +1

      @@Javatechie thanks for reply brother. Yes I meant having an api for this variable to toggle. Is this worse or better in terms of performance?

    • @Javatechie
      @Javatechie  Год назад

      Buddy Single api call won't impact much on performance but still why should we go manual when we are getting this feature freely by just adding a dependency

    • @govindkerkar
      @govindkerkar Год назад

      @@Javatechie here also it's manual change only in ui or postman hit so both are manual ways in which u r enabling feature...same thing can be done in db flg which can be cached by in memory datastore which is centralised...and executing db update with central cache refresh for given feature key will reflect changes in all pods or instances...this is much more better approach than hitting postman or ui based updates on each pods or instances of application....with multi instance environment which is normal for prod...this thing if it's centralised thn only it's usable or effective else it's just not effective enough thn db centralised feature flag storage and updates in db as thts performance efficient

  • @abhilashkr1175
    @abhilashkr1175 Год назад +1

    Whenever the toggle is changed will it get logged in a DB? in prod , we need to know when was the toggle used and by whom

    • @Javatechie
      @Javatechie  Год назад

      Toggle auditing i haven't tried need to check

  • @johncenakiwi
    @johncenakiwi Год назад +2

    Hi Basant, are you using this library in your company? Is it allowed?

    • @Javatechie
      @Javatechie  Год назад +1

      I have not used it but it is absolutely allowed as it is open source

  • @aadiraj6126
    @aadiraj6126 Год назад +1

    "Spring for apache kafka" + "Spring cloud stream", is equal to "Spring for apache kafka stream" ? What is difference?

    • @Javatechie
      @Javatechie  Год назад

      No it's not equal i will cover that

  • @KarmakillsYou
    @KarmakillsYou Год назад

    Hi Basant,
    What if there are 10 features defined in yml and want all features to be loaded at runtime? I don’t want to use new keyword for all 10 features. Please suggest.

    • @Javatechie
      @Javatechie  Год назад

      I guess you can use builder pattern

  • @aravindreddy6699
    @aravindreddy6699 Год назад +1

    Hi Bro, can we do Service now and Active Directory integrations. Pls suggest how can we integrate external apps like Data dog

    • @Javatechie
      @Javatechie  Год назад

      Aravind you have asked 3 questions in a single response 😜. Tell me which one is priority for you 😉

    • @aravindreddy6699
      @aravindreddy6699 Год назад

      @@Javatechie Service now integration and enable audit tracking, Thank you

  • @yravi37
    @yravi37 18 дней назад

    Can you give link for this using Java8?

  • @arvindimage
    @arvindimage Год назад +1

    Can we pass the discount value from outside of the app using this toggle?

    • @Javatechie
      @Javatechie  Год назад +1

      Yes we can set discount parameters dynamically using toggle i will do that in my next video

    • @arvindimage
      @arvindimage Год назад +1

      @@Javatechie thanks

  • @user-od1jg2ux2s
    @user-od1jg2ux2s Год назад +1

    What if we have this service replicated in a cluster, then how do we toggle a feature to affect multiple running replicas of this service?

    • @Javatechie
      @Javatechie  Год назад

      Then you need to update in all replicas This is expected right

    • @user-od1jg2ux2s
      @user-od1jg2ux2s Год назад +1

      @@Javatechie is it an ideal solution in production environment ?

    • @Javatechie
      @Javatechie  Год назад

      Yes ankith , what is the drawback? Why do you think it's not good for production?

    • @user-od1jg2ux2s
      @user-od1jg2ux2s Год назад

      @@Javatechie it could cause data inconsistency. For ex. If we have 3 services each with 5 replicas. Even if we fire an api to update the feature state in all 15 containers, due to network latency, pod availability or some internal error if the service doesn't update it's state it can cause request failures or could corrupt the DB. Having a central service holding these flags would be an ideal method, although there is a risk of single point of failure, there won't be data inconsistency is what I feel. How about you ?

  • @pratyush__agarwal
    @pratyush__agarwal Год назад +1

    Which one is good, FF4J or Togglz?

    • @Javatechie
      @Javatechie  Год назад +1

      FF4j heard something new buddy let me check

    • @pratyush__agarwal
      @pratyush__agarwal Год назад +1

      @@Javatechie Sure, FF4J is feature flags for Java. It also flips features and does kind of similar things as togglz.

    • @Javatechie
      @Javatechie  Год назад +1

      Awesome thanks for sharing this info Pratyush

    • @aadiraj6126
      @aadiraj6126 Год назад +2

      "Togglz" is conceptually largely identical to "FF4j", though the APIs for querying the feature flags differ significantly as Togglz relies on Java enum as its primary means. "Unleash" is virtually identical to that of FF4j, and has probably more features than these other two. Worth considering, while chosing one out of these three.

  • @kumarabhishek7877
    @kumarabhishek7877 Год назад

    Distributed application you need to keep this in Reds

  • @divergentinsights4823
    @divergentinsights4823 Год назад +1

    Hello I am facing some issue ,can u pls resolve it ?
    Consider defining a bean of type 'org.togglz.core.manager.FeatureManager' in your configuration.

  • @jyotimahajan997
    @jyotimahajan997 Год назад +1

    How to add feature toggle feature at front end too

    • @Javatechie
      @Javatechie  Год назад +1

      I will check and update not have much idea on UI

    • @pavankumarmantha
      @pavankumarmantha Год назад +1

      please check the unleashed and launchdarkly feature togger frameworks, that has capability of multiple technology stacks

    • @jyotimahajan997
      @jyotimahajan997 Год назад

      @@Javatechie Thanks

  • @nandhakumarnandha43
    @nandhakumarnandha43 Год назад +1

    Hi, how UI can use this feature flag

  • @pavankumarmantha
    @pavankumarmantha Год назад +1

    Hi Basant why did you remove my comment yar, i did not write anything wrong infact suggested some more new technologies

    • @sivannarayanapenumala1840
      @sivannarayanapenumala1840 Год назад

      May I know what are those new technologies??

    • @Javatechie
      @Javatechie  Год назад +3

      Hey sparkDev sorry for the inconveniences. By mistake it was deleted please don't mind and repost

    • @pavankumarmantha
      @pavankumarmantha Год назад

      @@sivannarayanapenumala1840 those are LaunchDarkly and unleash. Where unleash is.opensource and LaunchDarkly is paid

  • @ShinAkuma
    @ShinAkuma Год назад +4

    Seems like a redundant library.
    We can achieve this without too much effort with some flags stored in memory at runtime.
    The solution this library is providing isn't that big of a problem to begin with. If a Software wants to toggle features at runtime, they will use the database or file to store the flags and would definitely avoid using any third party library for the same.

    • @Javatechie
      @Javatechie  Год назад

      If you will use the database then to toggle any features you need to trigger a query right? Either manually or through api to update the flag value

    • @ShinAkuma
      @ShinAkuma Год назад +2

      @@Javatechie If you don't use a permanent storage like fiile or a database, your flag will be reset everytimie you retart or redeploy the application.
      Don't want people to get free discounts by accident just cause we released a new version right ?

    • @Javatechie
      @Javatechie  Год назад +1

      Yes that's what I was trying to convince you to maintain your State of features external to your application like database or file

  • @rahulvaish3034
    @rahulvaish3034 3 месяца назад

    Cloned your repo. It doesn't work!
    ruclips.net/video/-FdegW8XX0c/видео.html works for me. It uses different dependency in pom.xml
    Thanks, your videos are always helpful