Showing posts with label Mind map. Show all posts
Showing posts with label Mind map. Show all posts

Tuesday, June 28, 2022

SQL Always On Availability Group - Mind map

 As solutions or data architects we often needs to work with high availability and disaster recovery designs. If the technology stack includes SQL Server the latest feature its is offering is SQL Server Always On Availability Groups. This post introducing a simple mind map of the same.

The diagram used PlantUML based coded diagramming technique and we can easily get started. It is available in GitHub. Feel free to modify and initiate pull requests.

Tuesday, April 27, 2021

Azure @ Enterprise - Mind map of Azure Virtual Machines

Below is the mind map created as part of preparing for the AZ-303 exam.

This is created using PlantUML that helps us to code diagrams. Checked into the GitHub. PRs are welcome.

Tuesday, March 9, 2021

Mind map on SQL Server Performance

Below is the mind map. The mind map is not complete. These are some ideas I got while working closely in performance.
These are just pointers to quickly refer what are the things to check when someone reports SQL Server performance issues. Need to google for the details on how to really optimize the performance.

Feel free to click on it and explore. Below is the link to GitHub. Feel free to issue pull requests if there are important things missing.


Tuesday, July 21, 2020

[Video] Before debugging code, see this Mind map

We all debug our issues as well as other issues. Here is one mind map before we jump into debugging other's problems. At least that will help us organize and make sure our tasks are not impacted by helping others.

It uses PlantUML to write diagrams. There is a separate video on how to setup PlantUML in our environment.
Add your suggestions, questions in the video comment box.

Tuesday, March 31, 2020

Mind map - front end browser application development

Another mind map? Yes, that too about the web development. Not sure this will help anyone as there are a lot of mind maps if we google for frontend development mind map or mind map of front end browser app development. But most of those are not up to our convenience. For example with the advent of Webpack, we may safely avoid older module systems and task runners. 
In short, need is my own mind map which may not be useful to others as the existing mind maps are not satisfying me.

PlantUML based coded mind map on front end browser development

Below is the PlantUML based coded mind map on front end web browser development.

Please click on the image to get clickable svg format

Other mind maps

Tuesday, December 10, 2019

Networking for developers - Mind map of tools and commands

This can be considered as the second part of a previous post on Networking for .Net Web Developers. The textual version of tools and commands is not that intuitive to use. Here we have a mindmap of networking concepts, tools, and commands for debugging basic networking related issues.

Click on the image to see the SVG version of the same. SVG supports clicking hyperlinks.

An interesting thing here is that this diagram is also created using PlantUML and kept in GitHub. URL below.

https://github.com/mind-maps/software/blob/master/debugging/windows-network-debugging.puml
Feel free to issue a PR, in case of suggestions and additions.

How to set up an environment for editing PlantUML can be found here.

Tuesday, October 22, 2019

Azure @ Enterprise - Microsoft Identity Platform OAuth Mind map

Security is always tough for developers. They know how to make the app work in their machine. But clueless about how it has to work in real production with the highest security possible. It becomes more difficult when they need to understand protocols and implementation details of standards such as OAuth, Microsoft Identity Platform, etc...

I am not an exception from the above-said developer group. Learned the Azure AD and its mechanism the hard way and finally decided to make a mind map out of the knowledge. 

It is attached below. Click on the image to open SVG version to click on the links.

Since it uses a textual drawing tool called Plant UML, the source code is available. It is present in GitHub. As we all know Azure is evolving very rapidly. Any changes are welcome in the form of a pull request.


More mind maps

Tuesday, July 30, 2019

Angular + ASP.Net WebAPI Application Performance Optimization - Index and Mind map

This is an index of things which needs to be checked, for performance optimization of a simple ASP.Net + Angular application. The simple application refers to application which read and write to SQL Server. If the application uses some other data store, still the points about other aspects are valid.

The details of each item would be either a link to posts in this blog or link to other resources. If someone is struggling to find where to start or struck on an optimization exercise,hope these questions will light a bulb in their brain. Sorry to say that it is very difficult to find an algorithm which applies every performance optimizations.

