How is routing implemented in a web server?

Thanks for asking this question. URL based routing is a feature of a web server. Therefore the specifics of implementation are dependant upon the rules enforced by the web server. Nginx, express, sinatra all have their own “style” of routing. But the general principle of execution of a request are the same across different servers.

Consider for example that your web server is running on the endopint

http://localhost/

Let us say that you access a location /foo

http://localhost/foo/

The URL parsing engine will

  1. Extract the relative path from the url. In our example /foo

  2. It will invoke the processing code that is associated with /foo. This is the web server specific part. In your web server there would be a function that would execute everytime /foo is accessed.

  3. The web server will now execute the corresponding function and then return the result to the client. When and how the result is returned depends upon the concurrency model of the webserver, which is explained below.

Parameters can also be passed to the url like so

http:/localhost/foo?a=1&b=2

In this case these parameters will be passed along to the function that is responsible for processing the /foo path. These parameters can be utilized to pass some sort of state information (like in case of paging) or some other information that can be used by the function to give an appropriate result to the user.

Web servers also allow the routes to become Method specific. For example a certain route might only execute when client sends a GET request. Yet other routes may only execute POST request. This lets you “overload” URLs allowing you to send a response depending upon the method of the request even when the name is the same. For example

/foo when invoked with a GET method may give a different result than /foo when invoked with a POST.

The concurrency model

The web server is responsible for handling not only the url specific request but also maintaining what is known as concurrency. Since a web server can be accessed by multiple clients at once you don’t want any particular request to block the execution of the entire web server. The kind of concurrency model used is again web server specific. Some web servers dedicate one thread per request. Other web servers use an event driven model. Many use a mix between the two.

Workrock Engineering

WRE

workrocin@gmail.com

With such a relatively small amount of transcontinental internet cables, how can billions of users interact simultaneously and almost immediately across the globe?

First let’s talk about capacity provisioning.

Transcontinental lines don’t connect individual users directly. Instead it’s through a series of gateways.

A telecommunication network can broadly be divided into three parts

  1. The backbone

  2. The backhaul

  3. The edge

Normal users like you and me interact with the edge. The edge bandwidth is responsible for serving the users within its range.

For example the wifi router in your home is an edge that is responsible for providing connectivity to all the people within its range. Hence the edge device must be able to accommodate the traffic of it’s users.

So is the telecommunication tower that provides 4G / 5G network.

Going one step up we have backhaul networks. These are set up by the ISPs who lease internet bandwidth from the backbone. Backhauls are gateways for the edge to the global internet lines.

Backhauls are adsl cables, fiber optic in cities, or even wireless networks that talk with base stations.

[The backbone is only responsible for talking with backhauls. It is the responsibility of the backhaul to distribute the internet. ]

There are two implications of this architecture.

  1. The burden of individual connectivity/the last mile connection as it is called, is entirely upon the local ISP. The backbone is done with its job at the termination point (which is usually a coast, which is also why you’ll often notice the coastal cities to have much larger bandwidth than mainlands or on the other extreme no connectivity at all)

  2. If services from a single backbone strand is not able to meet the demands of ISP customers,more lines may be acquired. This happens all the time. People are continuously increasing backbones and at present we have 300-400(difficult to tell the exact number) of these cables.

Finally we come to backbone. The fiber optic cables that provide internet to ISP. These cables are extremely efficient. Each strand is capable of carrying gigabits of data and the cable is composed of multiple strands. The capacity of fiber optic is way more than what we can consume or create.

[And by the way to increase the speed further you don’t even need to replace the cable, a change in modulation scheme will work just as well, so fiber optic cables as carriers of light are future proof,unless a completely new and better technology comes along]

The Internet is decentralized. Thus any part of the network that we discussed can be upgraded whenever limitations arise. From the edge to the backbone without affecting the network as a whole.

Now with the architecture in place the answer to your question about speed is that users are able to interact with each other instantaneously(technically there is always a lag) because communication is performed at the speed of light.

The bottleneck is not the technology but use case. As long as use cases are centered around data consumption it’ll be difficult for the industry to grow.

References

How fiber optics work https://sites.google.com/site/bit4554fiberoptics/how-it-works

How fast can fiber optic be?

https://www.pilotfiber.com/blog/how-fast-can-fiber-optic-internet-be

More on backhaul networks

https://en.m.wikipedia.org/wiki/Backhaul_(telecommunications)

More on backbone

https://en.m.wikipedia.org/wiki/Backbone_network

workrockin@gmail.com

