<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mehdi</title>
    <description>The latest articles on DEV Community by Mehdi (@mehdichebbah).</description>
    <link>https://dev.to/mehdichebbah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F522143%2F57eb46c2-5276-489f-9f4c-7c142e1bf274.png</url>
      <title>DEV Community: Mehdi</title>
      <link>https://dev.to/mehdichebbah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mehdichebbah"/>
    <language>en</language>
    <item>
      <title>NFC In iPhone Mobiles</title>
      <dc:creator>Mehdi</dc:creator>
      <pubDate>Wed, 25 May 2022 18:35:58 +0000</pubDate>
      <link>https://dev.to/mehdichebbah/nfc-in-iphone-mobiles-3onk</link>
      <guid>https://dev.to/mehdichebbah/nfc-in-iphone-mobiles-3onk</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LvSAYc3p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u22webbusz3pzt27kgvo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LvSAYc3p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u22webbusz3pzt27kgvo.png" alt="Cover" width="880" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are interested in IT news, you have probably heard people talking about NFC in the last few years, as it is a popular technology that is used everywhere from headsets, to file sharing, to payment devices and lot of other use cases. You may be wondering now, what is this NFC technology? How does it work? what is it used for? and if you are an iPhone fan (just like me) what iPhone devices that support this technology? and how to use it? In the following we will try to answer these questions!&lt;/p&gt;

&lt;p&gt;So let get straight into it 👇&lt;/p&gt;

&lt;h2&gt;
  
  
  What is NFC?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Near Field Communication&lt;/strong&gt; or &lt;strong&gt;NFC&lt;/strong&gt; in short, is a proximity-based wireless communication standard.   It enables communication between two electronic devices over a distance of 10 cm or less. You can find NFC technology on smartphones, tablets, speakers, gaming consoles, payment systems, and many other devices.&lt;/p&gt;

