<?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 Abdullatif Topçu on Medium]]></title>
        <description><![CDATA[Stories by Abdullatif Topçu on Medium]]></description>
        <link>https://medium.com/@latiftopcu?source=rss-550bc145df51------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TJofn8PTPEOmBceb</url>
            <title>Stories by Abdullatif Topçu on Medium</title>
            <link>https://medium.com/@latiftopcu?source=rss-550bc145df51------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:21:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@latiftopcu/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[Serverless Mobile App Development -1]]></title>
            <link>https://medium.com/geekculture/serverless-mobile-app-development-1-4191917704a?source=rss-550bc145df51------2</link>
            <guid isPermaLink="false">https://medium.com/p/4191917704a</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Abdullatif Topçu]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 13:44:58 GMT</pubDate>
            <atom:updated>2021-09-27T06:36:57.587Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a two-part article series. The second part of this series which is about AWS Services and Backend is on the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*7f0Y6xLan3UObT-wYNDmZw.png" /></figure><h3>React Native - AWS Lambda - Dynamodb - S3</h3><p>Hi There,</p><p>In this article, I will introduce a mobile application that I made in the past. I’m thinking of moving forward by showing some theory and some code. I hope it will be useful to someone.</p><p>I will not teach React Native or AWS Lambda in this article. People who need it can look at different resources.</p><p>Again, in this article, I will not explain the details one by one. Such a detailed explanation means a long series. Unfortunately, I don’t have that much time right now, but hopefully in the future.</p><p>I am writing this article for those who know React Native and AWS at least at the entry-level. Only AWS knowledge is sufficient. No need to know Lambda. In this article, I will be showing more codes. There will be no narration :(</p><p>Please contribute with your questions and suggestions. Good reading</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*bb5nYqY-y2fT-uiIZRpcWQ.png" /></figure><h3>The App</h3><p>This application is developeda solution for the education sector. I developed a mobile application where students preparing for exams can ask questions. After the student asks a question, a notification is sent to the phone of the relevant teacher according to the selected lesson type. Then the teacher solves the question and uploads it to the application. The student receives a solution notification.</p><h3>Why did I use React Native in the application?</h3><p>In recent years, React Native has started to make a name for itself among the libraries used for mobile application development. Writing with JS, compiling common code for Android and IOS, and simplicity are the highlights for me. If you like JS or TS, React Native is for you.</p><h4>The React Native Template That I selected: Now UI React Native Template</h4><p>Design is important in mobile application development. We, the developers are not designers and I think it is best to leave this job to the experts. For this reason, I found and used the attached template among the free react native templates I was looking for on the web. It is very robust, clear, extendable, and easy to learn. I highly recommend it.</p><p><a href="https://demos.creative-tim.com/now-ui-react-native/">Now UI React Native by Creative Tim</a></p><h3><strong>Project Code Repo</strong></h3><p>You may find and download <a href="https://github.com/latift/bulutasor">the codes of the project here</a>. Contributions are welcome as well.</p><h3>React Native Folder Structure and Important Files</h3><p>The file structure that comes when you create an empty React Native project is quite sufficient for general projects. Two of the important files in a react native project are <strong>package.json, package-lock.json </strong>files. These are the files that contain the list and versions of the js libraries you will use in your react-native project. One Note; Before starting a React Native project, you need to install a package manager. I use <a href="https://www.npmjs.com/"><em>Node Package Manager</em></a> in my project.</p><p>You may find the whole React-Native related codes under the folder <a href="https://github.com/latift/bulutasor/tree/master/BulutaSorFrontend2"><em>bulutasor/BulutaSorFrontend2</em></a>. Here are the folders that should be examined:</p><p><a href="https://github.com/latift/bulutasor/tree/master/BulutaSorFrontend2/screens"><strong>screens</strong></a>: All screen codes are under this folder.</p><p>Sample Screens Code:</p><pre>/* eslint-disable no-console */<br>import React from &#39;react&#39;;<br>import {<br>  StyleSheet, Dimensions, ScrollView, Alert<br>} from &#39;react-native&#39;;// cache app images<br><br>// import * as Notifications from &#39;expo-notifications&#39;;<br>import { connect } from &#39;react-redux&#39;;<br>import {<br>  Block, Text, theme, withGalio<br>} from &#39;galio-framework&#39;;<br>import AnimatedLoader from &#39;react-native-animated-loader&#39;;<br>import { Card } from &#39;../components&#39;;<br><br>const { width } = Dimensions.get(&#39;screen&#39;);<br><br>class StudentsSolvedQuestionListScreen extends React.Component {<br>  constructor(props) {<br>    super(props);<br>    this.state = {<br>      visible: false,<br>      error: null,<br>    };<br>  }<br><br>  componentDidMount() {<br>    this.state.visible = false;<br>    this.state.error = null;<br>  }<br><br>  renderArticles = () =&gt; {<br>    const { error } = this.state;<br>    const { questions } = this.props;<br>    return (<br><br>      &lt;ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.articles}&gt;<br>        &lt;Block flex&gt;<br>          {error ? &lt;p&gt;{error.message}&lt;/p&gt; : null}<br>          {<br>            (Array.isArray(questions))<br>              ? questions.filter((item) =&gt; item.state === &#39;passive&#39;).map(<br>                (question) =&gt; &lt;Card item={question} key={question.s3Key} cevapGoster=&quot;true&quot; horizontal /&gt;<br>              )<br>              : (<br>                &lt;Text&gt;<br>                  Henüz çözülmüş bir sorun yok.<br>                &lt;/Text&gt;<br>              )<br>          }<br>        &lt;/Block&gt;<br>      &lt;/ScrollView&gt;<br>    );<br>  };<br><br>  render() {<br>    const { visible } = this.state;<br>    return (<br>      &lt;ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.articles}&gt;<br>        &lt;Block flex style={styles.home}&gt;<br>          &lt;Block center style={{ flex: 30 }}&gt;<br>            &lt;AnimatedLoader<br>              visible={visible}<br>              overlayColor=&quot;rgba(255,255,255,0.75)&quot;<br>              source={require(&#39;./spinner.json&#39;)}<br>              animationStyle={styles.lottie}<br>              speed={1}<br>            /&gt;<br>            {this.renderArticles()}<br>          &lt;/Block&gt;<br>        &lt;/Block&gt;<br>      &lt;/ScrollView&gt;<br>    );<br>  }<br>}<br><br>const styles = StyleSheet.create({<br>  home: {<br>    width,<br>  },<br>  articles: {<br>    width: width - theme.SIZES.BASE * 2,<br>    paddingVertical: theme.SIZES.BASE,<br>    paddingHorizontal: 2,<br>    fontFamily: &#39;montserrat-regular&#39;,<br>  },<br>});<br><br>function mapStateToProps(storeState) {<br>  return {<br>    userName: storeState.userName,<br>    password: storeState.password,<br>    questions: storeState.questions<br>  };<br>}<br><br>function mapDispatchToProps() {<br>  return {<br>    // setQuestions()<br>  };<br>}<br>export default withGalio(connect(mapStateToProps, mapDispatchToProps)(StudentsSolvedQuestionListScreen));</pre><p><a href="https://github.com/latift/bulutasor/tree/master/BulutaSorFrontend2/components"><strong>components</strong></a>: Under this folder, you can find the component library that comes with the React Native template.</p><pre>import React, { useState } from &#39;react&#39;;<br>import {<br>  Alert,<br>  Modal,<br>  StyleSheet,<br>  TouchableWithoutFeedback,<br>  Keyboard,<br>  View,<br>  Dimensions,<br>  TouchableOpacity,<br>} from &#39;react-native&#39;;<br>import {<br>  Text, theme, Block<br>} from &#39;galio-framework&#39;;<br>import { useNavigation } from &#39;@react-navigation/native&#39;;<br>import { useSelector } from &#39;react-redux&#39;;<br>import ArButton from &#39;./Button&#39;;<br>import Icon from &#39;./Icon&#39;;<br>import nowTheme from &#39;../constants/Theme&#39;;<br><br>const DismissKeyboard = ({ children }) =&gt; (<br>  &lt;TouchableWithoutFeedback onPress={() =&gt; Keyboard.dismiss()}&gt;{children}&lt;/TouchableWithoutFeedback&gt;<br>);<br><br>const { width, height } = Dimensions.get(&#39;screen&#39;);<br><br>const SessionBar = (props) =&gt; {<br>  const [modalVisible, setModalVisible] = useState(0);<br>  const user = useSelector((state) =&gt; state.user);<br>  const navigation = useNavigation();<br>  let userType = &#39;Öğrenci&#39;;<br>  const { isTeacher } = user;<br>  if (isTeacher) {<br>    userType = &#39;Öğretmen&#39;;<br>  }<br>  console.log(`isTeacher:${isTeacher}`);<br>  console.log(`userType:${userType}`);<br>  return (<br>    &lt;Block&gt;<br>      &lt;Modal<br>        animationType=&quot;slide&quot;<br>        visible={modalVisible}<br>        style={styles.modalView}<br>        transparent<br>        onRequestClose={() =&gt; {<br>          Alert.alert(&#39;Modal has been closed.&#39;);<br>        }}<br>      &gt;<br>        &lt;View<br>          style={{<br>            flex: 1,<br>            justifyContent: &#39;center&#39;,<br>            alignItems: &#39;center&#39;,<br>            margin: 80,<br>            padding: 80,<br>            borderColor: nowTheme.COLORS.BLACK,<br>            borderRadius: 10,<br>            backgroundColor: nowTheme.COLORS.WHITE,<br>          }}<br>        &gt;<br>          &lt;ArButton<br>            color=&quot;info&quot;<br>            round<br>            style={styles.createButton}<br>            onPress={() =&gt; { setModalVisible(false); }}<br>            title=&quot;Kapat&quot;<br>          &gt;<br>            &lt;Text<br>              style={{ fontFamily: &#39;montserrat-bold&#39; }}<br>              size={14}<br>              color={nowTheme.COLORS.WHITE}<br>            &gt;<br>              Kapat<br>            &lt;/Text&gt;<br>          &lt;/ArButton&gt;<br>          &lt;Block&gt;<br>            &lt;Text<br>              size={16}<br>              muted<br>              style={{<br>                width: &#39;100%&#39;,<br>                color: &#39;#2c2c2c&#39;,<br>                fontWeight: &#39;bold&#39;,<br>                lineHeight: 20,<br>                fontSize: 19,<br>                fontFamily: &#39;montserrat-bold&#39;,<br>                margin: 10,<br>                zIndex: 2,<br>                textAlign: &#39;center&#39;,<br>              }}<br>            &gt;<br>              {userType}<br>            &lt;/Text&gt;<br>            &lt;Text<br>              size={16}<br>              muted<br>              style={{<br>                width: &#39;100%&#39;,<br>                color: &#39;#2c2c2c&#39;,<br>                fontWeight: &#39;bold&#39;,<br>                lineHeight: 20,<br>                fontSize: 19,<br>                fontFamily: &#39;montserrat-bold&#39;,<br>                margin: 10,<br>                zIndex: 2,<br>                textAlign: &#39;center&#39;,<br>              }}<br>            &gt;<br>              {user.userName}<br>            &lt;/Text&gt;<br>          &lt;/Block&gt;<br>          &lt;ArButton<br>            color=&quot;primary&quot;<br>            round<br>            style={styles.createButton}<br>            onPress={() =&gt; { setModalVisible(false); logout(); navigation.navigate(&#39;LoginScreen&#39;); }}<br>            title=&quot;Oturumu Kapat&quot;<br>          &gt;<br>            &lt;Text<br>              style={{ fontFamily: &#39;montserrat-bold&#39; }}<br>              size={14}<br>              color={nowTheme.COLORS.WHITE}<br>            &gt;<br>              Oturumu Kapat<br>            &lt;/Text&gt;<br>          &lt;/ArButton&gt;<br>        &lt;/View&gt;<br>      &lt;/Modal&gt;<br>      &lt;Block flex row right&gt;<br>        &lt;TouchableOpacity<br>          style={[styles.profileButton]}<br>          onPress={() =&gt; {<br>            setModalVisible(true);<br>          }}<br>        &gt;<br>          &lt;Text&gt;{user.userName}&lt;/Text&gt;<br>          &lt;Icon<br>            family=&quot;NowExtra&quot;<br>            size={16}<br>            name=&quot;basket2x&quot;<br>            color={nowTheme.COLORS.WHITE}<br>          /&gt;<br><br>        &lt;/TouchableOpacity&gt;<br>      &lt;/Block&gt;<br>    &lt;/Block&gt;<br>  );<br>};<br>export default SessionBar;<br><br>const styles = StyleSheet.create({<br>  registerContainer: {<br>    marginTop: 55,<br>    width: width * 0.9,<br>    height: height &lt; 812 ? height * 0.8 : height * 0.8,<br>    backgroundColor: nowTheme.COLORS.WHITE,<br>    borderRadius: 4,<br>    shadowColor: nowTheme.COLORS.BLACK,<br>    shadowOffset: {<br>      width: 0,<br>      height: 4,<br>    },<br>    shadowRadius: 8,<br>    shadowOpacity: 0.1,<br>    elevation: 1,<br>    overflow: &#39;hidden&#39;,<br>  },<br><br>  centeredView: {<br>    flex: 1,<br>    justifyContent: &#39;flex-start&#39;,<br>    alignItems: &#39;center&#39;,<br>    margin: 20,<br>    backgroundColor: nowTheme.COLORS.WHITE,<br>    padding: 20,<br>  },<br>  modalView: {<br>    backgroundColor: theme.COLORS.WHITE,<br>    borderRadius: 20,<br>    margin: 35,<br>    padding: 35,<br>    height: height * 0.6,<br>    width: width * 0.6,<br>    justifyContent: &#39;flex-start&#39;,<br>    alignItems: &#39;stretch&#39;,<br>    borderColor: theme.COLORS.BLACK,<br><br>  },<br>  openButton: {<br>    backgroundColor: theme.COLORS.WHITE,<br>    borderRadius: 20,<br>    padding: 10,<br>    elevation: 2<br>  },<br>  title: {<br>    flex: 2,<br>    height: height * 0.07,<br>    alignItems: &#39;center&#39;,<br>    justifyContent: &#39;center&#39;,<br>  },<br>  titleTextStyle: {<br>    fontWeight: &#39;400&#39;,<br>    fontSize: theme.SIZES.FONT * 2,<br>    color: theme.COLORS.BLACK,<br>    paddingTop: 20<br>  },<br><br>  createButton: {<br>    width: width * 0.5,<br>    marginTop: 25,<br>    marginBottom: 40,<br>  },<br><br>  profileButton: {<br>    padding: 12,<br>    position: &#39;relative&#39;,<br>    width: width * 0.2,<br>  },<br><br>  cikisButton: {<br>    padding: 12,<br>    position: &#39;relative&#39;,<br>    width: width * 0.2,<br>  }<br>});</pre><p><a href="https://github.com/latift/bulutasor/tree/master/BulutaSorFrontend2/android"><strong>Android </strong></a><strong>and</strong> <a href="https://github.com/latift/bulutasor/tree/master/BulutaSorFrontend2/ios"><strong>IOS</strong></a><strong>: </strong>In these folders, you can find environment-specific configurations produced from react-native codes during compilation. Some third-party library uses require operating-system-specific settings. In this case, the codes we will intervene in are here. Under normal circumstances, we do not make any development in these folders.</p><p><a href="https://github.com/latift/bulutasor/tree/master/BulutaSorFrontend2/appium"><strong>Appium</strong></a>: When we develop a mobile application, we need to test our application on different devices. Because in general, our application may work very differently depending on the operating system model and version, memory, and screen size, or worse, it may not work. :( It can be very useful to test our application in a device farm in order to catch this situation before the end-users experience it in our application. I definitely recommend it. You can find <a href="https://aws.amazon.com/tr/device-farm/"><strong><em>AWS Device Farm</em></strong></a> here.</p><h3>Redux</h3><p>Redux is a data store. It’s usually good practice to separate data with application screens. In this way, data consistency is ensured between screens, or between different components on the same screen. Redux is now a must-use component in JS libraries such as React Native, Vue, or Angular. You can access the details from the addresses below.</p><ul><li><a href="https://redux.js.org/">Redux - A JS library for predictable and maintainable global state management | Redux</a></li><li><a href="https://www.digitalocean.com/community/tutorials/react-react-native-redux">Introduction to Using Redux in a React Native App | DigitalOcean</a></li></ul><p>And one Turkish Article From <a href="https://zaferayan.medium.com/">Zafer Ayan</a></p><p><a href="https://zaferayan.medium.com/react-native-instagram-redux-kullan%C4%B1m%C4%B1-10e29c8e3f1b">React Native Instagram — Redux Kullanımı</a></p><p><strong>Conclusion</strong></p><p>In this article, I tried to present my mobile App’s react-native Code, maybe it will inspire someone. In the second article of this series, I will explain Backend.</p><p>Wish you all a lovely life</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4191917704a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/serverless-mobile-app-development-1-4191917704a">Serverless Mobile App Development -1</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Monolithic App’s Refactor Work, Microservices, And Containerize]]></title>
            <link>https://medium.com/@latiftopcu/refactor-of-a-monolithic-microservices-and-containerize-b6e3fe2e48b5?source=rss-550bc145df51------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6e3fe2e48b5</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[architectural-refactoring]]></category>
            <category><![CDATA[monolithic]]></category>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Abdullatif Topçu]]></dc:creator>
            <pubDate>Tue, 31 Aug 2021 12:09:10 GMT</pubDate>
            <atom:updated>2021-08-31T12:29:34.676Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Architectural improvement work we did in a Monolithic Application, Migrating to Microservice Architecture and Container Environment Story</em></p><p>In this article, I will share the refactor works that I have done in a project in short articles, with the thought that it may be of interest to someone and give new ideas. But first, let me talk about the technology of the application. Of course, I will do this explanation without entering the domain information of the application.</p><p><strong>Architecture and Technology:</strong> There are services written in Angular and java on the front and python on the backend. The database is PostgreSQL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9JBKaeC_WBmFJAOTTMQCow.png" /></figure><p><strong>Angular Improvements:</strong></p><ul><li>Code written on each page has been translated into components. Pages have been made to use components.</li><li>The existing backend call points within the screens have been replaced with Angular Service components.</li><li>During the Service call phase, the interceptor was written for the codes that should be made jointly for all requests. Common header information is added to each request through this interceptor. In addition, the endpoint of the request made through this interceptor could be determined dynamically. While some requests were sent to the endpoint on the user’s own machine, other requests could be sent to the common endpoint in the backend.</li><li>When the service calls are answered, the response interceptor is being developed, which contains the codes that will always run regardless of the service.</li><li><strong>Redux:</strong> Redux is a local store independent of Angular. Data communication between pages or between different parts of the same page is done via redux. Components are written stateless and contain only the view code, while the data displayed by these views are kept in redux. We made data management easier by making frontend codes work over redux.</li></ul><p><strong>Java Improvements and Migrating to Microservice Architecture</strong></p><ul><li>Due to domain restrictions, the java codes created in the project were in the form of a single monolithic web app. We divided this code into microservices according to domain content. At the end of this study, while the java project that landed on the user’s machine became very small, many microservices emerged. We built all of these microservice projects as <strong>springboot </strong>projects.</li><li>We have updated each microservice to have controller and business logic layers within itself.</li><li>We created configuration files for each microservice and kept the environment configurations here. This was important in the dockerize phase afterward.</li><li><strong>What we have achieved:</strong> At the end of this work, we have created over ten microservices. Microservice architecture has many advantages. There are many articles on this subject. I won’t go into all the benefits here, but I’ll mention my favorite benefit. <strong>Clean Code</strong>. At the end of this study, the <strong>legibility, cleanliness, and simplicity </strong>of each of the small but numerous micro java projects we produced were at a high level.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ZtOVNroXzVDgi1FPL-MXbQ.gif" /></figure><p><strong>Operation on a Container</strong></p><ul><li>We have prepared docker files for each of our microservice projects.</li><li>Microservice architecture and Container technology are powerful together. When we divide a single existing monolithic project into many small-scale services, the deployment of these services becomes an important task. At this point, we containerized our services using Kubernetes. The benefits of using a container like Docker and a container orchestrator like Kubernetes are huge. Below is an article detailing this issue.</li></ul><p><a href="https://medium.com/platformer-blog/benefits-of-kubernetes-e6d5de39bc48">Benefits of Kubernetes</a></p><p><a href="https://istio.io/"><strong>Istio</strong></a></p><ul><li>Finally, the last component of our new architecture was Istio. Istio is a service mesh library. You can view the details <a href="https://istio.io/">here</a>.</li><li>An important component of the Microservice architecture is the API Gateway. The aim here is that no matter how many microservices are in the backend, the frontend needs to go to a single endpoint without being aware of them. We used Istio’s VirtualService and Gateways for this.</li><li>Istio runs a side-car alongside each of our microservices. Through this side-car, all traffic between services can be monitored and managed without any extra installation on the services.</li><li><a href="https://www.jaegertracing.io/"><strong>Jaeger</strong></a><strong>:</strong> We installed Istio’s jaeger plugin on Kubernetes. In this way, we were able to see which services were circulating and how much time was spent on which services until a request from the frontend was answered. Thanks to the Jaeger interface, we were able to monitor which of our long-lasting requests were and in which services they spent the most time.</li><li><a href="https://kiali.io/"><strong>Kiali:</strong></a> Again thanks to Istio’s side-car technology, we were able to monitor the system live over Kiali. This monitor screen is my favorite. On this screen, we can see the illustration of calling services live.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*iBxZ0pFwp99uJ89MLIgjrA.gif" /></figure><p><strong>Conclusion</strong></p><ul><li>Instead of a monolithic application, we have achieved a distributed architecture that works on Kubernetes with Istio support. This architecture gave us great advantages in the project. Two of the most important of these advantages are:</li><li>Clean, Simple and Scalable Code,</li><li>Highly Scalable System</li><li>The advantages of distributed architecture are many. The configurations that need to be done to obtain them, the libraries that need to be used (Redis, Istio, Keycloak, etc.), and the concepts that need to be learned (Gateway, Service Security, etc.) are also too many. Every day, new libraries and new approaches continue to emerge that will make it easier to implement this architecture. In order to keep the article short, I did not mention the <strong>Keycloak </strong>and <strong>Redis </strong>components that we use in our architecture. These are among the important components of this issue as well.</li></ul><p>Stay Healthy</p><p><strong>Thanks To Project Team:</strong> <a href="https://medium.com/u/b5e4cada7b96">Furkan Yavuz</a>, <a href="https://medium.com/u/21a24903d545">Vedat Yurt</a> and others</p><p>Additional Reads:</p><ul><li><a href="https://medium.com/hashmapinc/the-what-why-and-how-of-a-microservices-architecture-4179579423a9">The What, Why, and How of a Microservices Architecture</a></li><li><a href="https://medium.engineering/microservice-architecture-at-medium-9c33805eb74f">Microservice Architecture at Medium</a></li><li><a href="https://medium.com/swlh/getting-started-with-istio-524628c025">Getting Started With Istio</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6e3fe2e48b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monolitik Bir Projenin Refactor Çalışması, Mikroservis Mimarisi ve Konteynırlaştırma]]></title>
            <link>https://medium.com/@latiftopcu/monolitic-bir-projenin-refactor-%C3%A7al%C4%B1%C5%9Fmas%C4%B1-mikroservis-mimarisi-ve-containerla%C5%9Ft%C4%B1rma-4a8eac7c207e?source=rss-550bc145df51------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a8eac7c207e</guid>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[architecture-refactoring]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[istio]]></category>
            <dc:creator><![CDATA[Abdullatif Topçu]]></dc:creator>
            <pubDate>Tue, 31 Aug 2021 10:17:47 GMT</pubDate>
            <atom:updated>2021-08-31T12:28:21.858Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Bir Monolitik Uygulamada yaptığımız mimari iyileştirme çalışmaları, Microservis Mimariye ve Konteynır Ortamına Taşınması Hikayesi</em></p><p>Bu yazıda kısa maddeler halinde bir projede yaptığım refactor çalışmalarını belki birilerinin ilgisini çekebilir ve yeni fikir verebilir düşüncesiyle paylaşacağım. Ama önce uygulamanın teknolojisinden biraz bahsedeyim. <em>Tabi uygulamanın domain bilgisine girmeden bu anlatımı yapacağım.</em></p><p><strong>Mimari ve Teknoloji: </strong>Önyüzde Angular ve Java, arkada ise Python’la yazılmış servisler mevcut. Database olarak PostgreSQL seçilmiş.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9JBKaeC_WBmFJAOTTMQCow.png" /></figure><p><strong>Angular İyileştirmeleri</strong></p><ul><li>Her bir sayfa içine yazılmış kodlar componentlere çevrildi. Sayfalar componentleri kullanır hale getirildi.</li><li>Ekranlar içinde var olan backend call noktaları Angular Service componentleri ile değiştirildi.</li><li>Service Call aşamasında bütün istekler için ortak yapılması gereken kodlara interceptor yazıldı. Bu interceptor aracılığıyla her bir isteğe ortak header bilgileri eklendi. Ayrıca yine bu interceptor aracılığıyla yapılan isteğin endpointi dinamik olarak belirlenebildi. Bazı requestler kullanıcının kendi makinesindeki endpointe giderken, diğer requestler backend deki ortak endpointe gönderilebilindi.</li><li>Service çağrılarına cevap geldiğinde, servisten bağımsız olarak her zaman çalışacak kodların olduğu response interceptor yazıldı. Bu interceptor ile ortak hata yönetimi yapıldı. Örnek vermek gerekirse, sunucuya bağlanamadı gibi ortak hatalar burada çözüldü.</li><li><strong>Redux:</strong> Redux Angulardan bağımsız bir local store dur. Sayfalar arasında yada aynı sayfanın farklı kısımları arasında veri haberleşmesi redux üzerinden yapılır. Componentler stateless yazılır ve sadece view kodunu içerirken, bu viewlerin gösterdiği veriler redux da tutulur. Önyüz kodlarını redux üzerinden çalışır hale getirerek veri yönetimini kolaylaştırmış olduk.</li></ul><p><strong>Java İyileştirmeleri ve Microservis Mimarisine Geçiş</strong></p><ul><li>Domain kısıtları nedeniyle projede oluşturulan java kodları tek bir monolitik web app şeklindeydi. Bu kodu domain içeriğine göre microservislere ayırdık. Bu çalışma sonunda kullanıcının makinesine inen java projesi çok küçülürken çok sayıda microservislerimiz ortaya çıktı. Bu microservis projelerinin tamamını <strong>springboot </strong>projesi olarak kurguladık.</li><li>Her bir microservis kendi içinde controller, business logic katmanlarına sahip olacak şekilde güncelledik.</li><li>Her bir microservise ait konfigurasyon dosyaları yarattık ve environment a ait konfigurasyonları burada tuttuk. Sonrasında dockerize aşamasında bu önemliydi.</li><li><strong>Ne elde ettik: </strong>Bu çalışma sonunda onun üzerinde mikroservisimiz oluştu. Mikroservis mimarisinin bir çok avantajları mevcut. Bu konuda çokca yazılarda mevcut. Burada tüm faydalarına dağinmeyeceğim ama en beğendiğim faydasına değineceğim. O da şu; <strong>Kod Temizliği(Clean Code)</strong>. Bu çalışma sonunda ürettiğimiz küçük ama sayıca çok olan mikro java projelerinin her birinin<strong> okunurluğu, temizliği ve basitliği</strong> üst seviyede oldu.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ZtOVNroXzVDgi1FPL-MXbQ.gif" /></figure><p><strong>Konteynır Üzerinde Çalıştırma</strong></p><ul><li>Her bir microservice projemize docker file dosyaları hazırladık.</li><li>Mikroservis mimarisi ile Container teknolojisi birlikte güçlüler. Var olan tek bir monolitik projeyi çok sayıda küçük ölçekli servislere böldüğümüzde, bu servislerin deploymentı önemli bir iş haline gelir. Bu noktada Kubernetes kullanarak servislerimizi containerize ettik. Docker gibi bir container kullanmanın ve Kubernetes gibi bir container orchestrator kullanmanın faydaları çok fazla. Bu konunun detaylarını anlatan bir yazı aşağıda.</li></ul><p><a href="https://medium.com/platformer-blog/benefits-of-kubernetes-e6d5de39bc48">Benefits of Kubernetes</a></p><p><a href="https://istio.io/"><strong>Istio</strong></a></p><ul><li>Son olarak yeni mimarimizin son bileşeni Istio oldu. Istio bir service mesh kütüphanesi. <a href="https://istio.io/">Detaylarına buradan bakabilirsiniz.</a></li><li>Microservis mimarisinin önemli bir bileşini API Gateway dir. Burada amaç backend de ne kadar mikroservis olursa olsun, önyüzün bunlardan haberdar olmadan tek bir endpointe gitmesi ihtiyacıdır. Bunun için Istio nun VirtualService ve Gatewaylerini kullandık.</li><li>Istio her bir microservisimizin yanında bir side-car çalıştırır. Bu side-car aracılığıyla servisler arasındaki bütün trafik, servislere extra bir kurulum yapmadan, izlenebilir ve yönetilebilir.</li><li><a href="https://www.jaegertracing.io/"><strong>Jaeger:</strong></a> Kubernetes üzerinde Istio’nun jaeger eklentisini kurduk. Bu sayede önyüzden gelen bir isteğin cevaplanana kadar hangi servisleri dolaştığını ve hangi servislerde ne kadar zaman geçirdiğini görebilir olduk. <a href="https://www.jaegertracing.io/">Jaeger</a> arayüzü sayesinde uzun süren isteklerimizin hangileri olduğunu ve en çok zamanı hangi servislerde geçirdiğini izleyebildik.</li><li><a href="https://kiali.io/"><strong>Kiali:</strong></a> Yine Istio nun side-car teknolojisi sayesinde Kiali üzerinden canlı olarak sistemi monitor edebildik. Bu monitor ekranı benim en sevdiğim. Bu ekran üzerinde canlı olarak servislerin çağrılma illustrasyonunu görebiliyoruz.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*iBxZ0pFwp99uJ89MLIgjrA.gif" /></figure><p>Sonuç</p><ul><li>Monolitik bir uygulama yerine Kubernetes üzerinde Istio desteği ile çalışan dağıtık yapıda bir mimari elde ettik. Bu mimari bize projede çok büyük avantajlar sağladı. Bu avantajların en önemli iki tanesi ise şunlar;</li><li>Temiz, Basit ve Ölçeklenebilir Kod.</li><li>Çok yüksek ölçeklenenebilirlik,</li></ul><p>Dağıtık mimarinin sağladığı avantajları çok fazla. Bunları elde etmek için yapılması gereken konfigurasyonlar, kullanılması gereken kütüphaneler(Redis, Istio, Keycloak vs.) ve öğrenilmesi gereken kavramlar(Gateway, Service Security vs.) da yine çok fazla. Her geçen günde bu mimariyi uygulamayı kolaylaştıracak yeni kütüphaneler ve yeni yaklaşımlar çıkmaya devam ediyor. Yazıyı kısa tutmak adına mimarimizde kullandığımız <strong>Keycloak </strong>ve <strong>Redis </strong>bileşenlerinden bahsetmedim. Bunlarda bu konunun önemli bileşenlerinden.</p><p>Sağlıkla Kalın</p><p><strong>Takım: </strong><a href="https://medium.com/u/b5e4cada7b96">Furkan Yavuz</a>, <a href="https://medium.com/u/21a24903d545">Vedat Yurt</a> ve Diğerleri</p><p><strong>Ek Olarak:</strong> Bu konuda Onur Dayıbaşı’ nın: <a href="https://medium.com/architectural-patterns/microservice-nedir-73bdfddad197">https://medium.com/architectural-patterns/microservice-nedir-73bdfddad197</a></p><p>Gökhan Ayrancıoğlu’nun Yazısı: <a href="https://gokhana.medium.com/microservice-mimarisi-nedir-microservice-mimarisine-giri%C5%9F-948e30cf65b1">https://gokhana.medium.com/microservice-mimarisi-nedir-microservice-mimarisine-giri%C5%9F-948e30cf65b1</a></p><p>Oğuzhan İnan’ın Istio Yazısı: <a href="https://medium.com/devopsturkiye/kubernetes-service-mesh-ara%C3%A7lar%C4%B1-81a28b6fadd1">https://medium.com/devopsturkiye/kubernetes-service-mesh-ara%C3%A7lar%C4%B1-81a28b6fadd1</a> okunabilir.</p><p>İbrahim Kürce’nin Yazısı: <a href="https://ibrahim-kurce.medium.com/mikroservis-d%C3%BCnyas%C4%B1nda-kullan%C4%B1lan-ara%C3%A7lar-k%C3%BCt%C3%BCphaneler-e4db3e5d1604">https://ibrahim-kurce.medium.com/mikroservis-d%C3%BCnyas%C4%B1nda-kullan%C4%B1lan-ara%C3%A7lar-k%C3%BCt%C3%BCphaneler-e4db3e5d1604</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a8eac7c207e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>