Browser side

  • Do we need to support desktop and mobile browsers?
  • Any possibility to avoid Internet Explorer and support only modern browsers:)
  • Do we have separate mobile site with URL or same site is controlled via bootstrap or similar display technique
  • Static assets
    • Are those cached? If not can we cache?
    • If those are cached what is the cache expiry?
    • If those are cached how its done? cache-control or Expires header? Is the cache really working?
    • Is the server properly returning http 304?
    • Are they minified and bundled?
    • Are the images optimized to have small foot print? 
    • Are they served from CDN?
  • Angular best practices applied?
  • If it is AngularJS, what is the feasibility to upgrade to Angular

The network

DNS and routing

  • Hows the DNS resolved to IP?
  • Is the application available public or accessed only via enterprise intranet?
  • What is the network connection band width between clients and server? also between web servers and database server(s)

Network devices

  • CDN
    • Any option for warming up cache?
  • Security / Application Gateways which open packets and scan for attacks.
    • What is the time needed for security inspections? Is it fast, if we bye pass gateway for testing?
  • Network load-balancer
    • Do we have load balancer? Are we reached the height of optimization and need scale out or scale up? In Azure, the best practice is to use LB as the machines gets patches and restarts periodically. Also follow the best practices to group machines so that all of those will not be restarted same time.
    • What is the algorithm used for load balancing?
    • Do we have sticky session need?
  • Common
    • Do we have logs available from these devices?
    • Are the logs enough to confirm that the backing web server is taking time to respond?

Web Server machine

  • Does the requirement of project is practical to the server? eg: One quad core, 8GB VM may never support 100,000 concurrent users even if its a simple company static web site
  • Is the machine / hosting infrastructure in Azure or any cloud? If so do all the best practices followed and coded by considering cloud principles such as retry pattern?
  • What is the status of CPU, Memory, Network etc.. during load test or busy hour?

IIS

  • Logging
    • Does the logging (time-taken field) says requests are taking high time? Please note that that time includes server processing + data transfer
    • Are we logging any custom field which are big in size?
    • Are the extra logging such as failed request tracking enabled?
    • During a load test of busy session
      • If we go to IIS worker process screen are we able to see many requests pending?
      • What is the http queue length performance counter shows ?
      • Are we able to identify one or sub set of requests taking high chunk of processing time other than rest of requests? This can be done by analyzing IIS logs.
  • Static assets - Kind of repetition from previous section. 
    • Are they cached properly?
    • Are we using ASP.Net Bundling or compile time bundled? Are they served in minimized form
    • Can we increase cache expiry?
  • Protocols
    • Any possibility to leverage http/2, if not done?
    • Is it using web sockets?
  • Authentication
    • Is it using windows authentication? If so NTML or Kerberos? Kerberos is recommended for better performance
  • AppPool Recycling 
    • What is the AppPool recycling settings? 
    • Is the recycling causing delay?
    • Any ways to run mock requests so that the cache is populated before real user hit application?
  • Throttling / Limiting
    • What is the MaxConnection Setting and other IIS level throttling?
    • Are there any performance counter showing connections getting queued and rejected?
  • Timeouts
    • Is there any manual test and load test attempted by reducing the timeouts to lowest possible settings? Some times high timeouts cause some requests to occupy entire system resources
  • Payload
    • Does the http compression enabled

ASP.Net Application

ASP.Net pipeline till our code

  • What are the throttling settings at different level?
  • Are there any custom HttpModules which may reduce performance? Any unwanted modules?

Our code

  • Are there anything which can be cached instead of going every time to database? eg: any reference tables which change only by deployment.
  • Are there any retries happening and succeeding after lot of attempts? Try reducing retry count to 3.
  • Are there static variable usage and any potential for lock contention and memory leaks?
  • Are the locks applied to lowest possible code section?
  • JSON optimization
    • Can the property names be shortened?
    • Are the default values serialized into JSON?
  • Are we doing any HTML rendering at server and returning as JSON property? Any possibility to make application as pure client rendered SPA?
  • Do we have high amount of reflection?

