- 17
- 243 447
Productivity for Programmers
Malaysia
Приєднався 24 лис 2019
This channel is about discovering tools that help programmers improve their productivity so that they can get high quality software in production faster.
Spring Boot: How to fix connection refused errors after code changes (ECONNREFUSED during reloads)
When using Spring Boot together with spring-boot-devtools, when it detects a class file change, a restart will trigger that will temporarily make the web server unavailable. This means that while a restart is happening, the REST API client that we're using might get a connection error. The problem is made worse as the application becomes bigger and restarts start taking longer (Quarkus and Play framework do not have this problem).
To solve this problem, I developed a simple web server (in Golang) that will detect source file changes and trigger a rebuild. After a rebuild, spring-boot-devtools will take care of restarting the application. During the rebuild and restart process, the web server will pause requests until the health check passes (provided by spring-boot-starter-actuator). Once the health check passes, the connections will be forwarded to the Spring Boot application.
To use this web server:
a.) Your Spring Boot application must have both spring-boot-devtools and spring-boot-starter-actuator as a dependency.
b.) You must point your API client (postman/insomnia/httpie) to this web server rather than to the Spring Boot application's web server.
The source code for this web server is available at:
github.com/productivity-for-programmers/productivity-for-spring
To solve this problem, I developed a simple web server (in Golang) that will detect source file changes and trigger a rebuild. After a rebuild, spring-boot-devtools will take care of restarting the application. During the rebuild and restart process, the web server will pause requests until the health check passes (provided by spring-boot-starter-actuator). Once the health check passes, the connections will be forwarded to the Spring Boot application.
To use this web server:
a.) Your Spring Boot application must have both spring-boot-devtools and spring-boot-starter-actuator as a dependency.
b.) You must point your API client (postman/insomnia/httpie) to this web server rather than to the Spring Boot application's web server.
The source code for this web server is available at:
github.com/productivity-for-programmers/productivity-for-spring
Переглядів: 827
Відео
Is FerretDB a drop-in replacement for MongoDB? (First Impressions with Java and Morphia)
Переглядів 489Рік тому
I love MongoDB but I sometimes have a nervous feeling about being locked in to a database product. FerretDB is an alternative to MongoDB that implements the MongoDB wire protocol and thus enables it to be drop in replacement for MongoDB (assuming that the subset of MongoDB features that you are using has been implemented by FerretDB). FerretDB's website: www.ferretdb.io/ docker-compose file: do...
ANTV X6 JavaScript Diagramming Library: Lets build a workflow editor (Drag and Drop Nodes)
Переглядів 11 тис.Рік тому
I predict that low code and no-code tools will be a standard part of software user interfaces in the near future. Gone will be the days where we use a third party low code/no code tools to allow our end users to customize our software. Instead, end users will expect that we build this customizability directly into our applications. For that to happen, we need to be able to add some kind of visu...
Gantt charts as code with PlantUML
Переглядів 2,4 тис.2 роки тому
It wasn't intuitive to me at first but project plans are a set of rules, variables and constraints so it actually makes a lot of sense to describe them in code form rather than by using a graphical tool such as Microsoft Project. In this video I'm going to show one such tool, PlantUML, that lets you define project plans (Gantt charts) in text form. PlantUML Website: plantuml.com/ Documentation ...
Tablesaw: The EASIEST way to process tables in Java (Data Frames / Pandas like)
Переглядів 18 тис.2 роки тому
The world runs on CSV files so it's always great to have multiple methods for processing them in your toolbelt. In this video, I'm going to talk about a library called tablesaw that provides an ergonomic interface for processing tabular datasets. It's so ergonomic that it's quite usable in interactive mode which is huge for a language that is as verbose as Java. With tablesaw you can perform mo...
Modern Java: Download and Upload Files from SFTP Servers from Java using the sshj library
Переглядів 4,3 тис.2 роки тому
In my first video on writing SFTP clients in Java I used a library called jsch. jsch does what it claims but it does feel a little bit dated. The Java library that I’m going to show today is called sshj (github.com/hierynomus/sshj) and it has a much more modern feel to it. Advantages of using sshj over jsch: - Supports "BEGIN OPENSSH PRIVATE KEY" style private keys out of the box - Uses the Jav...
PowerShell Tutorial: Downloading and Uploading Files from SFTP Servers (using Posh-SSH)
Переглядів 7 тис.3 роки тому
I'm really enjoying using PowerShell. You can do quite a lot by just learning a few basic features. One task that I do often is accessing SFTP servers and I wanted to put my recently acquired knowledge on PowerShell to good use by seeing how good it would be at automating common SFTP tasks. In this video, I'm going to show you PowerShell code for connecting to SFTP servers (using username/passw...
Fault Injection: Simulating Errors in REST APIs using Envoy Proxy
Переглядів 7513 роки тому
Have you ever wanted to test how your application behaves when certain APIs and services that it depends on aren't working correctly. This can be done using a category of tools called fault injection tools. In this video I'm going to explore the fault injection features of Envoy Proxy. Envoy version used: 1.18.3 00:00 Intro 03:01 Basic Envoy reverse proxy configuration 04:53 Injecting abort wit...
jsPlumb Tutorial: Add Diagramming Features to your Javascript Projects (Build a Workflow Editor)
Переглядів 12 тис.3 роки тому
While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds) One of my side projects is building a low code workflow tool that helps power users design and automate file transfer/SFTP related business processes. One of the components of this workflow tool is a graphical workflow editor that allows users to create a ...
Airflow Tutorial: Automate SFTP Operations using Apache Airflow
Переглядів 17 тис.3 роки тому
While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds) I do so much work with SFTP servers that I have been looking for solutions to help automate some of this repetitive work. One possible solution that I have been looking into is Apache Airflow. In this video, I give a tour of Apache Airflow's features and h...
Download and Upload Files from SFTP Servers from Java Applications using the JSch library
Переглядів 22 тис.3 роки тому
In this video I'll cover how the following SFTP operations can be performed by a Java program using the JSch library: - Connecting to SFTP servers - Authenticating to SFTP servers - Listing directories - Changing directories - Downloading files - Uploading files I also cover how to handle the following errors: - com.jcraft.jsch.JSchException: invalid privatekey - com.jcraft.jsch.JSchException: ...
SFTP Server on Window: Troubleshooting Permission denied (publickey,keyboard-interactive)
Переглядів 8 тис.3 роки тому
While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds) I did this video because quite a number of people commented that they were getting 'Permission denied' errors when following the instructions from my earlier video - Setting up an SFTP Server on Windows (Server) with OpenSSH (using Microsoft's port of Open...
Command Line CSV File Processing with Miller - Stop Using Python for Basic CSV Tasks!
Переглядів 2,1 тис.3 роки тому
Miller is a command line tool for processing CSV files. Often times the lowest common denominator for integrating two systems is a CSV file. Usually I would resort to Python scripts for processing these CSV files. However, for simple operations creating a one off script would be overkill. This is where Miller comes in. It is like a swiss army knife for CSV file processing. It includes what it c...
Kubernetes Cron/CronJobs in 10 minutes
Переглядів 36 тис.4 роки тому
Reference: kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/ Time must be in the UTC timezone: github.com/kubernetes/kubernetes/issues/78795 While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds)
Setting up an SFTP Server on Windows (Server) with OpenSSH (using Microsoft's port of OpenSSH)
Переглядів 85 тис.4 роки тому
Setting up an SFTP Server on Windows (Server) with OpenSSH (using Microsoft's port of OpenSSH)
Financier: (Really) Straight-forward personal budgeting software
Переглядів 1,1 тис.4 роки тому
Financier: (Really) Straight-forward personal budgeting software
Productivity Tools for Programmers: IntelliJ HTTP Client (Alternative to Postman)
Переглядів 16 тис.4 роки тому
Productivity Tools for Programmers: IntelliJ HTTP Client (Alternative to Postman)
This is really good vedio for sftp upload/download files using ssh pem key. I have search for this topic a lot but only find this vedio relevant to my problem regarding sftp ssh file upload. Thank you very much.
“Live on last months income” with the option to assign income to future months was the BEST part of YNAB and they blew it.
How can you get the start and the end point of the edge
Did you figure this out?
Car user... This command not working in windows
Hello, what do you mean by ‘car user’
cool
Very Useful and educational.
Thank you for the feedback.
Hi bro, when I try to download the file using get method, instead of getting copy of the file, getting deleted in server.Please suggest on how this issue can be fixed.
Hello, did you solve your problem yet? I would test this using another SFTP tool first to see whether it has the same behavior - if it does, then it's something to do with the server.
How to allow Sftp but disallow Ssh in Server22?
Are you able to get an SSH shell? My understanding is that the ForceCommand directive should prevent that.
How to do so? Tried different ways but seems failed. Tks
Try using: ForceCommand internal-sftp Let me know if that doesn't work for you.
Is the code available for practice?
I'll have to dig it up. It's probably somewhere in my backups.
where will be history saved ?
In the Kubernetes control plane (etcd).
How to console.log the svg in console using graph.toSVG(), i am having problem doing that.
What's the error that you're getting?
Is this same for Cloud Composer also ?
I'm not familiar with Cloud Composer.
Thank you for this very useful video!
Thank you for this very useful video!
Thank you. Please do subscribe if you would like to be notified of future videos.
This is cool, what are the pros cons using this over plumbjs or jointjs? I am deciding on which to use for my web application regarding sport play diagramming
I don't have a straight answer here. It's tough to say because I think it's quite use case specific. I would look at the demo/example projects from jsplumb/jointjs/x6 and find one that is most similar to your use case and evaluate it from there. All three of them have lots of sample projects.
thank you for replying cheers :D@@ProductivityforProgrammers
Thanks a lot for doing this Video! I found the link in the discussion section of the sshj Github project, while desperately looking for some kind of JavaDoc or anything going a bit beyond the "very rudimentary" examples available there... Your tutorial saved me many hours of trial & error. 👍 BTW: did you also take a look at the Apache Mina project? Still trying to make up my mind, whether Apache Mina or sshj would be the better choice for me...
I haven't looked at Apache Mina yet -- thanks for the pointer.
Looks like the creators copied YNAB4.
Thank you very much.
Hi there ;) I have a little question: Situation that you have many folders and many users to see this folders. I try with Match Group, and works.... but if you have other folder with the some user ...in my case only matchs the first line. Have any solution for this cases. thank you
Would you be able to share the relevant snippet of your config file
dd.html:121 Uncaught ReferenceError: jsPlumb is not defined at dd.html:121:3 im getting jsplumb not defined error while running your source code can u please help
Hello, did you solve your problem?
Try downloading jsplumb from here: github.com/jsplumb/jsplumb/tree/2.13.1/
I updated the gist to load jsplumb from a CDN, let me know if i it works for you.
i have used the same code given in the description, but i am not able to drag elements and connect them. can you help me why it is giving an error
I'll live stream on Sunday at 9am GMT. Drop by and I can take a closer look at your issue.
Moving this to 3pm GMT
I updated the gist to load jsplumb from a CDN, let me know if i it works for you.
Hi, I need some help. I have a Maven project and I need to upload files from my views (with html input fields). When I upload a file it only has 100 KB. I think this is a WinSCP configuration. Can you help me?
If I understand you correctly, the the file is getting truncated i.e it is actually larger than 100kb. I would check the size of the file at controller layer before it is uploaded to the SFTP server to determine whether it's getting truncated there or after the upload to the SFTP server.
@@ProductivityforProgrammers I already solved this problem. I saved the file into a temp folder and then send it trought sftp. It works fine.
Hi, thanks for this great tutorial. Can you prepare a new tutorial for a third option: Apache Commons VFS ??
Will livestream it
Hi I have been setting up an sftp server for the last 2 weeks and your video has really helped
Glad to be of help
thanks for the great video chief!
Thank you bro
is the Http Client only available for the Ultimate edition and not on community edition?
Unfortunately, yes, but there is a very similar plugin for VS code that has a similar syntax called 'REST Client' marketplace.visualstudio.com/items?itemName=humao.rest-client
That really helped a lot !!
Thank you! Please do subscribe if you haven’t.
Please keep doing these videos
Thank you! Please do subscribe and share this channel with your colleagues.
this is exactly what i needed. how easy is it to retrieve connections afterwards? i.e. click a button and have a report generated indicating where each connection is made...
Hello, if you’re referring to JSON export, I think that’s a feature of the commercial edition. Have a look at my video on ANTV X6 for a similar library that has this feature built in.
Thank you for reply. I'll check it out ☺️
Let me know if that isn’t what you were looking for
I'm interested in bpmn type of diagrams with vertical resizable lanes. Does x6 handle these kinds of scenarios? Thanks
Hello. Thanks for your question. There is a swimlane example on the ANTV X6 examples page. Hope that helps!
I figured it out
This is amazing. I’ll now follow the entire series
Thank you for the kind words. Let me know if there are any adjacent topics that you would like videos on and please subscribe if you haven’t already.
@@ProductivityforProgrammers Similar sessions on Kubernetes Jobs, Replication sets, PV, Ingress Controller, Gateways, VirtualService. There's a long list of things you can take up. If I can help either in preparation, evaluation, more than happy
Hi, great tutorial. How should this line of code from last part of tutorial: os.write("abcdef".getBytes(StandardCharsets.UTF_8); looks like if instead on single String we want to use strings from List<String> each should be in a separate line?
Hello thanks for watching the video! Yup, I would use a separate lines OR a loop OR stream().forEach().
Hi, how are you running Java in JupyterLab. How did you install the Java Kernel in Jupyterlab environment.
Hi! I used this kernel: github.com/SpencerPark/IJava However, there are some issues with getting some Java libraries to work when loaded using the "%maven" command so what I had to do was edit kernel.json to change the startup command for the JVM to include a directory containing all the JAR files that I wanted to use.
@@ProductivityforProgrammers Hi there, and thanks for your reply. So you I guess manually downloaded the JAR files you wanted and put them in a directory and edited the kernel.json file. Since I am using Anaconda, I guess would they be using the same file name as this kernel.json?
I am using Docker, will upload my scripts within this week for your reference.
pls any one help me how to access one user to more directory
I would look into tweaking or removing the ChrootDirectory. Let me know if that works for you.
Thanks for the great explainer video. I would like to understand the layers, for example if X6 can align the nodes of a graph using not the built-in layout, but some orthogonal layout (like plantuml).
Hi! If I understand you correctly, you want to be able to use a custom layout algorithm. I don't have a good answer for you at the moment but thank you so much for the question. Is the JS code for the layout algorithm that you would like to use open source? I can have a look and propose ways to integrate it.
very helpful video
Thank you! I'm glad to hear that.
Hi! I discovered that library some few months back.As you said is a pandas-like library for Java. I wanna see more videos about Tablesaw! Your explanation and demo are great! I didn't know to set up jupiter and Java. Thanks!!!
Thank you for the kind words. Glad that the video was useful to you.
11¹
Thank you. The last part with your own experience is especially valuable.
Thanks so much for the feedback.
What of the convert to PDf ? Please give me tutorial .. ;)
Thanks for the question. Try exporting to svg and then using svg2pdf on the server. Let me know if that works for you.
awesome one thanks for sharing
Thanks a ton. This tutorial was really helpful.
thanks a lot, looking for more tips
Let me know what kind of tips that you're looking for.
@@ProductivityforProgrammers is there a way to run SQL query and get visualization options notebooks, how we could incopirate jupyter notebooks and databases?
For advance use cases like this you probably want to look at Karate.
What a great explanation, thanks a lot! You saved me :) I did this installation step by step for the one of the Global company I do provide consultancy and I just want inform other colleagues these: If you get an "Connection Closed (WSARecv error in .ssh\logs file)" error message after 16:07 sftp username@localhost step; You can add OpenSSH folder path to the Environment Variables path section. - run sysdm.cpl via Run - At the Advanced tab Click Environment Variable - Edit the Path section and add your C:\Program Files\OpenSSH path as well via the Browse option, and try again, solved.
Thanks for sharing!
Hi, Thankyou so much for this informative video. It helps me a lot and I loved this video. But I need some more information about this topic
Hello, thank you very much for your feedback. Let me know what other information you need on this topic. I'll see whether I can help you out.
Can we add database connection into this to validate our response details??
I have to end to end validation with this so I need database validation also
I don't think it has this level of flexibility. You might want to look at Karate if you need something like that.
Great video ! The explanations are very clear.
Thank you, appreciate the feedback
would love to see the future video of the simple workflow engine. does that exist? this is most helpful thanks
Hello! The workflow engine doesn't exist yet but I will do videos on it when the time comes.
I just released another video on a similar library - ua-cam.com/video/EMtcA5z1fAg/v-deo.html
thank you for simple example
Thank you let me know if you would like any similar videos.
awesome work
Great video. Gonna have to give tables away a try soon,
Thank you, I'm trying to raise awareness of this library because it's one of those hidden gems.