&lt;p&gt;NFC devices work on one of the three following modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Card Emulation&lt;/em&gt;: NFC is used to emulate smart cards on devices such as smartphones, allowing users to perform transactions using their phones directly (No need to use cards).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Reader/Writer&lt;/em&gt;: NFC is used to read from and write to NFC tags, allowing users to easily share data.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Peer-to-Peer&lt;/em&gt;: NFC is also used to exchange information between two devices in an ad-hoc manner.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How does NFC work?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DbMkweHc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.microcontrollertips.com/wp-content/uploads/2018/05/Figure-1-2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DbMkweHc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.microcontrollertips.com/wp-content/uploads/2018/05/Figure-1-2.jpg" alt="How does NFC works [[Source](https://www.microcontrollertips.com/programming-automation-using-nfc-tags-faq/)]" width="880" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NFC is based on RFID (Radio Frequency Identification) technology, that has already been around for decades, it's the technology used to allow you to access an office building or hotel room using a key card.&lt;/p&gt;

&lt;p&gt;NFC works as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The reader device generates a magnetic field by passing an electric current through a coil. &lt;/li&gt;
&lt;li&gt;When a tag (with its own coil) is brought nearby, the field induces an electric current within the tag -without any wires or physical contact-. &lt;/li&gt;
&lt;li&gt;Once the initial handshake is complete, any stored data on the tag is wirelessly transmitted to the reader.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Another noteworthy point is that NFC devices can act as either a reader or tag. This bidirectional capability allows users to use their NFC devices in the three modes.&lt;/p&gt;

&lt;p&gt;The following table shows you the features offered by the NFC technology:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Features&lt;/th&gt;
&lt;th&gt;NFC Support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RF Carrier Frequency&lt;/td&gt;
&lt;td&gt;13.56 MHz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distance&lt;/td&gt;
&lt;td&gt;less than 10 cm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Rate&lt;/td&gt;
&lt;td&gt;106 or 212 or 424 Kbps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NFC Network Devices&lt;/td&gt;
&lt;td&gt;Tags and Readers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network configuration&lt;/td&gt;
&lt;td&gt;peer to peer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NFC Network Device Modes&lt;/td&gt;
&lt;td&gt;Card Emulation, Reader/Writer, Peer-to-Peer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;connection establishment time&lt;/td&gt;
&lt;td&gt;&amp;lt;0.1 sec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Coding Schemes&lt;/td&gt;
&lt;td&gt;NRZ-L, Manchester, Modified Miller&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Modulation Schemes&lt;/td&gt;
&lt;td&gt;ASK, BPSK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Collision mechanism (i.e. MAC)&lt;/td&gt;
&lt;td&gt;Anti-collision support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NFC Standards&lt;/td&gt;
&lt;td&gt;ISO 14443A/B, ISO 18092, JIS X6319-4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What is NFC used for?
&lt;/h2&gt;

&lt;p&gt;NFC has a wide rang of use-cases, here are few of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mobile payments&lt;/strong&gt;: Samsung Pay, Google Pay, and Apple Pay all use your smartphone's NFC chip for contactless payments. Most debit and credit cards these days already have an NFC tag built-in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bootstrapping other connections&lt;/strong&gt;: NFC offers a low-speed connection with simple setup that can be used to bootstrap more capable wireless connections. For example, Nokia, Samsung, BlackBerry and Sony have used NFC technology to pair Bluetooth headsets, media players and speakers with one tap. The same principle can be applied to the configuration of Wi-Fi networks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data transfer&lt;/strong&gt;: NFC can be used for sharing contacts, text messages or links.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identity and access tokens&lt;/strong&gt;: NFC-enabled devices can act as electronic identity documents found in Passports and ID cards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smartphone automation&lt;/strong&gt;: Reading NFC tags using a smartphone can allow a change of phone settings, texting, app launching, or command execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gaming&lt;/strong&gt;: Nintendo for example uses the technology to connect physical toys with video games. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home automation&lt;/strong&gt;: Some smart home platforms, including Home Assistant and Apple's HomeKit, use NFC tags to control devices or automation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  iPhones and NFC
&lt;/h2&gt;

&lt;p&gt;Apple started including an NFC chip in its iPhone phones in 2014 starting from &lt;strong&gt;iPhone 6&lt;/strong&gt; which was Apple's first released phone that supports NFC. The following table summarizes NFC support in all iPhone phones [&lt;a href="https://www.digitalcitizen.life/iphone-nfc/"&gt;Source&lt;/a&gt;]:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;iPhone&lt;/th&gt;
&lt;th&gt;NFC chip&lt;/th&gt;
&lt;th&gt;Apple Pay NFC support&lt;/th&gt;
&lt;th&gt;Read NFC tags&lt;/th&gt;
&lt;th&gt;Write NFC tags&lt;/th&gt;
&lt;th&gt;Read NFC in Background&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;13, 13 Pro / Max, 13 Mini&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12, 12 Pro / Max, 12 Mini&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11, 11 Pro / Max, SE (2nd Gen)&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XS, XS Max, XR&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;X, 8, 8+,7 ,7+&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6, 6+, 6S, 6S+, SE (1st Gen)&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✔️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5S, 5C, 5, 4S, 4, 3GS, 3G&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;td&gt;✖️&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;By the way, all iPhone phones that are using iOS 14 or newer and have NFC support automatically read all kinds of NFC tags without needing third-party apps, including web addresses (URLs), emails, phone numbers, and SMS messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use NFC on iPhone 11?
&lt;/h2&gt;

&lt;p&gt;Let's suppose you have an iPhone 11, we know now that it supports NFC, not only that but it supports NFC in the background, what does this means? This means that you don't need to activate anything before using it, cool isn't it! Here is how to use it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For Peer-to-Peer communication, all you have to do is to tap your iPhone to another device that's NFC-enabled.&lt;/li&gt;
&lt;li&gt;To read an NFC tag, you simply hold the top back of your iPhone close to the NFC tag, it'll read it and show a notification on the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if you tap your iPhone 11 to an NFC-enabled Bluetooth device it will show you a notification asking you to peer the two devices, you can choose an action right from the notification. Another example could be if you read an NFC tag containing a URL using your iPhone 11, a notification will show up asking you if you want to follow the URL, just as simple as that! &lt;/p&gt;

&lt;p&gt;Here is a 90 sec video that shows you how to use NFC in iPhone 11: &lt;a href="https://www.youtube.com/watch?v=knpIEdqIhFo"&gt;https://www.youtube.com/watch?v=knpIEdqIhFo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In the previous few sentences, you learned the basics of NFC and how to use it on iPhone 11. If you are interested in learning more about it or want to know how to use it in other devices, you can read the following articles: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Near-field_communication"&gt;https://en.wikipedia.org/wiki/Near-field_communication&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.androidauthority.com/what-is-nfc-270730/"&gt;https://www.androidauthority.com/what-is-nfc-270730/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.digitalcitizen.life/iphone-nfc/"&gt;https://www.digitalcitizen.life/iphone-nfc/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://seritag.com/learn/nfc-enabled-phones/apple-iphone-11"&gt;https://seritag.com/learn/nfc-enabled-phones/apple-iphone-11&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://iotpoint.wordpress.com/nfc-tutorial/"&gt;https://iotpoint.wordpress.com/nfc-tutorial/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What do you think about this technology? Please share your thoughts with us through the comments section.  &lt;/p&gt;

</description>
      <category>nfc</category>
      <category>it</category>
      <category>iphone</category>
      <category>technews</category>
    </item>
    <item>
      <title>Introduction to Recommender Systems</title>
      <dc:creator>Mehdi</dc:creator>
      <pubDate>Thu, 03 Feb 2022 07:17:10 +0000</pubDate>
      <link>https://dev.to/mehdichebbah/introduction-to-recommender-systems-16f5</link>
      <guid>https://dev.to/mehdichebbah/introduction-to-recommender-systems-16f5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The purpose of this article is to provide a brief overview of the field of recommender systems. We will discuss the history of these systems, the terminology used and their overall classifications.&lt;/p&gt;

&lt;p&gt;Intuitively, a Recommendation System, for example for books, can be compared to a library agent who we ask to suggest books to us after having expressed our needs. Indeed, the librarian with his great knowledge of the books in this library compared to a simple user and considering his long experience and the opinions of users, he can provide valuable recommendations which can save a lot of research effort and time. Of course, the user must provide him with sufficient data. This example illustrates a human recommendation, to get closer to technical terms we could say that, the virtual librarian must have three types of information: representations of books in the library (item profiles), representation of users (profiles users), and the algorithms that interfere between the two to produce the recommendations (Amine Naak 2009).&lt;/p&gt;

&lt;p&gt;Formally. “&lt;em&gt;A Recommender System is any system that produces personalized recommendations as output or has the effect of guiding the user in a personalized way to interesting or useful objects in a large space of possible objects&lt;/em&gt;” (Aravind 2018). In other words, a Recommendation System could be considered as a tool, for which a user discloses his profile (represented, in general, by his preferences and tastes), the system in return provides a personalized and reduced image of information sought from the database. If all these information are sent directly back to the client, they will exceed his cognitive abilities.&lt;/p&gt;

&lt;p&gt;At first glance, it seems that recommender systems perform the same function as search engines. In fact, we could think of search engines as simple recommender systems that take as input the keywords/tags and provide a subset of the set of items. But the main difference is that the result of search engines is not personalized according to the user's profile, while the result of a Recommender System should depend on it. This means that the same query for a simple search engine will return the same items for all users of the system. On the other hand, the same query in a Recommender System will return different results depending on the user's profile. Another difference is that the application domain of Recommender Systems is wider than that of Search Engines, because Search Engines deal mainly with HTML pages (text), while Recommender Systems are used with all sorts of data, e.g. music (audio), movies (video), HTML pages (text), e-commerce products (complex types), etc.&lt;/p&gt;

&lt;p&gt;The first Recommender Systems are reduced to collaborative filtering systems (which will be explained in the next section). They appeared in the early 1990s, when they were recognized as an independent research field. We cite as examples the &lt;strong&gt;Tapestry&lt;/strong&gt; (Goldberg et al. 1992) and &lt;strong&gt;GroupLens&lt;/strong&gt; (Resnick et al. 1994) systems.&lt;/p&gt;

&lt;p&gt;The roots of recommender systems can be traced back to extensive work in cognitive science, approximation theory, information retrieval, and prospective theory, and also have links to management science and marketing in modeling consumer choice (Amine Naak 2009).&lt;/p&gt;

&lt;p&gt;We have previously mentioned some terms that are used extensively in this field of research and that need to be defined before we begin, such as: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Item profile&lt;/strong&gt;: This is the internal representation of the object we want to recommend (e.g. a product, a movie, an article, music, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User profile&lt;/strong&gt;: This is the internal representation of the user's preferences and historical actions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended list&lt;/strong&gt;: This is the result of the recommendation process and contains a list of items that the system deems relevant for the user.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Classification of recommender systems
&lt;/h2&gt;

&lt;p&gt;If we analyze the current research direction on recommender systems, we can see that there are mainly three general categories: content-based systems, collaborative filtering-based systems, and hybrid systems [(Mu 2018), (Kuanr et al. 2021)]. These approaches are not dependent on the application domain of the system, they are basic methods that could simply be implemented and deployed and work for any type of data.&lt;/p&gt;

&lt;p&gt;In the next section, we will use the example of a movie recommender system to understand the intuition behind these three approaches (i.e., we have a database containing users and movies and the goal is to provide users with movies that might interest them).&lt;/p&gt;

&lt;h3&gt;
  
  
  Content Based Recommender Systems
&lt;/h3&gt;

&lt;p&gt;If our movie recommender system is implemented using the content-based approach, this means that if the user watches/likes a specific content the most (say the user watches war movies most of the time), the recommended list will contain that content.&lt;/p&gt;

&lt;p&gt;Content-based recommender systems use the content of items and find the similarities between them. After analyzing a suﬀcient number of items that a user has already shown preference for, the user's profile of interests is established. The recommender system can then search the database and choose relevant items based on his or her profile (Mu 2018).&lt;/p&gt;

&lt;p&gt;The diﬀiculty here lies in how to find user preferences based on item content. Many approaches have been developed to solve this problem in the fields of data mining or machine learning. For example, in an Article Recommender System, in order to recommend certain articles to a specific reader, the Recommender System must first obtain all the articles that the user has read before, and then the keywords can be extracted from the text using text mining methods (using TF-IDF for example). After integrating all the keywords with their respective weights, a book can be represented by a multidimensional vector. Specific clustering algorithms can then be applied to find the centers of these vectors that represent the interests of that reader. Finally, recommended articles could be obtained by computing the distance between certain candidate articles and the user's profile vector (Mu 2018).&lt;/p&gt;

&lt;h3&gt;
  
  
  Collaborative Filtering-Based Recommender Systems
&lt;/h3&gt;

&lt;p&gt;If our movie recommender system is implemented following the collaborative filtering approach, it means that if the user watches/likes a set of movies (say 'A', 'B', 'C', and 'D'), and there are other users watching the same movies (e.g. 'A', 'B', 'C', 'D', and 'E'). This means that the recommended list will contain movies that other users have watched and that our user has not yet watched (in our example the movie 'E').&lt;/p&gt;

&lt;p&gt;The basic idea of collaborative filtering is that if two users rate some common items, their interests will be considered similar. If certain items exist in one user's profile but not in the other, those items can be recommended to that user. In other words, collaborative filtering is the process of recommending items using the opinions of other users. Ratings or opinions can be obtained by asking users to fill out a questionnaire, for example (Bai et al. 2019).&lt;/p&gt;

&lt;h3&gt;
  
  
  Hybrid Recommender Systems
&lt;/h3&gt;

&lt;p&gt;One of the different ways to build our hybrid movie recommendation system is to generate a list of candidate movies using the collaborative filtering method, and then use this list to compute the similarity between these movies and the user's profile (the movies he/she has watched before) in order to generate a sub-list containing only the movies with strong similarity.&lt;/p&gt;

&lt;p&gt;Hybrid recommendation methods seek to achieve the best recommendation results by combining content-based recommendation methods and collaborative filtering-based recommendation methods and any other existing methods.  The combination of two or more algorithms aims to work around the limitations of individual approaches in isolation (Mu 2018).&lt;/p&gt;

&lt;p&gt;This approach can be divided into three different types depending on the combination process (Mu 2018): &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monolithic&lt;/strong&gt; where the two algorithms are merged into one algorithm to be used as a single block. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel&lt;/strong&gt;: the two algorithms run in parallel and then the two generated lists are merged using a re-ranking function. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipeline&lt;/strong&gt;: one algorithm runs first, then the second algorithm uses the elements of the generated list as candidate elements to generate the recommended list.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Recommender systems are widely applied in many application areas. They are applied in: Streaming platforms to recommend videos, news platforms to recommend relevant news to users, e-commerce services to recommend products to customers, e-learning to recommend courses to students, social networks to recommend posts and advertisements to users, and job recommendations to recommend job offers to users and recommend users to companies [(Fakhfakh et al. 2017), (Kuanr et al. 2021)].&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Amine Naak (2009). “&lt;a href="https://papyrus.bib.umontreal.ca/xmlui/handle/1866/3270"&gt;Papyres : un système de gestion et de recommandation d’articles de recherche&lt;/a&gt;”. fra.&lt;/li&gt;
&lt;li&gt;Aravind, Sesagiri Raamkumar (2018). “&lt;a href="https://www.researchgate.net/publication/323308750_A_task-based_scientific_paper_recommender_system_for_literature_review_and_manuscript_preparation"&gt;A TASK-BASED SCIENTIFIC PAPER RECOMMENDER SYSTEM FOR LITERATURE REVIEW AND MANUSCRIPT PREPARATION&lt;/a&gt;”. en. In : p. 344.&lt;/li&gt;
&lt;li&gt;Goldberg, David et al. (1992). “&lt;a href="https://dl.acm.org/doi/10.1145/138859.138867"&gt;Using Collaborative Filtering to Weave an Information Tapestry&lt;/a&gt;”. In : Communications of the ACM 35.12, p. 61-70.&lt;/li&gt;
&lt;li&gt;Resnick, Paul et al. (1994). “&lt;a href="https://dl.acm.org/doi/10.1145/192844.192905"&gt;GroupLens : An Open Architecture for Collaborative Filtering of Netnews&lt;/a&gt;”. In : Proceedings of the 1994 ACM Conference on Computer Supported Cooperative Work. CSCW ’94. New York, NY, USA : Association for Computing Machinery, p. 175-186.&lt;/li&gt;
&lt;li&gt;Mu, Ruihui (2018). “&lt;a href="https://ieeexplore.ieee.org/document/8529185"&gt;A Survey of Recommender Systems Based on Deep Learning&lt;/a&gt;”. en. In : IEEE Access 6, p. 69009-69022.&lt;/li&gt;
&lt;li&gt;Kuanr, Madhusree et Puspanjali Mohapatra (2021). “&lt;a href="https://www.researchgate.net/publication/346787874_Recent_Challenges_in_Recommender_Systems_A_Survey"&gt;Recent Challenges in Recommender Systems : A Survey&lt;/a&gt;”. en. In : Progress in Advanced Computing and Intelligent Engineering. Sous la dir. de Chhabi Rani Panigrahi et al. Advances in Intelligent Systems and Computing. Singapore : Springer, p. 353-365.&lt;/li&gt;
&lt;li&gt;Bai, Xiaomei et al. (2019). “&lt;a href="https://ieeexplore.ieee.org/document/8598708"&gt;Scientific Paper Recommendation : A Survey&lt;/a&gt;”. en. In : IEEE Access 7, p. 9324-9339.&lt;/li&gt;
&lt;li&gt;Fakhfakh, Rim, Anis Ben et Chokri Ben (2017). “&lt;a href="https://www.researchgate.net/publication/322248919_Deep_Learning-Based_Recommendation_Current_Issues_and_Challenges"&gt;Deep Learning-Based Recommendation : Current Issues and Challenges&lt;/a&gt;”. en. In : International Journal of Advanced Computer Science and Applications 8.12.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>recommendersystem</category>
      <category>recommendationsystem</category>
      <category>recommendation</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Deploy Microservices In Production</title>
      <dc:creator>Mehdi</dc:creator>
      <pubDate>Sat, 25 Dec 2021 09:45:18 +0000</pubDate>
      <link>https://dev.to/mehdichebbah/deploy-microservices-in-production-22f5</link>
      <guid>https://dev.to/mehdichebbah/deploy-microservices-in-production-22f5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this article we will learn the difference between deploying a monolithic application and deploying a microservices application, we will discuss the different available options and the advantages and disadvantages of each of them. So lets get straight into it.&lt;/p&gt;

&lt;p&gt;Deploying a monolithic application means running multiple, identical copies of a single, usually large application. You typically provision N servers (physical or virtual) and run M instances of the application on each one. The deployment of a monolithic application is not always entirely straightforward, but it is much simpler than deploying a microservices application.&lt;/p&gt;

&lt;p&gt;A microservices application consists of tens -or even hundreds- of services. Services are written in a variety of languages and frameworks. Each one is a mini‑application with its own specific deployment, resources, scaling, and monitoring requirements. For example, you need to run a certain number of instances of each service based on the demand for that service. Also, each service instance must be provided with the appropriate CPU, memory, and I/O resources. What is even more challenging is that despite this complexity, deploying services must be fast, reliable and cost‑effective.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment techniques
&lt;/h2&gt;

&lt;p&gt;There are multiple ways of deploying a microservices based system, here they are:&lt;/p&gt;

&lt;h3&gt;
  
  
  Multiple service instances per host
&lt;/h3&gt;

&lt;p&gt;The first way is to run multiple instances of different services on a host (Physical or Virtual machine). The deployed system looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F159jb4nc3lzvyvq656lz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F159jb4nc3lzvyvq656lz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefits of this pattern include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More efficient resource utilization than one service instance per host (The next pattern).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The drawbacks of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Risk of conflicting resource requirements;&lt;/li&gt;
&lt;li&gt;Risk of conflicting dependency versions;&lt;/li&gt;
&lt;li&gt;Difficult to limit the resources consumed by a service instance;&lt;/li&gt;
&lt;li&gt;If multiple services instances are deployed in the same process then its difficult to monitor the resource consumption of each service instance. Its also impossible to isolate each instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Single service instance per host
&lt;/h3&gt;

&lt;p&gt;The second option is to deploy each single service instance on its own host. An example of this deployment pattern is shown here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0wfp7r1d2kb8tw9imbg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh0wfp7r1d2kb8tw9imbg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefits of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Services instances are isolated from one another;&lt;/li&gt;
&lt;li&gt;There is no possibility of conflicting resource requirements or dependency versions;&lt;/li&gt;
&lt;li&gt;A service instance can only consume at most the resources of a single host;&lt;/li&gt;
&lt;li&gt;Its straightforward to monitor, manage, and redeploy each service instance;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The drawbacks of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Potentially less efficient resource utilization compared to Multiple Services per Host because there are more hosts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Service instance per VM
&lt;/h3&gt;

&lt;p&gt;Package the service as a virtual machine image and deploy each service instance as a separate VM. This means the system will look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbaobos724zwrrywi8fsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbaobos724zwrrywi8fsv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefits of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Its straightforward to scale the service by increasing the number of instances;&lt;/li&gt;
&lt;li&gt;The VM encapsulates the details of the technology used to build the service;&lt;/li&gt;
&lt;li&gt;Each service instance is isolated;&lt;/li&gt;
&lt;li&gt;A VM imposes limits on the CPU and memory consumed by a service instance;&lt;/li&gt;
&lt;li&gt;IaaS solutions such as AWS provide a mature and feature rich infrastructure for deploying and managing virtual machines;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The drawbacks of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building a VM image is slow and time consuming.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Service instance per Container
&lt;/h3&gt;

&lt;p&gt;Package the service as a container image and deploy each service instance as a container.  Docker could be used to create container images and these containers could be manipulated using a framework such us Docker Compose, Kubernetes, Marathon/Mesos, ...etc. This solution is presented in the following figure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt7bj0fkyfbwuqgwu8ra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxt7bj0fkyfbwuqgwu8ra.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefits of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is straightforward to scale up and down a service by changing the number of container instances;&lt;/li&gt;
&lt;li&gt;The container encapsulates the details of the technology used to build the service;&lt;/li&gt;
&lt;li&gt;Each service instance is isolated;&lt;/li&gt;
&lt;li&gt;A container imposes limits on the CPU and memory consumed by a service instance;&lt;/li&gt;
&lt;li&gt;Containers are extremely fast to build and start. For example, it’s 100x faster to package an application as a Docker container than it is to package it as a VM. Docker containers also start much faster than a VM since only the application process starts rather than an entire OS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The drawbacks of this approach include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The infrastructure for deploying containers is not as rich as the infrastructure for deploying virtual machines.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We can recap the pros and cons of the mentioned 4 strategies in the following table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Multiple instances per host&lt;/th&gt;
&lt;th&gt;Single instance per host&lt;/th&gt;
&lt;th&gt;Single instance per VM&lt;/th&gt;
&lt;th&gt;Single instance per container&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Isolation&lt;/td&gt;
&lt;td&gt;No isolation&lt;/td&gt;
&lt;td&gt;Isolated&lt;/td&gt;
&lt;td&gt;Isolated&lt;/td&gt;
&lt;td&gt;Isolated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Risk of conflicts&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resources management&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;third-party solutions&lt;/td&gt;
&lt;td&gt;No solutions&lt;/td&gt;
&lt;td&gt;Some solutions&lt;/td&gt;
&lt;td&gt;Multiple solutions&lt;/td&gt;
&lt;td&gt;A lot of solutions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resources efficiency&lt;/td&gt;
&lt;td&gt;Efficient&lt;/td&gt;
&lt;td&gt;Not efficient&lt;/td&gt;
&lt;td&gt;Efficient&lt;/td&gt;
&lt;td&gt;Very efficient&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scaling&lt;/td&gt;
&lt;td&gt;Hard&lt;/td&gt;
&lt;td&gt;Easy&lt;/td&gt;
&lt;td&gt;Very easy&lt;/td&gt;
&lt;td&gt;Very easy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build time&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;td&gt;/&lt;/td&gt;
&lt;td&gt;Slow&lt;/td&gt;
&lt;td&gt;Fast&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Further Reading
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Deploying Microservices: Choosing a Strategy&lt;/em&gt; (2016) &lt;em&gt;NGINX&lt;/em&gt;. Available at: &lt;a href="https://www.nginx.com/blog/deploying-microservices/" rel="noopener noreferrer"&gt;https://www.nginx.com/blog/deploying-microservices/&lt;/a&gt; (Accessed: 24 December 2021).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Deploying microservices&lt;/em&gt;. Available at: &lt;a href="https://microservices.io/articles/deployment.html" rel="noopener noreferrer"&gt;https://microservices.io/articles/deployment.html&lt;/a&gt; (Accessed: 24 December 2021).&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>microservices</category>
      <category>devops</category>
      <category>deploy</category>
      <category>docker</category>
    </item>
  </channel>
</rss>
