Posted on Leave a comment

Highlights from conference on Azure api management

Conference Azure Api Management
Azure api management – slides looked quite big compared to my laptop screen

Recently I had a chance to speak at a conference at Dynabyte. I thought I would present on something that I was working in at that time. I work as an integrations consultant. However I had arrived in the integration scenario quite late, with a long backgound working in writing code mostly in .net as a backend developer.

Come to think about it, developers are in a way working with integration in a more lets say non-direct way. Certainly they wouldn’t use a middleware platform and prefer to write everything by code. If needed something there would always be some package repositories that are available.

However with the arrival of cloud in the picture everything started changing. After a slow adapatation many businesses have turned their focus into digital transformation. With that integration and development have merged together. Cloud providers enable developers and integration people to work in both cofiguration and code with either design first or code first options.

Recently been working with Api management in Azure cloud. . API economy is growing rapidly during the past decade. API management allows as the name suggests managing apis. Its an easy way to provide additional services to an api so that it can be used at its maximum potential and with cross-cutting concerns. Its a central part of enabling for example IoT where various devices would require to communicate with each other.

I highlighted the aspects of API management in this case Azure for allowing developers to quickly publish their api to their consumers. This would shorten time to market and allows to reach a wider audience for the api rapidly. Along with that there would be some performance requirements or security requirements. That’s where the api management would come into picture.

Posted on Leave a comment

Create a scheduled task fetch files from SFTP in Biztalk

Highlights – Biztalk 2013, Biztalk Scheduled Task Adapter, Visual Studio, IIS, C# WCF Service with WinSCP Nuget package

Recently I had a request for a Biztalk solution that gets files from a SFTP folder and process in a Biztalk receive location. It was easy just create a SFTP receive location. However here is a twist. The files can only be picked up once a week. Problem was that the receive location picked up files as soon as it landed there.

The solution was obvious a scheduled task was required. My first thought was to create a C# script and run it on a task scheduler that would pick the files from the SFTP and place it on the receive folder location for Biztalk. But then if that possiblity exists in Biztalk why not use it. The latest version of Biztalk as of now is 2020 which has that functionality. However I was using 2013.

There is a way to do this in Biztalk 2013, by using the scheduled task adapter in Biztalk. Then pass that call to the send port that calls a WCF service that uses an SFTP client like WinSCP. The source code are provided in the bottom of this tutorial.

Here I describe the steps to complete that task.

ReceivePort –> ReceiveLocation runs on schedule–> SendPort –> WCFService –> WinSCP–>Transfer files to another receive location

I created a schema in biztalk for the purpose. This is to associate the XML in the receive location to the Send Port

Create a receive location and a scheduled transport type. From the drop-down in the type select the schedule adapter. If you have not the schedule transport type, you would need to download and add Biztalk Scheduled Task Adapter and install it. I have version 5.0.

In the properties section, go to Task tab and find the task

In the task section choose the TaskComponents.dll. We want to create a

From there use the XML string provider, because we want to send an XML to the Send Port in the later scenario.

In the XML string toolbox we create a simple xml string like the following, remember the namespace. We require this in the send port and WCF applciation.

<?xml version="1.0"?>
<ns0:Call xmlns:ns0="http://NirjalBiztalkApp.CallSFTP"/>

To run the task on a schedule, on the schedule tab. Configure how often you want the scheduler to run. This for example will run every 15 seconds.

Next we go ahead and create the C# WCF service in Visual Studio. Later we are going to create a send port that calls this WCF service.

Next have download WinSCP nuget package to get files from SFTP.

After installation and setting up publish the WCF service or run it and browse to the .svc address.

Now we copy the soapAction from the wsdl file. This will be later used in the Send Port.

Now create a send port that associates to the receive port created earlier. In the filter section, for example I used the ReceivePortName. Other properties can also be used.

In the send port find the WCF-Custom binding for type, binding I created a HTTP binding. Provide the address to the WCF service in the Address for the SOAP action. Provide the SOAP action copied earlier from the wsdl.

Start the Biztalk application and see what happens. If everything goes as planned the application will run every 15 seconds and call the WCF service. Thats all to it. If you like the source files to the project I have provided them in GitHub Feel free to use it and let me know if you have any comments.

https://github.com/coolnk/BizalkWCFScheduler

