<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Microservices on Letters From The Wild Side</title><link>/categories/microservices/</link><description>Recent content in Microservices on Letters From The Wild Side</description><generator>Hugo -- gohugo.io</generator><language>en-uk</language><lastBuildDate>Sun, 29 Aug 2021 00:00:00 +0000</lastBuildDate><atom:link href="/categories/microservices/index.xml" rel="self" type="application/rss+xml"/><item><title>Flutter and Microservices</title><link>/p/flutter-and-microservices/</link><pubDate>Sun, 29 Aug 2021 00:00:00 +0000</pubDate><guid>/p/flutter-and-microservices/</guid><description>&lt;p&gt;Last modified: May-29-2022, 02:40PM +08&lt;/p&gt;
&lt;h1 id="flutter-web-and-microservices"&gt;Flutter Web and Microservices
&lt;/h1&gt;&lt;p&gt;If one ever needs to deploy neural-based services that can scale to zero, one of the best
options include a client-server architecture that is based on microservices. This is not
a comparison between software architecture design patterns, but rather an evaluation
on the feasibility of flutter and microservices.&lt;/p&gt;
&lt;p&gt;In most web applications, there is a common process which involves data aggregation
and processing for downstream tasks. Some of those tasks include analytics, error reporting
and threat monitoring. These tasks often come from different domains of data science, cybersecurity,
cryptography, database, networking and distributed computing. It would be infeasible and
impractical to expect any single programming language to cater to each and every domain.
Not forgetting users of every level, ranging from novices to experts and public to
enterprise.&lt;/p&gt;
&lt;p&gt;The natural and intuitive solution to this hard requirement of cross-domain resources
quickly points to a modularity of recomposing units with service granularity. Individual services
can be improved incrementally, agnostic of language and platform. Communication can be
independent or inter-dependent between separate components hosted on the same server.
Seamless integration allows monolithic legacy and modern subsystems to be fully integrated.&lt;/p&gt;
&lt;p&gt;Flexible integration with third-party resources such as autocomplete search engines, databases and
object-stores are fully swappable for new frameworks and technologies in the future to
prevent vendor lock-in.&lt;/p&gt;
&lt;p&gt;Most managed backend solutions on the market today fully supports encrypted traffic with
HTTPS. There is little reason not to secure and safeguard the user&amp;rsquo;s data and privacy
against malicious actors looking to exploit zero-day vulnerabilities. There is a global
community effort in developing and maintaining security standards and protocols which
serve the needs of billions of users on the internet. These open-source cryptographic libraries
form a critical part of the arsenal available to developers, without resource-stricken proprietary
libraries exposing the attack surface.&lt;/p&gt;
&lt;p&gt;The microservice developer also has access to open-source and efficient media codecs for
both transmission and storage. Attributes of a microservice architecture are well suited for a rapid
evolving technology that is seeking regional and global reach.&lt;/p&gt;
&lt;h2 id="development"&gt;Development
&lt;/h2&gt;&lt;p&gt;Common message formats include &lt;a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP" target="_blank" rel="noopener"
 &gt;HTTP&lt;/a&gt;, &lt;a class="link" href="https://grpc.io/" target="_blank" rel="noopener"
 &gt;gRPC&lt;/a&gt;, &lt;a class="link" href="https://graphql.org/" target="_blank" rel="noopener"
 &gt;GraphQL&lt;/a&gt; and &lt;a class="link" href="https://en.wikipedia.org/wiki/WebSocket" target="_blank" rel="noopener"
 &gt;WebSocket&lt;/a&gt; providing
uni/bidirectional communication channel depending on the application. Maturity of these
standards and protocols allow them to be widely implemented in languages popular with web
development. With the advent of microservices in the early 2010s, &lt;a class="link" href="https://www.docker.com/," title="Docker"
 target="_blank" rel="noopener"
 &gt;Docker&lt;/a&gt; remains