Is wifi as reliable as Ethernet?

  1. Both wifi and Ethernet provide physical and data link layers of the communication stack. In OSI model this is called layer 1 and layer 2.

  2. Both Ethernet and wifi are shared access mediums. They both work on CSMA. Or carrier sense multiple access. That is before transmission can happen it is verified that no other node is using the carrier signal.

  3. Ethernet uses Collision Detection or CD to stop transmission as soon as packets collide . Wifi uses Collision avoidance or CA to stop collision from happening in the first place. This way single transmission medium is used by many nodes. Or it’s multiplexed.

  4. Ethernet is best for point to point and fixed multipoint connections. Since wifi communication is over the air it’s best for mobile point to multipoint as well as mobile point to point connections.

  5. In terms of speed Ethernet is faster than wifi with speeds touching 100 Gbps.

  6. Because Ethernet uses a wire for transmission it does not have to deal with interference. Wifi signals on the other hand suffer reflection,interference, diffusion etc.

Layer 2 offloading with Network switch

An Ethernet works in a full duplex mode when separate wires are used for transmission and reception. Lan cables like cat 5 or cat 6 are twisted pair. Pair refers to two set of wires. One set for transmission and the other set for reception.

As such when there is no longer a shared medium it can upload and download at the same time.

This is achieved with the help of a network switch. A separate hardware that takes care of medium access control. It provides the layer 2 functionality that was previously handled by CSMA/CD.

Since the medium is no longer shared ,due to separate wires being used, you can have full duplex high speed connection. No multiplexing is required since each device has a different communication channel.

Summary

On paper both WiFi and Ethernet are equally reliable. In the real world, nothing can beat a fixed wire connection. But that reliability is of little use if it can’t be distributed efficiently. Or require fixed devices for access.

Reference

How gigabit ethernet works

https://www.hardwaresecrets.com/how-gigabit-ethernet-works/

Digital technology should look to reduce the workload of teachers

The current efforts in digitizing education are focussed on paperwork. Admission, roll calls, student records etc.

However these initiatives are just more of the same. Instead of marking attendence on paper techers will now use an app. While a case could be made that this adds more transparency to the process it doesn’t do much to improve it.

Far greater opportunities exist to change the way we teach,not just the way we adminster students. And they don’t even need cutting edge technologies.

Different students have different ways of learning. Simple things like

– Recording lectures on video
– Creating audio books on common topics

Can have a substantial effect. These exercises are one time effort and students, generation after generation can learn from the knowledge thus preserved.

We live in an “on demand” age. If students can get access to study material when they need it , it would make their learning journey a bit more pleasant.

Teachers know this all too well that students like to take help from their peers. And most of them communicate digitally.

It would be clear then, that a school wide digital forum or a wiki could be a great learning resource.

Of course effort would have to be spent in moderation to keep a balance between useful.content and fun stuff. It should not be too formal but neither should it stray far away from topic.

Digitization is not as much about doing the same things on a computer. No. It’s more than that. It’s about changing processes and making them better with the help of technology.

workrockin@gmail.com

Technology for all

Technology is at its best when it’s simple enough that anyone can use it. Not just the people who are trained in it.

At the same time technology should be flexible enough to handle real life problems.

It should encourage collaborative problem solving. Facilitate communication across groups of people and just blend in with the daily life.

Good technologies should improve business processes. That is possible only when we are more methodical in our approach.

1. Do more with less. Discover ways to use the existing tools and platforms in unique new ways, before you go shopping for new stuff, if something doesn’t meet your exact standard.
2. Work towards unification or convergence of tech. Web is a great example of different technologies being used from a common interface. Define similar interfaces for your business processes.
3. Always keep on learning. Technology is at a stage where basic understanding can pretty much allow you to digitize all your business. Most of it is free. All you need is to take some time out and learn how to use it.

Even if you possess the best possible technology it won’t be of any use if you don’t apply it.

workrockin@gmail.com

What are spatial streams? What is link aggregation?

Spatial streams are separately encoded,independent data signals used for spatial multiplexing.

[Spatial multiplexing is a transmission technique in MIMO(Multi Input Multi Output)]

Spatial streams enable independent transmission and reception of data on a device. The goal is to increase the efficiency of the channel by enabling simultaneous transmission and reception.

[Spatial streams can be visualized as separate radios (and antennas) one handling transmission and the other reception for a device]

Why is it needed?

Traditionally a wifi channel can communicate with one device at a time. Sequentially. When communication is happening all the other devices have to wait in queue[1].

Moreover when a channel is being used by a device it can either transmit or receive but not do both. Spatial streams allow a single device to transmit and receive at the same time. All the other devices however are still waiting in queue.