Posted on Leave a comment

Less stressful and easier way of learning or starting something new

There have been times in my life when I wanted to learn new things. I used to read a lot of books, watched a lot of training videos. I was recently watching some content on video editing, starting an online business and the list goes on. Sometimes I get these ads about apps for reading fifty books in a month. I click on subscribe after a month later reading, listening to audio versions, although I did find the articles interesting but eventually resulting in overloading them in my head.
I realized this after my journey trying to learn a new skill like film-making. I was looking out for the best affordable equipment. I was watching videos on youtube and reading reviews. Certainly I got more information on them but that information came with a price. Some nights I got hooked watching videos on how to make a good film one after the other, resulting in sleepless nights. I was also not implementing them in my life. If I ask myself what did I learn, the answer was nothing and I lost my sleep, became tired the next day. I would have rather got more out of taking a camera an recording some videos and learning through trial and error.
It may sound ironical when I say stop reading books or watch videos to learn something. There are many gold nuggets in those books but certainly I would go nowhere by just reading them one after the other. After a while the brain become completely a feeder and was lazy to do something about it or take action. I think that I should have produced more than feed. Realized that how I learn more was by writing more than reading. Somehow the mind gets to work to digest the information. So I swithched completely from 80% reading and 20% writing to 80% writing and 20% reading.
One of the advantages I noticed after writing was that my language improved quite significantly. It has been years living in Sweden and I still struggle with the language. As an adult I was learning the language logically and realized that it was an ineffective approach. I was reading newspapers every morning, watching movies and much more. However I was not improving, Instead I started recording myself, writing and talking to people. I realized after this practice even though I spend less time than reading. I noticed a lot of improvements in my language.
I feel that this has something to do with the subconscious mind. I read a book once called Thinking Fast and Thinking Slow by Daniel Kohneman and another book Blink by Malcolm Gladwell. A common theme I found in these books was the references to the fast mind or the subconscious mind. I realized that if I wanted to learn something I would have to stop thinking, give up the ambition to become a pefectionist and expect that it would come through time after practice. Before, in learning, I realized that I was more stressing toward the inefficient logical brain that wanted everything in steps and not take a step before knowing it all. Instead, I then started to allow my fast brain to process information with trial and error, and this became much better. I was now thinking less and producing more. I reazied that I get new ideas more if one thing or the other didn’t work perhaps there were more connections happening in the neurons. These new ideas, I quickly note them in a Trello board.
I now write quite often. On the train from my home to work, I have about 45 minutes on the train. I take out my mobile and start writing. I write freely, lets words come up. Sometimes I write about a movie that I watched and what I found interesting. Somedays I write about how tired I was feeling at the moment. At least something so that I have my mind empty.
Posted on Leave a comment

Finding a needle in a haystack

Documents, archives, what happened to them, must have caught fire. No actually it’s there in the digital world. One day I get an application built by someone. Why is it assigned to me? Because the application name sounds kind of similar to what I have been working with. Yeah right.

Should have said no, but I love ym these challenges, so I start digging in the stuff absolutely no idea what I’m dealing with. Something is obviously failing otherwise nobody would have complained its broken. One thing that starts the warning indicator blinking is when I check the repository and the solution was last checked in by someone few years back and the person is no longer working. Oh yeah I see where this is going.

Sometimes I would want to use my logical brain and try to dig in step by step. But sometimes deadlines are a coffeebreak away what do I do then ? Ask around get it fixed, surprisingly thats way faster. It’s just about swallow your ego of being the expert and ask around investigating like Sherlock Holmes even if you don’t really understand it completely. I mean how time would you want to spend on fixing a legacy project when a flashy new project is going to scrap it out from the face of the earth.

Besides someone else already have had that headache before, like one time.

Posted on Leave a comment

Are you copying my moves, AI and future of automation

I was talking to my colleague earlier today. Whenever an issue comes up I go over to him or someone in devops team. ‘Hi, can you have a look over in the production environment and check…’. I go there quite often an honestly I feel I bother them too much. They have a lot of systems it takes a while for them to grey out the thing. I ask him, why can’t you automate some of the activities you are doing.

Well you could do it. Maybe write down a python script or some software to do it. Or there was something called Robotic Process Automation.

