Cigaba da taken juyin halitta da canje-canje cikin sifa da hanyoyin aiki ya faru ne a fannin haɓaka software, wanda kwanan nan muka taɓa magana a cikin labaran da ake kira "Ci gaban Software: Binciken tarihi har zuwa yau", "Saduwa da juna ta hanyar gajimare: Yaya ake cinmarsa?" y "XaaS: Cloudididdigar girgije - Komai azaman Sabis ne", yau zamuyi magana akan Microservices.
Microservices sune tsarin gine-ginen zamani, ba API (Tsarin Shirye-shiryen Shirye-shiryen Aiki ba) ko fasaha kanta ba, wanda za a iya sanyawa da amfani da shi. Tsarin gine-ginen software, wanda aka fi sani da tsarin software, baƙon baƙon harshe ne na shirye-shirye, tunda ba komai bane face sun kafa hanyar da fasaha zata yi aiki ba yadda za a aiwatar da su ba.
Gabatarwar
Microservices ana iya ganinsa azaman cigaban gine-ginen SOA (Architecture-Oriented Architecture), wanda ke jagorantar masu haɓaka don ƙirƙirar ƙarin aikace-aikace na zamani, waɗanda suke aiki da masu cin gashin kansu, tare da babban ƙarfin da za'a sake amfani dashi ta hanyar da ta dace, kamar yadda akeyi ta irin wannan hanyar, lokacin da muka inganta amfani da wasu kayan aiki, wanda Yana buɗewa kawai abin da ke da mahimmanci, maimakon buɗe cikakken ƙarfinsa ba dole ba.
Gine-ginen Microservices, a aikace bai zama mai girma ba kamar yadda yake a ka'idar, wato, an fi sani da amfani. Koyaya, kowace rana ƙari, yawancin masu haɓakawa suna aiwatar dashi saboda ƙirar ci gaban software ce inganta masu canji lokaci, aiki da kwanciyar hankali tsakanin ayyukan inda ake amfani da shi. Bayan haka, nasa sauki hade scalability sanya shi dacewa musamman a cikin ci gaba inda daidaita daidaiton dandamali (Yanar gizo, Waya, Wearables, IoT) yana da mahimmanci.
Amma, yayin da SOA itace Architecture mafi girma. Microservices Architecture ma ba mu damar ƙirƙirar ayyuka, amma an tsara waɗannan ayyukan a cikin karami da takamaiman hanya don haka su cika aiki daidai da lokaci, ta wannan hanyar da za'a iya raba su daga sauran aikace-aikacen kuma suyi aiki ta hanyar cin gashin kai daga sauran aikace-aikacen inda aka kirkireshi.
Menene Gine-ginen Software (Alamu)?
Don fahimtar Gine-ginen Software na Microservices da kyau, yana da kyau mu san kaɗan game da duk sanannun gine-ginen Software da ake da su. Akwai su da yawa, kamar yadda za a iya gani a shafin na Matsayi ko kuma kawai a wikipedia, amma bisa ga sanannen littafin da ake kira «Littafin Zane»Littafin Alamar Zane) alamu na yanzu ana iya rarraba su azaman:
Kirkira
Wadanda suke ma'amala da hanyoyin sanya abubuwa cikin gaggawa wadanda kuma manufar su ita ce nisantar da tsarin shigar da hankali da kuma boye bayanan yadda aka kirkiri abubuwa ko fara su. A cikin wannan aji akwai masu zuwa:
- Abun almara
- magini
- Hanyar Masana'antu
- Prototype
- Singleton
Tsarin gini
Wadanda ke bayanin yadda za'a hada aji da abubuwa (mai sauki ko mahadi) don samar da manyan tsari da samar da sabbin ayyuka. A cikin wannan aji akwai masu zuwa:
- adaftan
- Bridge
- hadedde
- Mai ado
- Fasaha
- Matuka masu nauyi
- Proxy
Halayyar
Wadanda ke taimaka mana wajen bayyana sadarwa da maimaitawa tsakanin abubuwan tsarin. Dalilin wannan samfurin shine rage haɗuwa tsakanin abubuwa. A cikin wannan aji akwai masu zuwa:
- Sarkar Nauyi
- umurnin
- Mai Fassarawa
- Mai saukarwa
- Mai jarida
- memento
- observer
- Jihar
- Strategy
- Hanyar samfuri
- baƙo
wasu
Abubuwan ƙirar zane da suka gabata sun bayyana zane-zane waɗanda ke bayyana tsarin ƙira wanda za'a gina tsarin software dasu. Amma lokacin da muke so mu bayyana ingantaccen tsari da tsarin tsari don tsarin software da aka kirkira, galibi muna samun wannan rarrabuwa:
- Slate gine
- DAO: Abun Samun Bayanai
- DTO: Abun Canja wurin Bayanai
- EDA: Ginin Gidan da Aka Gudanar
- Kira a fili
- Abubuwa tsirara
- Shirye-shiryen layi
- Aboki-zuwa-kaya
- Pipeline
- SOA: Tsarin Gine-ginen Hidima
- Matakai uku
Akwai kuma "Misalin Duba Mai Kulawa" wanda sananne ne kuma ake amfani dashi, kuma ya kasu zuwa:
- Misali / Duba / Mai Kulawa
- Misali / Duba / Mai Gabatarwa
- Misali / Duba / Mai Gabatarwa tare da Mai Gabatar da Misali
- Misali / Duba / Duba-Samfura
- Samfuri / Duba / Mai Gabatarwa tare da Duba Passive
- Misali / Duba / Mai Gabatarwa tare da Mai Kula da Mai Kula
Kasancewa "Misalin Duba Mai Kulawa" ɗayan sanannun sananne kuma ana aiwatarwa a yau, bai isa ba don samar da ayyukan da ake buƙata ga aikace-aikacen kamfanoni, kuma wannan shine ɗayan manyan dalilan da yasa, Microservices Architecture yana maye gurbin Model-View-Controller (MVC).
Fa'idodi na Gine-ginen Microservices
Lokacin da dandalin yanar gizo yayi amfani da Tsarin Gine-ginen Microservices, yawanci yana da fa'idodi masu zuwa:
- Yankewa a sauƙaƙe kowace matsala ko matsala da aka gabatar don magance kowace ƙaramar Microservice da ke cikin wani yanayi na musamman.
- Don ragewa Gabaɗaya ko gazawar ayyukan a duniya, tun lokacin da Microservice ya faɗi hakan ba ya shafar sauran, saboda suna da cikakken 'yanci.
- Don sauƙi ƙaddamarwa da haɗawar cikakken ko takamaiman ayyuka ko ayyuka, tunda kowane Microservice za a iya ƙarawa ko cire shi da sabunta shi daban da ci gaba.
- Don samun mafi kyau samun dama ga aikace-aikace ko sabis da aka kirkira daga kowane nau'in na'urori da dandamali.
- Ƙara iya amfani da dandamali, tunda ana iya rarraba Microservices akan sabobin daban kuma a rubuta su cikin harsuna daban-daban.
Buɗe Tushen Tsarin
Akwai su da yawa zabin hanyoyin budewa waɗanda masu haɓaka software za su iya amfani da su don ƙirƙirar mafita waɗanda ke ɓangaren Microservices Architectures. Musamman don Java, wanda ke amfani da fasahar yau da kullun don wannan, akwai masu zuwa:
- Cricket
- dropwizard
- Eclipse MicroProfile
- Helidon
- Jersey
- Payar Micro
- Play
- Sake hutawa
- walƙiya
- Takalmin bazara
- Squash
- zagi
- Rashin waya
- WildFly Thorntail
- zipkin
Misalan yanar gizo tare da Microservices Architectures
Daga cikin yawancin rukunin yanar gizon da ke samar da manyan aikace-aikacen aikace-aikace kuma a hankali suka aiwatar da Tsarin Gine-ginen Microservices don haɓaka kulawa da ƙididdigar ayyukansu da dandamali na samfuran, yana mai sauƙi, mai tasiri da sauri, zamu iya ambata manyan uku a cikin masana'antar Menene su:
- Amazon
- eBay
- Netflix
ƙarshe
A sarari yake cewa Microservices suna ba da gudummawa sosai ga Ci gaban Kayan aikin Yanar Gizo na ZamaniAmma kuma suna nufin tunkarar sababbin kalubale da yawa don warwarewa. Matsalolin da ba wai kawai suna da alaƙa da tsarin koyo da aiki yadda ya kamata ba ne, har ma da yadda waɗannan abubuwan ci gaban ke haɓaka da aiwatarwa a cikin sassan IT, waɗanda a ƙarshe su ne waɗanda ke sanya su kan layi da gudanar da su, kuma suna da ƙuri'a na nauyi a yanke shawara na ƙarshe game da kowane ci gaba. Amma Wannan Gine-ginen yana nan kuma ya zo ya daɗe.