Programming Applications and Frameworks - Blog

Friday, 22 February 2019

Industry Practices And Tools - Part 1

Version Control Systems


  • Version control systems are a category of software tools that help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members.
  • For almost all software projects, the source code is like the crown jewels - a precious asset whose value must be protected. For most software teams, the source code is a repository of the invaluable knowledge and understanding about the problem domain that the developers have collected and refined through careful effort. Version control protects source code from both catastrophe and the casual degradation of human error and unintended consequences.
  • Software developers working in teams are continually writing new source code and changing existing source code. The code for a project, app or software component is typically organized in a folder structure or "file tree". One developer on the team may be working on a new feature while another developer fixes an unrelated bug by changing code, each developer may make their changes in several parts of the file tree.
  • Version control helps teams solve these kinds of problems, tracking every individual change by each contributor and helping prevent concurrent work from conflicting. Changes made in one part of the software can be incompatible with those made by another developer working at the same time. This problem should be discovered and solved in an orderly manner without blocking the work of the rest of the team. Further, in all software development, any change can introduce new bugs on its own and new software can't be trusted until it's tested. So testing and development proceed together until a new version is ready.
  • Git , Apache Subversion , Perforce , Mercurial , GNU Bazaar are some well known version control systems. 


Version Controlling Models

Local Version Control Systems


  • Local version control system maintains track of files within the local system. This approach is very common and simple. This type is also error prone which means the chances of accidentally writing to the wrong file is higher.
  • In this version , we can copy files and dated directories because this is revision control system.
  • Also we can save series of patches in a local version control system.
  • But the disadvantage in here is , this system is very difficult to collaborate.
  • As well as , the branching is almost impossible in this systems.

Centralized Version Control Systems

  • In this approach, all the changes in the files are tracked under the centralized server. The centralized server includes all the information of versioned files, and list of clients that check out files from that central place.
  • Some advantages in these kind of systems are performing actions other than pushing and pulling change-sets is extremely fast because the tool only needs to access the hard drive, not a remote server , committing new change-sets can be done locally without anyone else seeing them. Once you have a group of change-sets ready, you can push all of them at once and since each programmer has a full copy of the project repository, they can share changes with one or two other people at a time if they want to get some feedback before showing the changes to everyone.
  • Some disadvantages in these kind of systems are if your project contains many large, binary files that cannot be easily compressed, the space needed to store all versions of these files can accumulate quickly and if your project has a very long history (50,000 change-sets or more), downloading the entire history can take an impractical amount of time and disk space.

Distributed Version Control Systems

  • Distributed version control systems come into picture to overcome the drawback of centralized version control system. The clients completely clone the repository including its full history. If any server dies, any of the client repositories can be copied on to the server which help restore the server.
  • Some advantages in these kind of systems are performance of distributed systems is better, because there is no waiting for locks to happen across potentially slow network connections , branching and merging is much easier to achieve in a distributed system, largely because it’s built in to the way the system works and with a distributed system, you don’t need to be connected to the network all the time.
  • A disadvantage of this system is Initial checkout of a repository is slower as compared to checkout in a centralized version control system , because all branches and revision history are copied  to the local machine by default. 

GIT

  • Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion , CVS , Perforce , and ClearCase with features like cheap local branching , convenient staging areas and multiple workflows.


GitHub

  • GitHub Inc. is a web-based hosting service for version control using Git. It is mostly used for computer code. It offers all of the distributed version control and source code management functionality of Git as well as adding its own features.
  • It provides access control and several collaboration features such as bug tracking , feature requests , task management and wikis for every project.

GIT IS NOT GITHUB!!! We will see some differences...





Git GitHub

  • Installed locally


  • Hosted in the cloud


  • First released in 2005


  • Company launched in 2008


  • Maintained by the Linux foundation


  • Purchased in 2018 by Microsoft


  • Focused on version controlling and code sharing


  • Focused on centralized source code hosting


  • Primarily a command line tool


  • Administered thorough the web


  • Provides a desktop interface named Git gui


  • Desktop interface named GitHub desktop


  • No user management features


  • Built-in user management


  • Open source licensed


  • Includes a free tier and pay for use tiers