What’s the challeging part? Writing down the code is labor intensive and screen recording like some RPA providers claim are just hits and misses. Well we want it to work 100 percent of the time…hypothetically it would, a dream come true.

Recently I was quite interested in IOT -Internet of Things after every device imaginable is connected to the internet sending data all the time. Anyway what do you do you with all that gold mine or maybe is it a garbage. These data can be used to do some kind of analytics. Or gets more interesting when using AI to learn something cool from the data.

I stumbled across this video.

https://youtu.be/XbDmxEOj9OY

AI is winning over the champions by self training in Dota. A game I used play a lot. Towards the end there was a virtual reality used to train a robot.

Hmmm, that’s wonderful because now you can literally train a robot by imitation. Can you code for me as well AI. Not there yet. That’s huge because they means instead of programming a robot hand shake your hand you can train it in virtual reality and it can train on itself using trial and errors. Just like how kids learn. Can you imagine writing down an instruction manual on how to play football handing it to your kid. Just give her the ball and out in the field.

But why do that with AI. Not anymore.

Posted on Leave a comment

Sunny saturday some thoughts

Tree near my station

Its been a while since promises of warm weather since this May. I can’t seem to leave my thick autumn jacket. There was periods when it was warm then suddenly it becomes cold again. The sun is usually there but the wind makes it colder. Once when I was working at my office I looked outside and it was snowing. I was surprised.

Tree near my station

Some young trees near my station are still growing. maybe next year

Today it was sunny. I was up early this Saturday at around 6:30. Since I stopped going out for late night parties and clubbing I started to have more fresh weekends. Its so much good to be able to wake up early to sunrise, then to return late tired after the party and sleep almost half the day.

Anyway I love the walk in the morning. I felt very good, listening to music and the sun. I felt good vibes. I took out my camera and took some photos of the station close to my home. Today I was heading to the office because they was a event for kids when they could come and start some coding.

On the train station I was waiting for the train. I noticed some wild flowers growing on the train tracks. I like it. It got me thinking, admiring. There is train running on the tracks, could easily wipe these flowers clean. But they managed to survive. Not just survive but flourish. It became a symbol for me of life, of hussle. Was not like the flowers planted by the gardeners in pots placed at different places. But these flowers were a symbol of beauty of nature of survival.

Recently I am having peace in my mind. I started letting go, stopped trying to take control of everything that has happened. I think more than happiness I would like to have peace. I stopped making assumptions stated looking at my life situaiton in the moments, when made me realize how greatful I am for what I have been blessed with. “You don’t really know, what’s going on in other people’s lives so stop making assumptions”, one of my friend said to me once. That I believe is true. There can’t be any situation that can’t be dealt with. There is alway a solution always a choice. Always a chance to let it go and release.

By the way I also took my camera out. It had been sitting and eating dust in my cupboard. I took some shots last night. I noticed an add for photography challenge called gurushots.com. I have uploaded some of my photos there. The following photo got a like and some votes.

https://gurushots.com/nirjal.khadka/photos

Posted on 1 Comment

Strolling in the park near my home

I live in an beautiful place close to the beach and nature. It’s about 35 mins by train from the city. Now since the weather is getting warmer I took a short walk to the place. The was sun was nice and warm with slightly cool breeze.

 

Here are some photos I took with my a Nikon D600 and Nikkor F1.4G 50mm lens.

 

Posted on Leave a comment

DynaTrip @ Nordland

Härligt äventyr på Lofoten kommer närmare till en slut. Om några timmar kommer vi framme till flygplatsen. Först till Oslo den till Stockholm. 

Norges fina berg samling, sjöar och vattendrag omgivna av små lugna berg ger mig glädje. För en stund glömmer jag bort alla mina bekymmer och jag mig som en väldigt liten del av det stora. 

Efter en kort stund stannar bussen. Trodde att det går nåt fel.  Nej men det var en utsiktspunkt. 
Ser jag några trä trappor och följer efter gänget börjar det synas en vacker sjö några båtar en liten by och små berg.  Gick egna fram till slutpunkten, stod på några små stenar som vart höjdpunkt för att kunna se runt omkring.  Ò vilken utsikt man får inte nog av det. Man skulle gärna bo här men kanske inte under vintern 🤣

From the top of the hill, I could see the view over the close village

Trying out the camera at home