.Net General

  • Are there high amount of GC collections? This can be found from analyzing performance counters?
  • What is the fragmentation level in LOH?
  • Can we do NGEN?
  • Any memory leaks in the application? eg: open connections, unwanted static things which may hold objects?

Database

  • Does the applications logs showing that the queries are taking time?
  • Does the SQL setup with possible best practices? eg: temp db, flags, connection limiting etc...
  • Are there any subset of SPs always slow?

Mind map

Finally, there is a mind map created using PlantUML for easy reference. Since this is kept textual in GitHub and rendered on demand, this would be living document than the post.

Details on how to get PlantUML working is available in different post including a YouTube video tutorial.

Other similar links

Tuesday, June 18, 2019

PlantUML - Code, Generate and Publish Mind-maps from GitPages

Introduction

This post mainly aims to provide an idea how we can use PlantUML to create mind maps and host them from GitPages without spending anything. It obviously need a computing device with browser and internet connection.

PlantUML

No need to have introduction again, as there were posts written earlier on the same. Just to summarize
  • It is a textual representation of diagrams.
  • Helps to version and compare changes applied.
  • Can render in different visual formats from the same textual definitions.

Mind maps

It is diagramming model where information about one concept is represented in relation with other related topics. More on Wiki.

Coding Mind maps

The setup explained in previous post is enough for coding mind maps. PlantUML supports mind maps out of the box in latest versions as beta.

Rendering diagram

Though the ideal way to publish into web is HTML, there seems some issues in generating HTML files out of the box. So better get it into image formats and embed into HTML using <img> tag. 

If we are using our machines during development, it is easy to have control over the environment and install GraphViz and Java runtime needed for PlantUML. Now a days everybody uses continuous integration and delivery method. The CI/CD environments with full control mostly require fees and here we are trying to achieve without any cost. Let is see how to get the diagrams published in free?

One way is to use containers where entire ecosystem would be present and use it in CI/CD environment. Another way which we are going to see is via proxy service of PlantUML

Using the proxy service is very simple. The official www.plantuml.com site has a service hosted in below url

http://www.plantuml.com/plantuml/proxy?src=<accessible URL to the plantuml file>

This src query string pair accepts a source url where the PlantUML code file is present and returns converted image representation.

eg:The below URL gives the png file corresponds to the PlantUML file located at the path mentioned in src query string parameter
http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/mind-maps/software/master/debugging/before-debugging-others-problem.puml

More details on controlling the behavior can be found in this post.

The moment we got the png back via an URL, we can easily publish using html files. No need to have CI/CD systems and dealing with containers or build environments.

Publishing

GitPages provides free sub domain based web site hosting free and we can host mind maps directly from the GitHub repository. Using the markdown, we can easily convert the above mentioned url into an link <a> or <img> tag.

eg:A link in markdown file (.md) can be denoted as below

[Debugging](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/mind-maps/software/master/debugging/before-debugging-others-problem.puml)

Sample repo

Source repo which hosts the puml files & hosting .md files - https://github.com/mind-maps/software
Sub domain & URL based web site which GitPages gives for repo- https://mind-maps.github.io/software/

The .md files gets automatically converted into HTML and served. If there is index.md it would be taken as default when we didn't mention anything in the url. GitPages internally uses Jekyll and customization can be done. One such customization in the above repo is in below URL. Since Jekyll and customization is not in the scope of this post, please google for more details.

Below are not essential but just to give complete picture
Sub domain based organization URL - https://mind-maps.github.io/
Repo of organization web site - https://github.com/mind-maps/mind-maps.github.io

Enjoy documenting...

Tuesday, May 7, 2019

Node-PlantUML package to automate generation of mind map diagrams

Recently I was doing some experiments with PlantUML. PlantUML is awesome. Write code and get diagrams. It is especially great tool for engineers like me who are not that good at art. One of the main trend now a days is to automate anything and obviously we can automate diagram generation from puml file. The technology to do is obviously NodeJS.

Package to generate images from .puml files