a popular tool for local development of containers.&lt;/p&gt;
&lt;p&gt;There has been ongoing work on porting docker to Internet-of-Things(IoT), mobile and GPU
platforms. The same codebase for any particular microservice can be easily adapted to
target a diversity of platforms during expansion into surrounding markets. This is
evident in the growing number of cross-platform web applications. The targeting platform
can be expanded to include x86, ARM, RISC-V, NVPTX or AMD ISA, not excluding FPGAs and
ASICs.&lt;/p&gt;
&lt;p&gt;Service endpoints comprise of IoT, dedicated servers and public cloud for both internal
and public facing APIs. To efficiently scale to millions of users, a container orchestration
tool such as &lt;a class="link" href="https://kubernetes.io/" target="_blank" rel="noopener"
 &gt;Kubernetes&lt;/a&gt; should be utilized to manage network traffic
and computing resources.&lt;/p&gt;
&lt;p&gt;Driven by open-source momentum, a healthy and growing ecosystem of developer tools is the
end result of that collective effort. There is no lack of options targeting different
niches of the technology stack required to bring a minimal viable product(MVP) to satisfy
early adopters, which in turn provide valuable feedback for the next product iteration.&lt;/p&gt;
&lt;p&gt;The adoption of continuous integration and continuous deployment(CI/CD) best practices
simplifies testing and deployment of microservices. This strategy enables the timely
delivery of new features on budget.&lt;/p&gt;
&lt;h2 id="deployment"&gt;Deployment
&lt;/h2&gt;&lt;p&gt;Once a microservice is deployed, its API will accept authenticated requests for identity
authentication and access-control of resources. Further restrictions on CPU, memory or
GPU are enforced through configurations flags. Resource requirements can be
forecasted based on usage patterns during off-peak and peak periods. Service granularity
allows real time procurement of additional resources before spikes in traffic and also scaling
to zero for deprecated services.&lt;/p&gt;
&lt;p&gt;Containers by default have restricted access to host resources and they run in isolation
with regards to other processes on the host system. A microservice being self-contained
and coupled with its dependencies can be deployed in parallel with version control.
As user base grows, vertical and horizontal scaling of these containers is what allow
microservice to be scalable across different regions via cloud.&lt;/p&gt;
&lt;p&gt;The high development cost is compensated by low cost of entry and low running costs
with generous credits from public clouds. Network latency is offset with load-balancing proxies,
CDNs and regional deployment with redundancies to ensure high availability to users.&lt;/p&gt;
&lt;p&gt;Fine-grained handling and securing of network traffic is done using a service mesh such
as &lt;a class="link" href="https://istio.io/" target="_blank" rel="noopener"
 &gt;Istio&lt;/a&gt;, &lt;a class="link" href="https://traefik.io/" target="_blank" rel="noopener"
 &gt;Traefik&lt;/a&gt; or in-house solution. API
security is enforced through threat and error monitoring with logging/tracing. To ensure
high availability, periodic health checks are conducted on endpoints. In the event of
a disruption, the operations team will be notified within seconds while an automated
rollback or spinning of new instances during surges will take place simultaneously.&lt;/p&gt;
&lt;p&gt;This composition of behaviors ensure the microservice stays fault-tolerant.&lt;/p&gt;
&lt;h2 id="security"&gt;Security
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;OAuth2&lt;/li&gt;
&lt;li&gt;SAML&lt;/li&gt;
&lt;li&gt;JWT&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="future-applications"&gt;Future Applications
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Self-driving vehicles and autopilot UI&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Self-planning residential and industrial robots with remote human intervention&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Self-organizing behavior in drone swarms at scale with mining and agriculture industries&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Implementation of the first distributed superintelligence with a brain-computer
interface&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A bundle of artificial intelligence(AI) tools with the analogy of the Swiss army knife&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="whats-next"&gt;What&amp;rsquo;s Next?
&lt;/h2&gt;&lt;p&gt;Experimentation of running neural-based eBPF programs as microservices with flutter.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary
&lt;/h2&gt;&lt;p&gt;Attributes of a microservice architecture are well suited for a rapid evolving technology
that is seeking regional and global reach.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;healthy, growing ecosystem of developer tools and CI/CD best practices ensures timely
delivery of new features on budget.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;composition of service granularity, identity and access control of resources ensures
the microservice to remain fault-tolerant and highly available.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;API security&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;future applications&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;</description></item></channel></rss>