Thus it can be said that in wireless communication spatial streams are meant for single devices. Client devices receive from and transmit to multiple antennas but still only one at a time.

The parlellism that spatial streams introduce is single device parlellism.This technology is called SU-MIMO where SU stands for single user.

[MU or multi user MIMO extends this parellism to multiple users. Enabling several devices to transmit and receive at the same time. ]

Application

In practical world, available bandwidth is rarely distributed by a single station. A network with its collection of access points is able to serve multiple users simultaneously.

Now while the devices still use channel sequentially, multiple access points mean that there are multiple queues of devices.This technique is the foundation for MU-MIMO which makes a single network capable of serving multiple users at once using streams.

Improvements in Wireless services not only mean a greater throughput to a device but also total increase in network capacity.Where we lack is in distribution of this speed equally among devices. We need to focus more on distribution than throughput.

Aggregation

Link aggregation allows us to introduce network redundancy. Multiple data lines are accessed from a single point. So that a user has a singular view of the network. For them its as if the data was available from a single provider. Although it may be that the data is infact being served by several different service providers.

The real benefit of aggregation is to provide network redundancy so that even if one provider goes down we can use others to keep the system online. Traffic may be distributed across different networks but that is only effective if all the networks are guaranteed to work at all times.

soft talk.

Uncomplicated, vendor neutral, interoperable messaging platform. Works on all devices. Online. Offline

soft talk is a programmable, api first messaging platform for digital organizations. Soft talk allows mobile network operators to provide Rich Content Messaging (RCM) services to their subscribers.

Built in interoperability ensures that soft talk platform is compatible with vendor deployments across the world. A uniform standardized core is supported by a flexible, programmable front end to allow each operator create while label, differentiated services to delight their customers.

soft talk’s support for presence, contact list, messaging, file transfer, gaming, content syndication and encryption allows it to be used in all kinds of industries.

soft talk’s not just a general messaging application for consumers but can be used in an enterprise setting for business communication as well.

Features

1.Integrated presence, address book and messaging features. Including store and forward. Content syndication, multi user chat and multimedia.

2.Decentralized but interoperable. Multiple soft talk machines may be deployed to distribute the load while at the same time remaining connected to the core of the service provider. The built in interoperability means that it can work across geographic regions, vendors and devices. So your subscribers will never feel left out of the loop.

3.Flexible. It can be used for general purpose messaging. Rich Content Messaging (RCM)support allows multimedia, file transfers, gaming and even social networking features. soft talk’s messaging technology can evolve into any form of communication demanded by the consumers and businesses alike. soft talk gives network operators ability to support personalized use cases.

4.Secure. soft talk can be used even for highly sensitive financial transactions. soft talk identifies users. It also has the capability to identify devices for use cases that require secure machine to machine transactions. It allows self registration of new subscribers but it can also support an administrator approval based workflow.

5.Standardized. Works over IP protocol suite. Compatible with IPV6. Understands HTTP. Although you will rarely feel the need, the protocol can be extended to support even more features.

The soft talk platform can be deployed on pre-configured machines in data centers. soft talk supports multiple machine architectures. arm,x86, risc etc. in case you need we also provide dedicated machines and soft talk servers to deploy on premise. All machines run high speed ssds and high volume hdd drives. They come with multi core processors to support high velocity communications between subscribers. Built in gigabit Ethernet and wifi cards allow the machines to communicate with each other either in a data center environment or as stand alone compute units deployed at client locations.

soft talk infuses new energy into the default messaging infrastructure. It gets rid of all the things holding mobile messaging back. No character limits. Free content sharing. Support for business communication and machine to machine messaging. soft talk is a future proof, stable messaging platform that just works.

workrockin@gmail.com

Why is it important to ensure uniformity when pursuing digital growth?

Information Technology companies have a conflict of interest against their consumers. As an organization their goal is to maximize the profit. Being a technology company the best way to maximize profits is to build new products or variants targetting specific market segments. The concept of stability is thrown out of the window. Things are built for the sake of it.

Consumers on the other hand are more interested in how tech can solve problems for them. The software updates, new UI and “quality of life” improvements are all secondary. A tech that is good enough is sufficient for them.

But for the companies it’s not. They want more products to be sold. More liscence upgrades. More service contracts signed. While this does improve their projections it may be harming the ecosystem.

IT can’t build houses or roads. IT can’t generate power. IT can’t cook food or clean the streets. However the entire economic system today depends heavily on it simply beacuse it glues things together and makes processes more efficient.