Git Commands - Commit

  • The "commit" command is used to save your changes to the local repository. Note that you have to explicitly tell Git which changes we want to include in a commit before running the "git commit" command. This means that a file won't be automatically included in the next commit just because it was changed. Instead, you need to use the "git add" command to mark the desired changes for inclusion. 
  • Also note that in Git , a commit is not automatically transferred to the remote server. Using the "git commit" command only saves a new commit object in the local Git repository. Exchanging commits has to be performed manually and explicitly. 

Git Commands - Push

  • The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It is the counterpart to git fetch , but whereas fetching imports commits to local branches , pushing exports commits to remote branch. Remote branches are configured using the git remote command. Pushing has the potential to overwrite changes ,caution should be taken when pushing.
  • git push is most commonly used to publish an upload local changes to a central repository. After a local repository has been modified a push is executed to share the modifications with remote team members.

Commit Push

  • Records changes to the repository


  • Update remote references along with the associated objects


  • Commits the files that is staged in the local repo


  • Fast-forwards merge the master branch of local side with the remote master branch

Git Staging Area

  • Imagine a box. You can put stuff into the box. You can take stuff out of the box. This box is the staging area of Git. You can craft commits here. Committing is like sealing that box and sticking a label on it. The contents of that box are your changes. So, why not have the label mean something? You wouldn’t label a moving box with kitchen items as simply “stuff.”
  • As you make changes locally, Git can "see" them. However, figuratively speaking, they're out of the box. If you were to try and make a commit at this point, Git wouldn't have anything to commit.
  • Staging helps to split up one large change into multiple commits.
  • It helps to review the changes.
  • As well as the staging helps when a merge has conflicts and helps to keep extra local files hanging around.
  • Staging helps to sneak in small changes.


Git Directory

  • Git directory that is a bare repository that is typically used for exchanging histories with others by pushing into it and fetching from it. 

Collaboration Workflow of Git


  • In terms of Git process, collaboration is often about branching workflows. Thinking ahead on how you will intertwine commit trees will help you minimize integration bugs and support your release management strategy.


Integration Branch

  •  Use an integration branch with software development teams who work towards deploying a collection of contributions into production as a single entity. This is opposed to teams that focus on deploying features individually. Often teams may want to be doing the latter but practical limitations impose a process that groups their efforts ,  and the team ends up doing the former , so be sure to review your actual Git usage to see if you would benefit from using this type of collaboration pattern.
  • This workflow pattern is a useful staging point for when the risk of integrating multiple branches is high enough to warrant testing the combined contributions as a whole.

Topic Branch

  • Teams will want to use topic branches if it is important to keep their commit trees in a state that can be easily read or have individual features reverted. Topic branches signify that the commits maybe overwritten to clean up their structure and be shrunk down to a feature commit.
  • Topic branches are often owned by and individual contributor but can also be a designated space for a team to develop a feature upon. Other contributors know that this type of branch could have its commit tree re-written at any moment , and should not try to keep their local branches synchronized with it.
Another Git workflow example is known as “topic branches.”

Fork

  • The fork empowers the repository maintainers with an enforced gateway over pushing directly to an origin repository branch , but more importantly it facilitates collaboration.
  • The fork workflow pattern gives teams their own space to work in whatever way they are used to with a single integration point between the two repositories. Over communicating is imperative within the pull request description. The teams have had separate communication streams before a pull request has been issued , and highlighting the decisions that have already made will speed up the review process.
  • Of course one benefit of the fork workflow is that you can direct comments to contributors of the origin repository , as the permission cascade downwards. From the point of view of the origin repository , you have the control to delete forks when they are no longer needed.
The fork facilitates collaboration in your software development team’s Git workflow.

Clone

  • Using a clone of the project's repository lays out an isolated training and communication ground for the outsourced team to manage their contributions , enforce policies and take advantage of knowledge sharing. Once a contribution is deemed up to standard and ready for the main repository it can be pushed to one of the origin repositories remote branches and integrated as usual.
  • Some projects have high expectations for following their coding conventions and defined Git workflow standards to contribute to their repository. It can be daunting working in this environment until you have learnt the ropes , so work together as a team to optimize both parties' time.
The clone Git workflow has multiple seats on a project that co-contribute.


