<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Amulya Reddy Konda on Medium]]></title>
        <description><![CDATA[Stories by Amulya Reddy Konda on Medium]]></description>
        <link>https://medium.com/@amulyareddyk97?source=rss-3e592ab2b117------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*69CWbxb5v3QuteJK8G0GJw.jpeg</url>
            <title>Stories by Amulya Reddy Konda on Medium</title>
            <link>https://medium.com/@amulyareddyk97?source=rss-3e592ab2b117------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 21:31:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amulyareddyk97/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[NestJs — AComplete Guide]]></title>
            <link>https://amulyareddyk97.medium.com/nestjs-acomplete-guide-ae1963197371?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae1963197371</guid>
            <category><![CDATA[nestjs-interceptor]]></category>
            <category><![CDATA[nestjs-module]]></category>
            <category><![CDATA[nestjs-provider]]></category>
            <category><![CDATA[nextjs-tutorial]]></category>
            <category><![CDATA[nestjs-middleware]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Mon, 01 May 2023 10:50:12 GMT</pubDate>
            <atom:updated>2023-05-01T10:53:59.761Z</atom:updated>
            <content:encoded><![CDATA[<h3>NestJs — A Complete Guide</h3><p>This article covers <a href="#7228">controller</a>, <a href="#09e2">modules</a>, <a href="#fc08">providers</a>, <a href="#0034">middleware</a>, <a href="#fd2d">pipes</a>, <a href="#6522">guards</a>, <a href="#d9f2">interceptors</a> in NestJs.</p><h3>Getting started</h3><ol><li>npm i -g @nestjs/cli</li><li>nest new project-name</li></ol><h3>Controller</h3><blockquote>Skim through this section if you are already familiar with spring boot. Bolded content is different from spring boot.</blockquote><pre>import { Controller, Get, Req } from &#39;@nestjs/common&#39;;<br>import { Request } from &#39;express&#39;;<br><br>@Controller(&#39;cats&#39;)<br>@HttpCode(204)<br>// @Redirect(&#39;https://nestjs.com&#39;, 301) -&gt; Example to redirect<br>export class CatsController {<br>  @Get(&#39;:id&#39;)<br>  findAll(@Body() request: RequestDTO, @Param(&#39;id&#39;) id): string {<br>    return &#39;This action returns all cats&#39;;<br>  }<br>}</pre><ol><li>In the above code snippet, @Controller() indicates controller end point. @Get() indicates it is a get call. @Post() indicates post call etc.. @Req() indicates the request body. If you are familiar with spring boot it is very similar to that.</li><li>To use path params use @Param(&#39;id&#39;) annotation. Ex url: http://localhost:3000/&lt;id&gt; . To use query params use @Query(&#39;key&#39;) annotation. Ex url: http://localhost:3000?key=value</li><li><strong>We can have routes with wildcards. Ex. </strong><strong>@Get(&#39;ab*cd&#39;) will match </strong><strong>abcd, </strong><strong>ab_cd, </strong><strong>abecd, and so on. The characters </strong><strong>?, </strong><strong>+, </strong><strong>*, and </strong><strong>() may be used in a route path, and are subsets of their regular expression counterparts. The hyphen ( </strong><strong>-) and the dot (</strong><strong>.) are interpreted literally by string-based paths.</strong></li><li>We can add @HttpCode(204) to override the default 200 status</li><li>We can redirect using @Redirect(&#39;https://nestjs.com&#39;, 301)</li><li>Promises and Observables can also be return by NestJs</li></ol><pre>@Get()<br>async findAll(): Promise&lt;any[]&gt; { // -&gt; Return a Promise<br>  return [];<br>}<br><br>@Get()<br>findAll(): Observable&lt;any[]&gt; { // -&gt; Return an RxJS Observable<br>  return of([]);<br>}</pre><p>7. <strong>Controllers always belong to a module, which is why we include the </strong><strong>controllers array within the </strong><strong>@Module() decorator.</strong> Let’s now see how modules work.</p><h3>Modules</h3><blockquote>Skim through this section if you are already familiar with Angular.</blockquote><ol><li>A module consists of controllers, providers, imports and exports.</li><li>providers— The providers that will be instantiated by the Nest injector and that may be shared at least across this module</li><li>controllers— The set of controllers defined in this module which have to be instantiated</li><li>imports — The list of imported modules that export the providers which are required in this module</li><li>exports — The subset of providers that are provided by this module and should be available in other modules which import this module. You can use either the provider itself or just its token (provide value)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mTPX-ky5smmzOyowYd1EBw.png" /></figure><p>2. To represent the above structure in Modules,</p><pre>import { Module } from &#39;@nestjs/common&#39;;<br><br>@Module({<br>  imports: [ProductModule, OrdersModule],<br>})<br>export class AppModule {}</pre><pre>import { Module } from &#39;@nestjs/common&#39;;<br>import { ProductController } from &#39;./product.controller&#39;;<br>import { ProductService } from &#39;./product.service&#39;;<br><br>@Module({<br>  imports: [FeatureModule1, FeatureModule2],<br>  controllers: [ProductController],<br>  providers: [ProductService],<br>})<br>export class ProductModule {}</pre><pre>import { Module } from &#39;@nestjs/common&#39;;<br>import { OrdersController } from &#39;./orders.controller&#39;;<br>import { OrdersService } from &#39;./orders.service&#39;;<br><br>@Module({<br>  imports: [FeatureModule3],<br>  controllers: [OrdersController],<br>  providers: [OrdersService],<br>  exports: [OrdersService],<br>})<br>export class OrdersModule {}</pre><pre>import { Module } from &#39;@nestjs/common&#39;;<br>import { FeatureController } from &#39;./feature.controller&#39;;<br>import { FeatureService } from &#39;./feature.service&#39;;<br><br>@Module({<br>  controllers: [FeatureController],<br>  providers: [FeatureService],<br>})<br>export class FeatureModule1 {}</pre><p>Feature2 and Feature3 Modules in the diagram are written similar to FeatureModule1.</p><p><strong>3. Shared Modules — </strong>If we want to share an instance of the OrdersService between several other modules, we need to export the OrdersService provider by adding it to the module&#39;s exports array, as shown above.</p><h3>Providers</h3><ol><li>Providers are the services that can be <strong>injected as a dependency</strong>.</li></ol><pre>import { Injectable } from &#39;@nestjs/common&#39;;<br>import { Product } from &#39;./interfaces/product.interface&#39;;<br><br>@Injectable()<br>export class ProductService {<br>  private readonly products: Product[] = [];<br><br>  findAll(): Product[] {<br>    return this.products;<br>  }<br>}</pre><h4><strong>Constructor based injection:</strong></h4><p>2. @Injectable() is used to identify the class as injectable (service or repository or factories or helpers).</p><p>3. To generate the service via command line: nest g service product</p><p>4. Call this service from controller through depenedency injection</p><pre>@Controller(&#39;cats&#39;)<br>export class ProductController {<br>  constructor(private productService: ProductService) {}<br>  ...<br>}</pre><p>5. We can use @Optional() if none of the dependency is passed, the default values should be used.</p><pre>// constructor-based injection<br>constructor(@Optional() @Inject(&#39;HTTP_OPTIONS&#39;) private httpClient: T) {} </pre><h4><strong>Property based injection:</strong></h4><p>6. If your top-level class depends on either one or multiple providers, passing them all the way up by calling super() in sub-classes from the constructor can be very tedious.</p><blockquote>If your class doesn’t extend another provider, you should always prefer using constructor-based injection.</blockquote><pre>// property based injection<br>@Injectable()<br>export class HttpService&lt;T&gt; {<br>  @Inject(&#39;HTTP_OPTIONS&#39;)<br>  private readonly httpClient: T;<br>}</pre><p>7. Providers must be added to Module as shown in the <a href="#2bde">above section</a></p><h3>Middleware</h3><ol><li>Middleware is a function which is called before the route handler. Middleware functions have access to the request and response objects, and the next() middleware function in the application’s request-response cycle.</li></ol><pre>import { Injectable, NestMiddleware } from &#39;@nestjs/common&#39;;<br>import { Request, Response, NextFunction } from &#39;express&#39;;<br><br>@Injectable()<br>export class LoggerMiddleware implements NestMiddleware {<br>  use(req: Request, res: Response, next: NextFunction) {<br>    console.log(&#39;Request...&#39;);<br>    next();<br>  }<br>}</pre><p>2. Annotate a class with @Injectable() and implement <strong>NestMiddleware</strong></p><p>3. Apply the middleware in the module as shown below:</p><pre>export class AppModule implements NestModule {<br>  configure(consumer: MiddlewareConsumer) {<br>    consumer<br>      .apply(LoggerMiddleware)<br>      .exclude(<br>          { path: &#39;item&#39;, method: RequestMethod.GET },<br>          { path: &#39;order&#39;, method: RequestMethod.POST },<br>          &#39;cart/(.*)&#39;,<br>        )<br>      .forRoutes({ path: &#39;product&#39;, method: RequestMethod.GET });<br>      // forRoutes({ path: &#39;ab*cd&#39;, method: RequestMethod.ALL });<br>  }<br>}</pre><h4>4. <strong>Functional Middleware:</strong></h4><pre>import { Request, Response, NextFunction } from &#39;express&#39;;<br><br>export function logger(req: Request, res: Response, next: NextFunction) {<br>  console.log(`Request...`);<br>  next();<br>};</pre><h4>5. <strong>Multiple middlewares:</strong></h4><pre>consumer.apply(cors(), helmet(), logger).forRoutes(CatsController);</pre><h4>6. <strong>Global middleware:</strong></h4><pre>const app = await NestFactory.create(AppModule);<br>app.use(logger);<br>await app.listen(3000);</pre><p>7. Middleware functions can perform the following tasks:</p><ul><li>execute any code.</li><li>make changes to the request and the response objects.</li><li>end the request-response cycle.</li><li>call the next middleware function in the stack.</li><li>if the current middleware function does not end the request-response cycle, it must call next() to pass control to the next middleware function. Otherwise, the request will be left hanging.</li></ul><h3>Pipes</h3><p>A pipe is a class annotated with the @Injectable() decorator, which implements the PipeTransform interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*lcQBORhW7FCY1V0Y4KlyFA.png" /></figure><pre>@Get(&#39;:uuid&#39;)<br>async findOne(@Param(&#39;uuid&#39;, new ParseUUIDPipe()) uuid: string) {<br>  return this.catsService.findOne(uuid);<br>}</pre><h4>Class Validator and Class Transformer:</h4><pre>npm i --save class-validator class-transformer</pre><pre>import { IsString, IsInt } from &#39;class-validator&#39;;<br><br>export class CreateCatDto {<br>  @IsString()<br>  name: string;<br><br>  @IsInt()<br>  age: number;<br><br>  @IsString()<br>  breed: string;<br>}</pre><p>Creating Custom Pipe</p><pre>import { PipeTransform, Injectable, ArgumentMetadata, BadRequestException } from &#39;@nestjs/common&#39;;<br>import { validate } from &#39;class-validator&#39;;<br>import { plainToInstance } from &#39;class-transformer&#39;;<br><br>@Injectable()<br>export class ValidationPipe implements PipeTransform&lt;any&gt; {<br>  async transform(value: any, { metatype }: ArgumentMetadata) {<br>    if (!metatype || !this.toValidate(metatype)) {<br>      return value;<br>    }<br>    const object = plainToInstance(metatype, value);<br>    const errors = await validate(object);<br>    if (errors.length &gt; 0) {<br>      throw new BadRequestException(&#39;Validation failed&#39;);<br>    }<br>    return value;<br>  }<br><br>  private toValidate(metatype: Function): boolean {<br>    const types: Function[] = [String, Boolean, Number, Array, Object];<br>    return !types.includes(metatype);<br>  }<br>}</pre><h4>Global scoped pipe</h4><pre>async function bootstrap() {<br>  const app = await NestFactory.create(AppModule);<br>  app.useGlobalPipes(new ValidationPipe());<br>  await app.listen(3000);<br>}<br>bootstrap();</pre><h3>Guards</h3><ol><li>A guard is a class annotated with the @Injectable() decorator, which implements the CanActivate interface.</li><li>Guards have a single responsibility. They determine whether a given request will be handled by the route handler or not, depending on certain conditions. This is often referred to as <strong>authorization</strong>. <strong>Authentication</strong> is typically handled by <strong>Middleware.</strong></li></ol><h4>3. Authorization guard / AuthGuard</h4><pre>import { Injectable, CanActivate, ExecutionContext } from &#39;@nestjs/common&#39;;<br>import { Observable } from &#39;rxjs&#39;;<br><br>@Injectable()<br>export class AuthGuard implements CanActivate {<br>  canActivate(<br>    context: ExecutionContext,<br>  ): boolean | Promise&lt;boolean&gt; | Observable&lt;boolean&gt; {<br>    const request = context.switchToHttp().getRequest();<br>    return validateRequest(request);<br>  }<br>}</pre><h4><strong>4. Binding guards</strong></h4><pre>@Controller(&#39;cats&#39;)<br>@UseGuards(RolesGuard)<br>export class CatsController {}</pre><p>5. Add guards to Module</p><pre>@Module({<br>  providers: [<br>    {<br>      provide: APP_GUARD,<br>      useClass: AuthGuard,<br>    },<br>  ],<br>})<br>export class AppModule {}</pre><h3>Interceptors</h3><ol><li>An interceptor is a class annotated with the @Injectable() decorator and implements the NestInterceptor interface.</li><li>Each interceptor implements the intercept() method, which takes two arguments. The first one is the ExecutionContext instance (exactly the same object as for guards). The ExecutionContext inherits from ArgumentsHost. The second argument is a CallHandler</li></ol><pre>@UseInterceptors(LoggingInterceptor)<br>export class ProductController {}</pre><pre>@Injectable()<br>export class LoggingInterceptor implements NestInterceptor {<br>  intercept(context: ExecutionContext, next: CallHandler): Observable&lt;any&gt; {<br>    console.log(&#39;Before...&#39;);<br><br>    const now = Date.now();<br>    return next<br>      .handle()<br>      .pipe(<br>        tap(() =&gt; console.log(`After... ${Date.now() - now}ms`)),<br>      );<br>  }<br>}</pre><h4>3. Execution context</h4><p>By extending ArgumentsHost, ExecutionContext also adds several new helper methods that provide additional details about the current execution process.</p><h4><strong>4. Call handler</strong></h4><p>The CallHandler interface implements the handle() method, which you can use to invoke the route handler method at some point in your interceptor. If you don&#39;t call the handle() method in your implementation of the intercept() method, the route handler method won&#39;t be executed at all.</p><p>5. Add the interceptor to module</p><pre>@Module({<br>  providers: [<br>    {<br>      provide: APP_INTERCEPTOR,<br>      useClass: LoggingInterceptor,<br>    },<br>  ],<br>})<br>export class AppModule {}</pre><h4>6. Interceptors have a set of useful capabilities:</h4><ul><li>bind extra logic before / after method execution</li><li>transform the result returned from a function</li><li>transform the exception thrown from a function</li><li>extend the basic function behavior</li><li>completely override a function depending on specific conditions (e.g., for caching purposes)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae1963197371" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kafka Streams and KTables]]></title>
            <link>https://amulyareddyk97.medium.com/kafka-streams-and-ktables-81545e9c0d2f?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/81545e9c0d2f</guid>
            <category><![CDATA[kafka-streams]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Fri, 11 Nov 2022 05:24:21 GMT</pubDate>
            <atom:updated>2022-11-11T05:24:21.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kafka Streams</h3><ul><li>We use Kafka streams to process data coming to Kafka topics.</li><li>Connect is useful when you want data in and out, but to modify that’s where Kafka streams come in.</li><li>Kafka streams is a streaming engine.</li><li>Event streams are like topics in brokers, sequence of events etc..</li><li>You can think Kafka stream as a standalone application or microservice that takes data from Kafka and process it.</li></ul><p><strong>Java Code for Kafka Stream</strong></p><ul><li>Event streams have events which are a key value pair.</li><li>Key isn’t unique in Kafka event streams.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yIOzmW57SbiKG3Il.png" /></figure><p>Event Stream Java code</p><h3>Topology</h3><p>Kafka stream processor is a DAG processing nodes &amp; edges that represent flow of event stream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qzas71cEaRorvaGq.png" /></figure><p>Kafka Stream Topology</p><h3>KTable</h3><ul><li>KTable can subscribe to only one topic at a time unlike Kstream.</li><li>KTable represents latest vale of each record.</li><li>KTable is backed by a state store state.</li><li>Store is the copy of events KTable is built from.</li><li>Ktable doesn’t not forward every change by default cache get flushed every 30 sec</li><li>Global ktables: holds all records of all partitions — stores more static data</li></ul><p><strong>Java Code for KTable</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xL-4LzIyLWpqT-et.png" /></figure><p>KTable Java code</p><h3>Joins in KStream</h3><p>To execute Join in KStreams, keys must be same</p><ol><li>Stream-Stream — combine 2 event streams to new event — Results in a stream</li><li>Stream-Table — Results in a stream</li><li>Table-Table — Results in a table</li></ol><p><strong>Java code for Joins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tl_q099DZABNhCKq.png" /></figure><h3>Aggregations in KStream</h3><ul><li>Remember state of the stream and hence able to perform (count, max, sum..)</li><li>Groups by key. Kafka repartitions the data, so that same key is in one partition</li><li>Reduce is like aggregation but reduce — has restriction of being same type. Aggregations don’t have restriction of begin same type, but key has to be same.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81545e9c0d2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced topics in Kafka]]></title>
            <link>https://amulyareddyk97.medium.com/advanced-topics-in-kafka-9e8b88cee54c?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e8b88cee54c</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[kafka-streams]]></category>
            <category><![CDATA[apache-kafka-tutorial]]></category>
            <category><![CDATA[debezium]]></category>
            <category><![CDATA[kafka-connect]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Fri, 20 May 2022 04:34:16 GMT</pubDate>
            <atom:updated>2022-11-11T05:26:22.180Z</atom:updated>
            <content:encoded><![CDATA[<h4>Kafka Connect</h4><h3>Kafka Connect</h3><p>To get data into and out of kafka we use kafka connect. Source is multiple databases or data from APIs or text file or kafka, sink is another database or file or kafka. Changes in source will reflect in sink as a stream in real time.</p><p>Kafka connect uses a declarative framework. i.e. connect config can be written in config files / yaml files. So don’t worry, it is simple to use.</p><ul><li><strong>Brokers</strong> store data as <strong>log files .</strong></li><li><strong>Topics</strong> in Kafka are <strong>logical groups of log files.</strong></li><li>We can use producer and consumer api for processing, but end up writing lot of common code.</li><li>So Kafka connect provides all the boiler plate code for us we can directly focus on writing connectors to different db.</li></ul><p>source — native data — [<strong>connector — connect record — converter</strong>] — bytes[] — kafka — [<strong>connector — connect record — converter</strong>] — sink</p><p>So, in total, we need a source, a source connector, a sink connector and a sink.</p><h4>Run MySQL in Docker</h4><p>Let’s start a MySQL source</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aBYZeQ8VrwtKROuDZ5jQRw.png" /><figcaption>MySQL Docker image</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s09B6CwkDbyWoYKQdJKqkw.png" /><figcaption>Image &amp; Container list</figcaption></figure><h4>Running ElasticSearch in Docker</h4><p>Lets start a ElasticSearch sink</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X5uFLCXm3PVJltrAldOOBg.png" /><figcaption>Elasticsearch docker image</figcaption></figure><pre>docker network create elastic</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*1wtugSOsy6rDl2HrV12WYg.png" /><figcaption>Elasticsearch network</figcaption></figure><pre>docker run --name es01 --net elastic -p 9200:9200 -p 9300:9300 -it docker.elastic.co/elasticsearch/elasticsearch:8.2.0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rV4LT0gGW1TCyIy9Vz5uxA.png" /></figure><h4>Running Kafka in Docker</h4><p><strong>Zookeeper</strong></p><pre>docker run -it --rm --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 quay.io/debezium/zookeeper:latest</pre><p>You can see zookeeper starting in port 2181</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A8FyqnXZ_y1YW-3AmH4t3Q.png" /><figcaption>Zookeeper Docker image</figcaption></figure><p><strong>Kafka</strong></p><pre>$ docker run -it --rm --name kafka -p 9092:9092 --link zookeeper:zookeeper quay.io/debezium/kafka:1.9</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4B2FIKce1Dfek4DWxq8_Hg.png" /><figcaption>Kafka Docker image</figcaption></figure><p>Kafka runs in 9092 and connects to zookeeper</p><h4>Kafka Connector</h4><pre>docker run -it --rm --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses --link zookeeper:zookeeper --link kafka:kafka --link mysql:mysql quay.io/debezium/connect:1.9</pre><p>Curl on localhost:8083</p><pre>curl -H &quot;Accept:application/json&quot; localhost:8083/</pre><h4>Kafka Source Connector</h4><p>Connector instance in Kafka Connect using the MySQL source connector</p><pre>curl -i -X POST -H &quot;Accept:application/json&quot; -H &quot;Content-Type:application/json&quot; localhost:8083/connectors/ -d <br>&#39;{ <br>   &quot;name&quot;: &quot;my-connector&quot;, <br>   &quot;config&quot;: { <br>     &quot;connector.class&quot;:&quot;io.debezium.connector.mysql.MySqlConnector&quot;, <br>     &quot;tasks.max&quot;: &quot;1&quot;, <br>     &quot;database.hostname&quot;: &quot;mysql&quot;, <br>     &quot;database.port&quot;: &quot;3306&quot;, <br>     &quot;database.user&quot;: &quot;root&quot;, <br>     &quot;database.password&quot;: &quot;password&quot;, <br>     &quot;database.server.id&quot;: &quot;184054&quot;, <br>     &quot;database.server.name&quot;: &quot;dbserver1&quot;, <br>     &quot;database.include.list&quot;: &quot;inventory&quot;,<br>     &quot;database.history.kafka.bootstrap.servers&quot;: &quot;kafka:9092&quot;, <br>     &quot;database.history.kafka.topic&quot;: &quot;dbhistory.inventory&quot; <br>   } <br>}&#39;</pre><h4>Kafka Sink Connector</h4><p>Connector instance in Kafka Connect using the ElasticSearch sink connector</p><pre>curl -X PUT -H  &quot;Content-Type:application/json&quot; <a href="http://localhost:8083/connectors/sink-elastic-01/config">http://localhost:8083/connectors/sink-elastic-01/config</a> \<br>    -d &#39;{<br>    &quot;connector.class&quot;: &quot;io.debezium.connector.mysql.ElasticsearchSinkConnector&quot;,<br>    &quot;topics&quot;         : &quot;orders&quot;,<br>    &quot;connection.url&quot; : &quot;<a href="http://elasticsearch:9200/">http://elasticsearch:9200</a>&quot;,<br>    &quot;type.name&quot;      : &quot;_doc&quot;,<br>    &quot;key.ignore&quot;     : &quot;false&quot;,<br>    &quot;schema.ignore&quot;  : &quot;true&quot;<br>}&#39;</pre><p>Adding data in source you see data flowing from mysql to kafka to elasticsearch</p><h3>Kafka Workers</h3><p>When you want to deploy kafka, there are two options to choose</p><h4>Two types of workers:</h4><ol><li>Standalone</li><li>Distributed (recommended)</li></ol><ul><li>Worker is a JVM process — this itself is kafka connect standalone worker</li><li>It can scale vertically adding resources, but we still have to stop and start servers. Hence loosing the info on offsets distributed worker</li><li>Configs are stored in nearest node i.e. kafka. When one node dies, other comes up, reads the info from config and picks up from there</li></ul><h3>Connect Message Transforms</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HzkGHkfFtkOf6p2yU_G_-Q.png" /></figure><h4>Example of a Message Transform</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o6mgwtiIvEiBSnQuZZPMAA.png" /></figure><p>Though Kafka connect can do small transactions it doesn’t perform stateful processing such as aggregations. Thus we use Kafka streams!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e8b88cee54c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spark in Databricks]]></title>
            <link>https://amulyareddyk97.medium.com/spark-in-databricks-c9c876c11767?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9c876c11767</guid>
            <category><![CDATA[spark-transformations]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[spark-read-and-write]]></category>
            <category><![CDATA[mapreduce]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Wed, 18 May 2022 18:31:25 GMT</pubDate>
            <atom:updated>2022-05-18T18:31:25.825Z</atom:updated>
            <content:encoded><![CDATA[<h4>Reading, writing and partitioning in Spark</h4><p>Let’s say you need to filter sentences of a file that contain a particular word.</p><ol><li>File needs to fit in the disk to process it.</li><li>Processing power of the machine is limited to the number of cores the machine has.</li></ol><p>What if the file is bigger than your disk space? Is there a way you can still work on that? For this scenario to work, all we need is a stream of data coming in, not the entire file.</p><p>First solution is to read the stream and store small chunk in the machine and process it. When all machines complete processing the result is collected. Map reduce follows similar approach. Why Spark, why not map reduce?</p><h3>Map reduce vs Spark</h3><p>Map reduce job reads data from distributed file and sent to map process. Map process writes the data to Sequential File. This data is read by reducer and writes to output file. Writing/Reading from files need lot of disk reads/writes which makes map reduce slow. With map reduce, everything has to be represented in map and reduce. It can get very tricky for filter, join, ranking functions etc.</p><p>Spark provides APIs for</p><ol><li>Spark SQL</li><li>Spark Streaming</li><li>MLlib</li><li>GraphX</li></ol><p>Let’s discuss only the basic operations in this article.</p><h3>Reading data in Spark</h3><ol><li>Download <a href="https://s3-us-west-2.amazonaws.com/databricks-corp-training/common/dataframes/state-income.csv">this</a> csv file</li><li>Import in Databricks</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKyHN9llQkGZjgBchTZdeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bpvCHu7l9Cqo6eV2-Uh85Q.png" /></figure><pre>val stateIncomeDF = spark<br>  .read                                               <br>  .option(&quot;inferSchema&quot;,&quot;true&quot;)                         <br>  .option(&quot;header&quot;,&quot;true&quot;)                           <br>  .csv(&quot;/FileStore/tables/state_income.csv&quot;)      </pre><p>To read a CSV file in DBFS</p><pre>val myDF = spark.read.option(&quot;header&quot;,&quot;true&quot;).option(&quot;inferSchema&quot;,&quot;true&quot;).csv(&quot;dbfs:/mnt/training/myfile.csv&quot;)</pre><p>To read a parquet file</p><pre>val myDF = spark.read.parquet(&quot;dbfs:/mnt/training/myfile.parquet&quot;)</pre><h3>Writing data</h3><pre>case class Employee(firstName: String, lastName: String, email: String, salary: Int)</pre><pre>  val e1 = new Employee(&quot;michael&quot;, &quot;armbrust&quot;, &quot;test@go.in&quot;, 100000)<br>  val e2 = new Employee(&quot;xiangrui&quot;, &quot;meng&quot;, &quot;test@go.in&quot;, 120000)<br>  val e3 = new Employee(&quot;matei&quot;, null, &quot;test@go.in&quot;, 140000)</pre><pre>  val employees = Seq(employee1, employee2, employee3)<br>  val df = employees.toDF()</pre><pre>df.write.option(&quot;header&quot;,&quot;True&quot;).csv(&quot;/tmp/employees.csv&quot;)</pre><p>Writing to parquet files</p><pre>df.write.parquet(&quot;/tmp/employees.parquet&quot;)</pre><h3>File Formats</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*VnHR0v9uLwIOU6sM" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/0*GX9jw3LeIjZJsEzc.png" /></figure><h4><strong>Avro File Structure</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7mtl207DkY32OKTO.png" /></figure><h4><strong>Parquet File Structure</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LLCw2s54JMPZ9blA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*PdsJusEjCG2KEil9.png" /></figure><h4><strong>ORC File Structure</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*jL9APh9ArivNHQfU.png" /></figure><h3>Partitioning</h3><h4><strong>Determine the number of shuffle partitions you want</strong></h4><ol><li>Number of partitions to be a multiple of the number of threads we have.</li><li>The second rule of thumb is that in general we want the size on disk of our partition to be 200MB when cached. So read in the data and cache it. Then look at the size per partition and make a decision to increase the size of the partitions to the next multiple of the number of threads or decrease.</li><li>Lastly, we want to use the fewest partitions possible while having a least the number of threads.</li></ol><pre>val myDF = myDF.repartition(200)</pre><p>Even if we specify 200 sometimes the partition count can be just 8. This is because spark has a lot of built in optimisations and it will factor in the number of threads and the size of the data to guess how many partitions would be best for computation on your spark cluster.</p><h3>Data Transformation</h3><p>Example of average, round, min, max</p><pre>val salaryDF = peopleDF.select(round(avg($&quot;salary&quot;)) as &quot;averageSalary&quot;, min($&quot;salary&quot;) as &quot;minSalary&quot;, max($&quot;salary&quot;) as &quot;maxSalary&quot;)</pre><h3>Joins in Spark</h3><pre>val joinedDF = df1.join(df2, df1(&quot;col&quot;) === df2(&quot;col&quot;))</pre><h4><strong>Types of Joins in Spark</strong></h4><p><strong>Shuffle joins</strong></p><ol><li>Inner shuffle join</li><li>Left shuffle join</li><li>Right shuffle join</li><li>Outer shuffle join</li><li>Cross/ Cartesian shuffle join</li></ol><p><strong>Broadcast join</strong></p><p>Broadcast join uses broadcast variables. Instead of grouping data from both DataFrames into a single executor (shuffle join), the broadcast join will send DataFrame to join with other DataFrame as a broadcast variable (so only once). As you can see, it’s particularly useful when we know that the size of one of DataFrames is small enough to be sent through the network and to fit in memory in a single executor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9c876c11767" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Changing Minikube driver from Docker to Virtual Machine]]></title>
            <link>https://amulyareddyk97.medium.com/changing-minikube-driver-from-docker-to-virtual-machine-967f1c167ac4?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/967f1c167ac4</guid>
            <category><![CDATA[minikube]]></category>
            <category><![CDATA[virtualbox]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Sun, 30 Jan 2022 06:27:41 GMT</pubDate>
            <atom:updated>2022-01-30T06:27:41.713Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Install Virtual Box</li><li>If your Minikube is pointing to Docker already, you can delete minikube</li><li>minikube delete</li><li>minikube start --vm-driver virtualbox</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=967f1c167ac4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hosting in Apache2, Nginx servers]]></title>
            <link>https://amulyareddyk97.medium.com/hosting-in-apache2-nginx-servers-f8da9ec0c220?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8da9ec0c220</guid>
            <category><![CDATA[hosting]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[apache]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Wed, 19 Jan 2022 18:16:31 GMT</pubDate>
            <atom:updated>2022-01-19T18:16:31.883Z</atom:updated>
            <content:encoded><![CDATA[<h4>Unix, Windows, Docker</h4><h3>Setup in unix</h3><p>&gt; Install apache2</p><p>&gt; Place all files in /var/www/html</p><ul><li>Above hosts pages in <a href="http://localhost/">http://localhost</a></li></ul><p>&gt; To change the base url to /test ie <a href="http://localhost/test">http://localhost/test</a></p><ul><li>Create test dir and add test.conf in etc/apache2/sites-available</li><li>File is here — etc/apache2/sites-available/test.conf</li><li>test.conf must contain the below</li></ul><pre>&lt;VirtualHost *:80&gt;<br>    ServerAdmin admin@statichtml.com<br>    ServerName statichtml.com<br>    ServerAlias <a href="http://www.statichtml.com/">www.statichtml.com</a><br>    DocumentRoot /var/www/html/test<br>    ErrorLog ${APACHE_LOG_DIR}/error.log<br>    CustomLog ${APACHE_LOG_DIR}/access.log combined<br>&lt;/VirtualHost&gt;</pre><p>&gt; sudo service apache2 reload</p><p>&gt; Hosted on <a href="http://localhost/test">http://localhost/test</a></p><p>&gt; If you don’t have unix machine but want to try this out download unix from microsoft store or you can install vmware/virtualbox, put the unix image and proceed or you can dual boot your system with limux. You can also use docker image with apache image.</p><h3>Setup in Windows</h3><p>&gt; Install XAMPP</p><p>&gt; Stop any port listening at 80</p><p>&gt; Start Apache server</p><p>&gt; goto <a href="http://localhost/">http://localhost</a></p><p>&gt; Place all static html file in a folder (foldername)</p><p>&gt; Add your folder in htdocs folder in C:/xampp/htdocs</p><p>&gt; goto <a href="http://localhost/foldername">http://localhost/&lt;foldername</a>&gt;</p><h3>Setup Nginx in Unix</h3><p>&gt; Install nginx</p><p>&gt; /var/www place index.html</p><p>&gt; restart nginx</p><p>&gt; goto localhost</p><p>&gt; take nginx.conf backup and create nginx.conf with following</p><pre>server {<br>        listen 80;<br>        server_name test.jasonrigden.com;<br>        root /home/jason/www;<br>        index index.html;<br>}</pre><p>&gt; restart nginx</p><p>&gt; goto localhost</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8da9ec0c220" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Struts 2]]></title>
            <link>https://amulyareddyk97.medium.com/struts-2-ca46cbde29c6?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca46cbde29c6</guid>
            <category><![CDATA[jsp]]></category>
            <category><![CDATA[action]]></category>
            <category><![CDATA[interceptors]]></category>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[struts2]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Sun, 25 Jul 2021 15:18:59 GMT</pubDate>
            <atom:updated>2021-07-25T15:18:59.421Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 1 — Getting Started</h3><ol><li>Install Tomcat Server</li><li>Download Struts 2</li><li>Create a dynamic web project in Eclipse</li><li>Include struts jar files that are downloaded</li><li>Create struts.xml file</li><li>Write action classes</li><li>Inside the struts.xml file, mention struts dtd and in &lt;struts&gt; tag mention package tag</li><li>Inside the package tag, mention mapping between action and request URL</li><li>Write the business logic within execute() method that returns a string</li><li>The return string is used to route between JSPs</li><li>Create JSP file</li><li>Inside mapping between action and request URL in struts.xml file, mention the JSP files to be displayed based on the return string by action class</li><li>We need not restart the server if changes are made in the action class or JSP</li><li>Restart the server if we have an XML change</li><li>Modify web.xml file</li><li>Mention filter and filter-mapping</li><li>For nested endpoints, use namespace in package tag</li><li>For JSP and action communication, declare taglib in the JSP file. Make the variables as member variables in the action class (not as local variables). Write getter and setter for it</li><li>taglib has a prefix prefix=&quot;s” . We can access the member variables using s:property tag with value attribute as a member variable</li><li>These tags are called struts tags</li><li>Accessing member variables is not thread-safe</li></ol><h3>Part 2 — Core Concepts</h3><p>Consider servlet analogy (different from struts way of handling)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*G3gjSFXGRBWTGJh7L77yog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*a15mDnpFhv-wG5fT7wcfJw.png" /></figure><ol><li>To make it thread-safe, remove the member variables and create a separate space for each request called request object which contains the member variables</li><li>Request objects are available in JSPs as well</li><li>Request object vs session — pretty obvious</li><li>This problem is not seen in struts</li><li>For each request, a new action object is created. Struts handle this.</li><li>Action object for every request is saved inside the valuestack</li><li>JSP accesses this member variable by <strong>VALUESTACK</strong></li><li>Valuestack acts as a virtual object. ie. Member variables are isolated from objects. We don&#39;t access the variables with obj.var but with valuestack.var</li><li>Since the members do not have object association there may be conflicts. This is simply handled by looking top-down, and whatever matches first is returned</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*m02ppP7guFgXwxkI1xCSkA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*aljAIQ2MbLNHZkmfjWCpFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*XXv1yVxYb3m_XCLnVRhd9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*2wMFWcHKHxxZDc26QbEiig.png" /></figure><p>10. Accessing input parameters — Get query parameter — Define member variable and use it. It is understood by struts. Interceptors work behind the scenes</p><p>11. Post request — Write form, input tags with the action attribute to endpoint</p><p>12. Instead of form, input tags, use struts 2 tags. s:form, s:textfield, s:submit</p><p>13. We can split the struts.xml file into multiple XML files, but the main point is struts.xml. Use include tag</p><p>14. We can use wildcards, dummy classes (i.e. no action class)</p><p>15. Use extends action support to override validate() function and addFieldError()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*2f-dtAP92iQuw9wxN8GpVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*9fq4eZKV5wOkGRaS7GYgeA.png" /></figure><p>16. For 1 action for every operation, we have to create 1 action class if we use default execute(). We can use someOtherFunction() as well by mentioning method attribute in &lt;action&gt; tag so that we can use multiple operations within a single action class</p><p>17. Use Models — as usual</p><p>18. ModelDriven — implements ModelDriven — override getModel() function</p><h3>Part 2 — Advanced Concepts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*Rj7ZZrN_HoSWUN9FLXF8Sg.png" /><figcaption>Interceptors</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*gnRQ0r2yWqbZYCYgtdCR_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*suEptF4_cFnE-R2Z_Yr5cQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*R71gB1RyFKR-tXgxmsAE2g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca46cbde29c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OBIEE 11g]]></title>
            <link>https://amulyareddyk97.medium.com/obiee-11g-b12137e347ff?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/b12137e347ff</guid>
            <category><![CDATA[oracle-apex]]></category>
            <category><![CDATA[obiee]]></category>
            <category><![CDATA[obiee-training]]></category>
            <category><![CDATA[bi-publisher]]></category>
            <category><![CDATA[oracle-bi]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Sat, 24 Jul 2021 19:34:25 GMT</pubDate>
            <atom:updated>2021-07-24T19:34:25.304Z</atom:updated>
            <content:encoded><![CDATA[<p>Dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*1PjxOQlx-LIpG41asnka5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*f46VgzLIGQkxL-n8-frePw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*6Nmlm-FJV_GGQ5Grv0G7EQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*X0tanHklH7qfzmmmYbuqkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*69BheN8TVI1LmAFOCXyoOg.png" /></figure><p>Analysis</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*jvhL9F023oYKSFIBg6fWJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*WusMqPBMpEMzrE8NBZodJQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*SBQkEGYsU58GRtF6W_THZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*0oZ9MBWe23eZG2AHA7N23w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*aS_9evfFtBaJWv-3y3Wxow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*cBUlDvABW56OZzJkeD4k_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*aMsO98aM1KDvQ_lGIqqkbg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*Nq7qKDUmH1rvaofFYki52A.png" /><figcaption>Format Revenue Column</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*uwWrfMNxjQ_V4cx2sTX0kg.png" /></figure><p>Conditional Format</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*3xmrleFqGRzNIznWy35C4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*hzxFTTQoL5Idg4nTD-J6aA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*8VKthFII6htrIA6EhlroeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*K7QiBSMj0073aXYa6dHXZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*opkGf9b3kOJOuzWD6EF51A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*3s0qOzQ0f7We0kR3gTEXIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*8r_PLHToerLOaRCLcl6Myw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*8i29spJNtnhkitL-WKglOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*T2qL8JxEYIAKUNc_WMgJEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*bfvb8qaT1e3WWXzMa66sww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*NvGYrFGH6eE_XGOZvQJWdA.png" /><figcaption>KPI states</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*4rllAOsipDaEMljlQ1w5aw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*o59fWSC_RxlIabYtcGW-xg.png" /></figure><p>KPI Watchlist</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*Jba6d52y_6b3skrXMNm_Lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*Sk8K9yBP5qJz7NSlImm39w.png" /><figcaption>BI Publisher</figcaption></figure><h3>APEX</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*aav3Hle-0IQ34VLwFwGEZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*-2RlmEgEn5avt_NyMxZFpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*KfBuu4jHQFcYVqQ3LWm3Cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*j7gu1tRf-ziDpIWA-v2AhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*saqIg-Yn_dk1CLVquSTDbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*RNImiM45_EFHqn9P7EP_Og.png" /></figure><p>Output pdf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*Val6aFXcLM0dnzU_ij4RHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*lQ-Ww-nyB7GfmH_ogxbYkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*fdyy7nqRf0HHXZCWRpL0EQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*8l6PH6Q9Md5sLeRFvESCPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*mYwk0ZaPDWvnEMrz8hRNNQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*HedlUVylrKL_UDHW2ddzZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*JtyCDbjxWgb_GwfQUXjSwA.png" /><figcaption>Create Region</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*Y9ksh8bj4jNJJBRyr4-1OQ.png" /><figcaption>Button</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*FTDWRMWJSh3US2HGT5i7cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*4LYOSRF402RC2yXYJ_17Eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*_KGEkaZpB9vW3uaDQHPbDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*t7-yMcL9a1HYhKna1zUKVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*X9TUEoMUNgHpa4tUGLCJ7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*vfK7re6YANOm_w-fCaNrlw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b12137e347ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Fundamentals — Exam AZ900]]></title>
            <link>https://amulyareddyk97.medium.com/azure-fundamentals-exam-az900-775b2494256c?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/775b2494256c</guid>
            <category><![CDATA[az900]]></category>
            <category><![CDATA[azure-fundamentals]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Sun, 23 May 2021 05:33:41 GMT</pubDate>
            <atom:updated>2021-05-23T05:33:41.942Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure Fundamentals — Exam AZ900</h3><h4>A reference before exam</h4><h3>Why Azure?</h3><ol><li>be ready for future</li><li>build on ur terms</li><li>trust ur network</li><li>operate hybrid seamlessly</li></ol><p>Market place — partner solutions optimized to run in azure, over 8000 solutions so far</p><p>Infra — <br>uses virtualization<br>os and hardware separated using hypervisor</p><p>Each server rack is attached with fabric controller software<br>Multiple server racks are connected through network switch<br>Orchestrator is responsible to get the requests through web api and sends it to switch that chooses best rack<br>Once the request reaches server, it will create the requested resource in a vm</p><p>10 broad categories:<br>compute — scale compute<br>network — on prem experience, vpn, load balancing<br>storage — disk, file, blob, archive, queue<br>mobile — scale application, native experience, xamarin and use cognitive services<br>databases — db<br>iot — connect, monitor, manage iot assets and use <br>web — scale, build, deploy services<br>big data — analyse big data and make sense<br>ai — build, deploy models<br>devops — ci/cd</p><p>differences between categories of cloud services<br>differences between types of cloud computing</p><p>cloud models / types of cloud computing — public, private, hybrid<br>cloud services / categories of cloud services — IaaS, PaaS, SaaS</p><p>CapEx vs OpEx</p><p>Cloud computing is a consumption-based model</p><p>Resources<br>Resource groups<br>Subscriptions<br>Management groups</p><p>Resource manager — deploy and manage services; takes requests, authenticates and authorizes and does the respective action; locking, RBAC, read only access controls<br>resource manager template is JSON</p><p>A region is a geographical area with multiple datacenters<br>AZ for HA<br>Region pair</p><p>Zonal services: You pin the resource to a specific zone (for example, VMs, managed disks, IP addresses).<br>Zone-redundant services: The platform replicates automatically across zones (for example, zone-redundant storage, SQL Database).</p><p>Azure Resource Manager is the deployment and management service for Azure. <br>It provides a management layer that enables you to create, update, and delete resources in your Azure account. You use management features like access control, locks, and tags to secure and organize your resources after deployment.</p><p>Azure account, management group, subscription, resource group, resource</p><p>Management groups<br>1000 subscriptions<br>6 levels deep<br>1 parent, multiple children<br>all subscriptions and management groups are within a single hierarchy in each directory</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=775b2494256c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Network Policy & Config Maps]]></title>
            <link>https://amulyareddyk97.medium.com/kubernetes-network-policy-config-maps-39386b301a8d?source=rss-3e592ab2b117------2</link>
            <guid isPermaLink="false">https://medium.com/p/39386b301a8d</guid>
            <category><![CDATA[network-policies]]></category>
            <category><![CDATA[kubernetes-configmap]]></category>
            <category><![CDATA[kubernetes-networking]]></category>
            <category><![CDATA[configmap]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Amulya Reddy Konda]]></dc:creator>
            <pubDate>Tue, 23 Mar 2021 03:30:51 GMT</pubDate>
            <atom:updated>2021-03-23T03:36:24.445Z</atom:updated>
            <content:encoded><![CDATA[<h3>Network Policy</h3><pre><strong>apiVersion</strong>: networking.k8s.io/v1<br><strong>kind</strong>: NetworkPolicy<br><strong>metadata</strong>:<br>  <strong>name</strong>: test-network-policy<br>  <strong>namespace</strong>: default<br><strong>spec</strong>:<br>  <strong>podSelector</strong>:<br>    <strong>matchLabels</strong>:<br>      <strong>role</strong>: db<br>  <strong>policyTypes</strong>:<br>  - Ingress<br>  - Egress<br>  <strong>ingress</strong>:<br>  - <strong>from</strong>:<br>    - <strong>ipBlock</strong>:<br>        <strong>cidr</strong>: 172.17.0.0/16<br>        <strong>except</strong>:<br>        - 172.17.1.0/24<br>    - <strong>namespaceSelector</strong>:<br>        <strong>matchLabels</strong>:<br>          <strong>project</strong>: myproject<br>    - <strong>podSelector</strong>:<br>        <strong>matchLabels</strong>:<br>          <strong>role</strong>: frontend<br>    <strong>ports</strong>:<br>    - <strong>protocol</strong>: TCP<br>      <strong>port</strong>: 6379<br>  <strong>egress</strong>:<br>  - <strong>to</strong>:<br>    - <strong>ipBlock</strong>:<br>        <strong>cidr</strong>: 10.0.0.0/24<br>    <strong>ports</strong>:<br>    - <strong>protocol</strong>: TCP<br>      <strong>port</strong>: 5978</pre><h3>Config Maps</h3><pre><strong>apiVersion</strong>: v1<br><strong>kind</strong>: ConfigMap<br><strong>metadata</strong>:<br>  <strong>name</strong>: game-demo<br><strong>data</strong>:<br>  <em># property-like keys; each key maps to a simple value</em><br>  <strong>player_initial_lives</strong>: &quot;3&quot;<br>  <strong>ui_properties_file_name</strong>: &quot;user-interface.properties&quot;<br><br>  <em># file-like keys</em><br>  <strong>game.properties</strong>: |<em><br>    enemy.types=aliens,monsters<br>    player.maximum-lives=5</em>    <br>  <strong>user-interface.properties</strong>: |<em><br>    color.good=purple<br>    color.bad=yellow<br>    allow.textmode=true</em></pre><p>The KUBECONFIG environment variable holds a list of kubeconfig files.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39386b301a8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>