As normal in Node world, NodeJS has a package to convert puml files into images and much more. Below is the link to the NPN package.
https://www.npmjs.com/package/node-plantuml

From here, this post assumes the reader has knowledge about NodeJS and its NPM package ecosystem.

A simple problem

If there is no problem this post is not needed. The node-plantuml package generated the diagrams for most for the puml files. But not for the mind map pumls. ie which are starting with @startmindmap.

@startmindmap
* root
** 1
**_ 3
@endmindmap

Root cause

The node-plantuml uses plantuml.jar file to bundle with it is not the latest. That jar file don't have the capability to understand @startmindmap. So it fails.

Solution

node-platuml package to include the latest plantuml.jar file. As a responsible developer, who make use of other's open source work, I should give them a PR which I will be doing soon.

Workarounds

Set the path of plantuml.jar

As any other developer, the developers of this package also left option for configuring the path to jar file. They selected the environment variable mechanism to set the path. The name of environment variable is PLANTUML_HOME. If the environment variable is not there, it will take jar file from vendor folder. Below line is from the node-plant package source code.

The code to set the environment variable to a different .jar file is as follows. If we obtain the latest plantuml.jar file, we can place it somewhere and point to the same.

process.env.PLANTUML_HOME = "node_modules/node-plantuml/vendor/plantuml_new.jar";

If there are any troubles setting the path, try the below approach.

Replace old file with new

Get the latest plantuml.jar file from VS code extension called PlantUML. The location of the platuml.jar file is below.

%userprofile%\.vscode\extensions\jebbs.plantuml-2.10.9

Put the file into the node-plantuml modules folder. Location below.

..\node_modules\node-plantuml\vendor

Tuesday, May 30, 2017

Toolbox for open source developers

It is the era of SaaS and its byproduct freemium licensing model. Simply saying, so many tools and services are there for free to help software engineering. There are a lot of lists published which aggregates these free tools and services for software development. This is my version of the same which index all the software tools and services which I know, use and recommend.

There is a thought process going on about moving this to GitHub where it is easy to manage. No plans to merge with other public lists as one of the aim is to index what I used, not all those are out in the wild internet. Let google do it.

Design & Development

Project management

CheatSheets

https://dzone.com/refcardz
http://www.cheat-sheets.org/
https://www.cheatography.com/

Wireframe & diagramming

Coding

Visual Studio Code
Eclipse
Notepad++

Explore public APIs

https://www.programmableweb.com/
https://any-api.com/
https://apis.guru/browse-apis/
http://www.apiforthat.com/

Source control

Github
VisualStudio.com

Continuous integration

AppVeyor
TravisCI
https://www.netlify.com/pricing/

Load testing

https://dev.azure.com or Azure DevOps

Runtime

Hosting - Static site

GitHub pages

Hosting - Server side execution

Webtask.io
flaw.microsoft.com

Hosted Log management (Yet to finalize best one)

https://www.sumologic.com/pricing/
http://www.muscula.com/prices/
https://papertrailapp.com/plans
https://sentry.io/pricing/
https://www.loggly.com/plans-and-pricing/
https://rollbar.com/pricing/
https://www.bugsnag.com/pricing/
https://github.com/cheeaun/javascript-error-logging

eMail

SMS

In progress...

Sites to search for software and compare

https://www.getapp.com/
https://www.slant.co/

Make money

Algorithmia.com
https://www.chargebee.com/ - For SaaS billing.(Yet to try)

Other indexes like this

https://news.ycombinator.com/item?id=8874227
https://github.com/ripienaar/free-for-dev

The title says tools for open source developers. That's just a catchy title. Most of these tools and services are available to closed source and enterprise.

Enjoy the tools...

Update

2020-06-17
Updating this text-based blog post is difficult so moved to GitHub using PlantUML. The new format is a mind map. Below is the rendered Mind map. Since it is in GitHub, anyone can reuse, issue pull request, etc..
Click on the image to get the SVG format where the links are active. Editing PlantUML diagrams is easy with Visual Studio Code. This is a link to video explaining how to setup PlantUML