CDN

  • A Content Delivery Network(CDN) is an interconnected system of computers on the internet that provides web content rapidly to numerous users by duplicating or caching the content on multiple servers and directing the content to users on proximity. The goal of a CDN is to serve content to end-users with high availability and high performance. CDNs serve a large fraction of the Internet content today, including web objects (text, graphics, and scripts), downloadable objects (media files, software, documents), applications (e-commerce, portals), real-time , streaming data, on-demand streaming media, and social networks. When an end-user requests a specific web page, video or file, the server closest to that user is dynamically determined and is used to deliver the content to that user, thereby increasing the speed of delivery. Content may be replicated on hundreds or thousands of servers in order to provide identical content to as many users as possible even during peak usage.
Content Delivery Network

Benefits Of CDN


  • Companies that witness a huge traffic on their website on daily basis can use CDN to their advantage. When a large number of users simultaneously access a web page on some specific content such as a video, a CDN enables that content to be sent to each of them without delay. Here are few of the benefits of using a CDN for your website:


  • Your reliability and response times get a huge boost
High performing website equals high conversion and growing sales. Latency and speed issues tend to cripple web businesses and cause damage. A few seconds can mean the difference between a successful conversion or a bounce. A reliable CDN ensures that the load speed is more than optimal and that online transactions are made seamlessly.


  • A CDN enables global reach
Over one third of the world’s population is online, which means that the global use of the internet has increased exponentially over the last 15 years. CDNs provide solutions through cloud acceleration with local POPs. This global reach will eliminate any latency problems that interrupt long-distance online transactions and cause slow load times.

  • A CDN saves lots of money
Hiring a CDN results in noticeable savings for a business; rather than investing in an infrastructure and separate service providers all across the globe, a global CDN can eliminate the need to pay for costly foreign hosting and thus, save your business a lot of money. A global CDN offers a single platform to handle all of the separate operations, working across numerous regions for a reasonable price. CDNs are also recommended for companies with a tight budget.

  • 100% availability
Due to the distribution of assets across many regions, CDNs have automatic server availability sensing mechanisms with instant user redirection. As a result, CDN websites experience 100 percent availability, even during massive power outages, hardware issues or network problems.

  • Decrease server load
The strategic placement of a CDN can decrease the server load on interconnects, public and private peers and backbones, freeing up the overall capacity and decreasing delivery costs. Essentially, the content is spread out across several servers, as opposed to offloading  them onto one large server.

  • 24/7 customer support
Quality CDNs have been known for outstanding customer support. In other words, there is a CS team standby at all time, at your disposal. Whenever something occurs, you have  backup that’s waiting to help you fix your performance related problems. Having a support team on quick dial is a smart business decision – you’re not just paying for a cloud service, you’re paying for a large spectre of services that help your business grow on a global scale.

  • Increase in the number of concurrent user
Strategically placing the servers in a CDN can result in high network backbone capacity , which equates to a significant increase in the number of users accessing the network at a given time. For example, where there is a 100 GB/s network backbone with 2tb\s capacity, only 100 GB/s can be delivered. However, with a CDN, 10 servers will be available at 10 strategic locations and can then provide a total capacity of 10 x 100 GB/s.

  • DDoS protection
Other than inflicting huge economic losses, DDoS attacks can also have a serious impact on the reputation and image of the victimized company or organization. Whenever customers type in their credit card numbers to make a purchase online, they are placing their trust in that business. DDoS attacks are on the rise and new ways of Internet Security are being developed; all of which have helped increase the growth of CDNs, as cloud security adds another layer of security.  Cloud solutions are designed to stop an attack before it ever reaches your data center. A CDN will take on the traffic and keep your website up and running. This means you need not be concerned about DDoS attacks impacting your data center, keeping your business’ website safe and sound.

  • Analytics
Content delivery networks can not only deliver content at a fast pace, they can also offer priceless analytical info to discover trends that could lead to advertising sales and reveal the strengths and the weaknesses of your online business. CDNs have the ability to deliver real-time load statistics, optimize capacity per customer, display active regions, indicate which assets are popular, and report viewing details to their customers. These details are extremely important, since usage logs are deactivated once the server source has been added to the CDN. Info analysis shows everything a developer needs to know to further optimize the website. In-depth reporting ultimately leads to performance increase, which results in higher user experience and then further reflects on sales and conversion rates.



How CDN is differ from web hosting servers?