Information technology is a support industry. It does not solve any problem on its own , rather it enables other people to do their work more efficiently. How can we expect someone to use technology if by the time they grasp how to use it, it’s changed completely?

Now one could understand if a professionals job is to work with IT he would know all the latest advancements in his field. But since IT is a support industry and does not do anything useful on it’s own but only enable others to do useful work why should a professional in the field of say construction care about operating system updates? It doesn’t matter to him. Nor should it.

Not only does this complexity waste time and effort but it also increases the digital divide by continuously making things obsolete and increasing the barrier to entry. While on the surface appearing more and more easy to use.

Technology should work at the ground level. The bare minimum that is needed to get the job done. Anything other than that is a distraction. Or worse a ploy to lock the user into the ecosystem.

Which is why a good technology company would focus more standardizing common use cases and strengthing backwards compatibility with what’s already working.

Building something new does not have to mean destroying the old. We need to be more sustainable in our approach.

However that is in direct conflict with the goals or technology companies. The responsibility of choosing a stable technology platform then lies on the consumer.

If we want to bridge the digital divide. If we want to create technology that can be accessible and used by all we need unifomity. Not just in design. Not just the cosmetic UI changes but in application. A standard OS. A standard kernel. A standard networking stack. A standard set of commonly used applications.

By making digital technology uniform we can multiply our digital literacy efforts. Rather than having to teach things again and again we only need to focus on few underlying principles. The rest people will learn themselves. To build smart systems we need to make smart choices.

Amplitude is an effort to create a uniform technology architecture that can be used across different industries with minimal disruption in workflow.

workrockin@gmail.com

What can travel industry teach us about digital transformation?

The travel industry is in a league of it’s own.Uncontested.Unstoppable.Developing complimentary markets like acomodation, transport,food, wellness,finance in addition to it’s own. Funding and taking them to new heights.

Such has been it’s impact that nations have now started to realize the importance of “destination marketing” to attract more tourists. Not simply for financial rewards but also for cultural diffusion.

In the last decade tourism has been the biggest driver of digital growth. Bold claim? You decide.

Why do people use Instagram? What category of posts are most popular on Facebook? How are hotel rooms being sold? How are airline tickets being booked? How do you research for a new place to go?

It seems paradoxical that an industry that is experiential, natural and physical should be seen as a poster child for the adoption of digital/electronic technology. But that’s exactly what it is.

What has the travel industry gotten right that it’s digital transformation journey became so seamless.

Was it the lack of regulatory hurdle? Certainly not. As is evident from stringent visa and passport application requirements in addition to geo political complexity.

“Maybe it was due to external capital infusion by lenders?”

Maybe. But then can you point to any one investor that invested in travel to transform the market for the whole world? Our search proved futile. And infact we discovered that most investors were averese to investment in travel.

“Then surely it has rided on the wave of technology”

That is a more moderate claim. But if that is true then how come travel has adapted so well where as others like say education, finance,agriculture, medicine, manufacturing, energy have responded meekly.

What is it about travel that seems to turn all the technological trends in it’s favor? Smart phones,social media,airlines,civil construction, the internet.

How has travel managed to elicit such an enthusiastic participation from the consumers and partners?

What can we learn from the travel industry and apply it to others businesses to simplify their digital transformation journey?

A lot of things. But a few aspects stand out.

1. An open embrace of social media and other internet technologies.
2. A consumer oriented approach. Not just in what you sell but also how you sell it. A practice of going to where the customers are rather than waiting for them to come to you. An inclination to serve rather than to earn.
3. But most importantly an open mind and open heart. A belief in the spirit of discovery. The flexibility of mind to accept and welcome change. And an understanding that new breakthroughs can lead to something better.

The success of travel industry is not an accident contingent upon the presence of acquisition of natural, breathtaking locations. Rather it is its principles, practices and beliefs that puts it heads and shoulders above the rest.

Digital transformation is not so much about digital technology as it is about the state of mind. Travel industry had the right inclination that allowed it to gain the benefits of technology.

That is what other industries should look to emulate.

What can a digital transformation transform?

Information Technology does not generate any value by itself. It’s only a support industry. For digital technology to succeed people must use it to simplify/improve their business process.

For people to effectively use a technology they must spend time and effort in learning it.

The problem with new technology adoption is why must anyone learn to use it if they can do without it? It is thought of an irritant. Something that gets in the way of the job rather than helping them do it more effectively.

Digital transformation must start with a change in mindset. An open approach to test if there is something that can help us do things better? Perhaps with something that is even more fundamental.

Do we need to change the way we work?

workrockin@gmail.com

Design a site like this with WordPress.com
Get started