CDN Hosting vs Traditional Web Hosting
  • CDN and Web Hosting seem to be similar, but they are totally two different concepts. Web Hosting is hosting your content of your website in a server. There are different hosting plans available these days like shared hosting, VPS (Virtual Private Hosting), Dedicated Hosting and Cloud Hosting. Since the web data become richer, in the sense, more with Audio, Video or bigger page sizes, it consumes more bandwidth to deliver the end user or the person who is browsing. On top of bandwidth, it takes more time to load the content of the webpage to the user. Here only, the CDN network comes into the picture.
  • Web Hosting is to host your web in a server to allow people to access from Internet, whereas CDN increases the delivery speed of your web content across the world.
  • CDN at the moment deliver only the static part of your website, but Google is planning to cache the whole page including content of your web pages, web servers on the other hand, contain all your web related content.
  • Mostly, web content are hosted in a single server, but CDN content will be spread across the world, in multiple hosted environment.
  • Web Hosting is used to host your website on a server and let users access it over the internet. A content delivery network is about speeding up the access/delivery of your website’s assets to those users.
  • Traditional web hosting would deliver 100% of your content to the user. If they are located across the world, the user still must wait for the data to be retrieved from where your web server is located. A CDN takes a majority of your static and dynamic content and serves it from across the globe, decreasing download times. Most times, the closer the CDN server is to the web visitor, the faster assets will load for them.


Free And Commercial CDN s


Cloudfare

Cloudflare-cdn-service
  • Cloudfare is popularly known as the best free CDN. It is one of the few industry-leading players actually offer a free plan. Powered by its 115 datacenters , cloudfare delivers speed , reliability , and protection from basic DDoD attacks.

Incapsula

Incapsula-cdn-service
  • Incapsula provides application delievery from the cloud: global CDN , website security , DDoS protection , Load balancing and failover. It takes 5 minutes to activate the service, and they have a great free plan.


jsDelievr


  • jsDelivr is a publicly available CDN where any web developer can upload and host their own files. It is best suited for hosting the libraries that are not hosted by Google.

CDNjs

  • CDNjs is a community-powered CDN user by over 320000 websites. Sponsored by Cloudfare , Userapp and Algolia. CDNjs hosts over 1000 libraries.


Imgur

  • A wildly-popular image hosting site, imgur is fast , reliable and perfect for begginers. If you're just starting up and looking for an easy way to save server bandwidth , imgur along with other popular image hosting sites like  PhotoBucket and Flickr should serve your purposes to the fullest.

Cloudinary


  • If you run website that heavily dependent on images (think portfolios of photography/design services), offloading your images to another server would be a good idea. You would end up saving a lot of precious bandwidth. Cloudinary is a robust image management solution that can host your images, resize them on-the-fly and a ton of other cool features. In their forever-free plan , they offer 2GB storage with 5GB of bandwidth.


Requirements For Virtualization

  • Oracle VM VirtualBox is an free and open-source tool that you can use to run virtual servers on any computer using an x86-type processor, such as the common Intel and AMD chips. It lets you run other operating systems or another instance of the same operating system on your computer. For example, if your creative department uses Macs, they could use VirtualBox to open up a Windows virtual computer to access a program that the rest of your company uses. It's frequently used for testing since you can use one computer to test a program or Web page in multiple operating systems.

CPU and RAM

  • VirtualBox runs on Intel and AMD processors even if they don't support their manufacturers' VT-x or AMD-V virtualization technologies. Oracle also recommends that you have at least 1GB of RAM to run the software in addition to what is needed to support your computer's processes. When running VirtualBox, remember that your CPU's power will be divided between the virtual computers that it runs, so the faster it is, the faster each virtual computer will be.

Storage

  • Oracle doesn't specify a storage requirement for VirtualBox because the program itself is relatively small. For example, the VirtualBox installer for Windows is less than 100MB. However, you do need space for the virtual computers that will run under VirtualBox. If you want to run a virtual Windows 8 computer on your Linux box, you need enough space to install the second operating system and Windows 8 programs and for storage inside your Windows 8 virtual partition. If you heavily use VirtualBox, you could end up needing hundreds of gigabytes of extra storage.

Windows Requirements

  • VirtualBox can run on many flavors of Windows. It supports 32- and 64-bit versions of Vista, Windows 7 and Windows 8, as well as 32-bit versions of Windows XP. It also works on Windows server platforms, including the 32-bit edition of Windows Server 2003, both 32- and 64-bit Windows Server 2008 and Windows Server 2012.

Other Requirements

  • VirtualBox not only enables you to run multiple operating systems, but it can also run on multiple operating systems. Oracle offers an OS X version of VirtualBox that runs on versions 10.6, 10.7 and 10.8. You can use VirtualBox with four flavors of Linux -- Oracle Enterprise Linux, SUSE Linux, Ubuntu and Redhat Enterprise Linux. VirtualBox also supports Solaris 10 and Solaris 11.
Image result for requirements for virtualization


Pros And Cons Of Different Virtualization Techniques 

Server Virtualization

  • Server virtualization is the masking of server sources , including the number and identity of individual physical servers , processors  ,and operating systems from server users. The server administrator uses a software application to divide one physical server into multiple isolated virtual environments.
Image result for server virtualization

Pros

  • It saves hardware. Without the need to purchase or upgrade costly server hardware, companies can reallocate their funds back into growing their business.
  • It is doing operational savings. With a large server array, it is necessary to employ dedicated technicians to maintain it all.  Salaries for full-time tech staff are a considerable drain on spending for many companies, but with virtualization, these resources can be reduced to part-time or even channeled into less-costly managed services.
  • It saves energy. An extensive collection of physical servers is a massive drain on energy resources.  Not only do they need to be kept running, they need to be kept cool—meaning there will be extra energy involved to maintain climate stability in the server room.  Virtualization eliminates this need, potentially reducing your energy consumption by a significant degree.
  • It has real estate savings.  Physical servers tend to take up a fair bit of room.  With office space at a premium, this can be quite costly.  Virtualization of your servers can support downsizing efforts and help you save on real estate.  That space can then be re purposed for other things or gotten rid of entirely.

Cons

  • The cost of entry can be prohibitive. Virtualization, like any other technological initiative, is pay-to-pay. For instance , the physical servers that can be virtualized  cost more than their traditional counterparts. 
  • Not all the applications can be virtualized. You may still need to maintain a hybrid system to ensure all of your applications keep working as they should. Today , most applications support virtualization , but if you are running propriety software , you may want to look at its capabilities before moving forward.
  • There can be security risks. Data security is one of the most significant issues we face today. Virtualization carries an added security risk , so additional spending will be required to ensure data safety and integrity.

Popular Tools

  • vSphere
  • Kernel-based Virtual Machine                   
  • VMware ESXi
  • Nutanix Acropolis
  • Amazon Elastic Compute Cloud
  • VSOM
  • Oracle VM Virtualbox
  • Citrix Hypervisor
Image result for vsphere

Image result for Nutanix Acropolis

Popular Implementations

  • Using virtual servers for disaster recovery
  • Saving money with server consolidation
  • Creating server consolidation plan to avoid sprawl
  • Virtual Server performance improves with resource throtting
Image result for popular implementations of server virtualization


Storage Virtualization

  • Storage virtualization is technique to abstract information about all the storage hardware resources on storage area networks. This can be used to integrate hardware resources from different networks and data centers into one logical view.
Image result for storage virtualization

Pros

  • Cost-effective in terms of not having to purchase as much additional software.
  • The same amount of work can be completed with less servers since they are effectively working together
  • Increased loading and backup speed
  • Less energy use
  • More disk space

Cons

  • Often violates licensing agreements
  • Reduced costs and increases in disk space can encourage people to increase the number of servers, creating server sprawl, in which there are too many servers to be managed
  • The network system is much more complicated
  • If one system fails, they all fail
  • If one server is infected or breached, the entire network is compromised.

Popular Tools

  • Tintri VMstore
  • Infinio Accelerator
  • Condusiv Technology V-locity
  • Proximal Data AutoCache
  • Pure Storage Flash Array





Popular Implementations

  • Information inquiry commands
  • Mapping management
  • RAID
  • Snapshots
  • Free space Management



Desktop Virtualization

  • Desktop virtualization is software technology that separates that desktop environment and associated application software from the physical client device that is used to access it.
Image result for desktop virtualization

Pros

  • Access Anywhere. A well set up DaaS system lets your employees access their work desktop from pretty much anywhere. This saves on costs (not having to purchase multiple licenses for employees with, say, a desktop and a laptop), as well as makes employees not in the office more productive.
  • Security and Reliability. A DaaS setup lets you keep an eye on security and reduce maintenance costs by only having one central point that needs patching, upgrading, and maintenance.
  • Uniformity and Control. Since the desktop image is shared by all (or most), you have a lot of control with what is available, what can be installed, and what can be put where. That level of control is much more difficult on individual machines.
  • Ability to Switch Environments on the Fly. If you have employees who might need to use multiple environments, Linux and Windows for example, or two different versions of Windows, a DaaS set-up allows you to offer both and let employees use them interchangeably.

Cons

  • Long-term ROI. Most experts and consultants agree that the ROI benefits of DaaS systems are long-term prospects. You won’t be seeing an immediate return like with server virtualization or other outsourcing methods.
  • Multiple Use Cases Require Multiple Images. Having users who need different environments and different default settings can require having multiple images stored on your central server, and that can quickly overrun your space availability and get expensive.
  • Single Failure Point. Unlike the distributed desktop model where the loss or failure of one PC is contained, if your DaaS server or provider goes down or becomes compromised, EVERYONE in your organization can be down or compromised.
  • Usually requires network access. Employees who can’t get online can’t work, so Internet/network connectivity issues can wipe out productivity across entire departments.

Popular Tools

  • Citrix XenDesktop
  • Microsoft Enterprise Desktop Virtualization
  • MokaFive Virtual Desktop Solution 1.0
  • Pano Logic Virtual Desktop Solution
  • Solid ICE
  • webOS
  • Virtual Desktop Infrastructure
Image result for Microsoft Enterprise Desktop Virtualization

Image result for Virtual Desktop Infrastructure

Popular Implementations

  • As a virtual machine
  • Image repository
  • Management Server
  • Management console
  • End user
Image result for popular implementations of desktop virtualization

Hypervisor

  • A hypervisor is a process that separates a computer’s operating system and applications from the underlying physical hardware. Usually done as software although embedded hypervisors can be created for things like mobile devices.
  • The hypervisor drives the concept of virtualization by allowing the physical host machine to operate multiple virtual machines as guests to help maximize the effective use of computing resources such as memory, network bandwidth and CPU cycles.
Image result for hypervisor
  • One of the key functions a hypervisor provides is isolation, meaning that a guest cannot affect the operation of the host or any other guest, even if it crashes. As such, the hypervisor must carefully emulate the hardware of a physical machine, and (except under carefully controlled circumstances), prevent access by a guest to the real hardware. How the hypervisor does this is a key determinant of virtual machine performance. But because emulating real hardware can be slow, hypervisors often provide special drivers, so called ‘paravirtualized drivers’ or ‘PV drivers’, such that virtual disks and network cards can be represented to the guest as if they were a new piece of hardware, using an interface optimized for the hypervisor. These PV drivers are operating system and (often) hypervisor specific. Use of PV drivers can speed up performance by an order of magnitude, and are also a key determinant to performance.
Type 2 Hypervisor

Emulation

  • Emulation is the process of imitating a hardware/software program/platform on another program or platform. This makes it possible to run programs on systems not designed for them.
  • Emulators, as the name implies, emulate the functions of one system on another. Thus, the second system behaves like the original system, attempting to exactly reproduce the external behaviors of the first system.
Image result for emulation


How does the emulation is different from Virtual Machines? 

  • An emulator is anything that tries to behave like something else and isn't necessarily a virtual machine if that emulated thing is not hardware.
  •  A virtual machine can either be something that tries to present its own system image of the same architecture (emulates an i386 system while running on an i386; the CPU doesn't need to be emulated but various hardware pheriphreals need to be), a different architecture (i386 VM running on a PowerPC Macintosh, the CPU needs to be emulated), or a bytecode interpreter like the Java VM.
  • So a Java VM is not really an emulator as its not trying to pretend to be anything else, but it's a sort of virtual machine based on "imaginary hardware" in a sense.
  • VMware running x86 Windows on an x86 Linux host is a VM that's not emulating the CPU, but is emulating other things like disk controllers.
  • Something like WINE for example is not machine emulator or a VM, they're OS emulators (take the same API calls and try to do the same thing that Windows would do with them, etc.)
  • Windows 95 on Win10 (without using VMware etc) would require an "OS emulator" called WoW64 (Windows on Windows 64) that translates API calls similar to WINE.
  • Virtual machines make use of CPU self-virtualization, to whatever extent it exists, to provide a virtualized interface to the real hardware. Emulators emulate hardware without relying on the CPU being able to run code directly and redirect some operations to a hypervisor controlling the virtualcontainer.
Image result for How does the emulation is different from Virtual Machines?


Pros and Cons of Virtual Machines

Advantages

Less physical hardware

  •  In a typical distributed control system (DCS), you might have two Tag/OS servers, two batch servers, a historian or two, and an engineering station or two. Easily, you’re looking at six servers that will need to be physically maintained. You’ll find a time and overall cost savings on the replacement of hardware and maintenance.

More eco-friendly

  • If you look at your current configuration, most of your machines are idling along. But, with them virtualized and running on a cluster, you maximize your machines’ potential while saving money on energy costs.

System upgrades

  • The time and heartache of making system images before applying a patch and having a system restore fail are all realities. With the virtual environment, if something goes wrong while applying a patch or update, you can simply roll back the virtual machine back where it was before you applied the patch using a snapshot.

Use of thin clients

  • Using a thin client manager, replacement of a bad terminal is as easy as a few clicks and powering on the new unit. Conversely, with a physical machine you’re stuck with re-imaging or building a replacement from scratch.

Disadvantages


Cost

  • The upfront cost can be much higher and, depending on how high of an availability you want, you’ll need to be willing to design the system for your needs now and in the future.

Complexity

  • If you’re not familiar with the hardware and network aspects of the whole setup, it can be daunting to figure out. Routing rules and virtual local area networks (VLAN) continue to add complexity, especially if security is a concern.

Hardware Keys

  • Yes, you can use hardware keys. You can bind a USB port to a specific virtual machine. However, you are not able to move the virtual machine without physically moving the key as well.

Add-on hardware

  • In the past, you weren’t able to add on older PCI hardware and share it with the virtual machine. This has changed, but it doesn’t work 100% of the time. I’d recommend testing it thoroughly before deploying. Of course, this also limits which machine a virtual machine can run on because it will need to be bound to that piece of hardware.
Image result for pros and cons of virtual machines


Containers/Dockers

  • A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, run time, system tools, system libraries and settings.
Image result for dockers programming


Advantages


Well documented

  • Docker’s feature set changes rapidly. The Docker team churns out new releases at a dizzying pace. Each release tends to add new features, and deprecate old ones.
  • Fortunately, the Docker team also does a nice job of documenting everything. The Docker Documentation is reliably up to date. The docs usually make it very clear if information applies only to specific versions of Docker.
  • Docker’s solid documentation merits praise because many other software projects do a poorer job in this respect.

Has public container registries

  • One of the coolest things about Docker that people tend to overlook, I think, is the way it has made public repositories the go-to way to distribute and install software.
  • The repository idea is not new to Docker, of course. GitHub has been doing the same thing for years. So have Linux distributions, which usually rely on public repositories as the main source for installing software.
  • Through Docker Hub, Docker brings turn-key software distribution and installation to a new level. Repositories are no longer something you use just for source code or on Linux. With Docker, they become the default way to install software almost anywhere.

Disadvantges


Storage is still hard

  • Better storage options for Docker containers are on the horizon. But the fact remains that today, there is no really seamless way to connect containers to storage. Docker Data Volumes require a lot of provisioning on the host and manual configuration. They solve the storage dilemma, but not in a really user-friendly or efficient way.

Has poor monitoring

  • Basically, the only type of monitoring solution that Docker offers is the stats commands.
  • There are third-party tools that offer more monitoring. Docker itself provided more robust monitoring.

Platform dependent

  •  Docker now advertise itself as supporting Windows and Mac OS X as well as Linux. But it actually uses virtual machines to run on non-Linux platforms. At the end of the day, Docker is still Linux-only.
Image result for containers and dockers

What are the differences between containers and VMs?

VMs Containers

  • Heavyweight


  • Lightweight


  • Limited performance


  • Native performance


  • Each VMs run in its own OS


  • All containers share the host OS


  • Hardware-level virtualization


  • OS virtualization


  • Startup time in minutes


  • Startup time in milliseconds


  • Allocates required memory


  • Requires less memory space

  • Fully isolated and hence more secure


  • Process-level isolation, possibly less secure

No comments:

Post a Comment