词条 | Draft:Team workers |
释义 |
Team workers (derived from team and, replicated workers) or Teamed services (also abbreviated : "Workers") are a software development paradigm in which every service in a service-oriented architecture (SOA) may play a variety of roles for each request it receives determined by a set of route-rules, it's average calculated latency and other team workers availability and latency. The set of rules considers the worker's ability to complete the request autonomously (and within a defined response time) or complete some of the sub tasks the request flow requires. From a technical point a view a Team worker is a combination of code originally designed as Microservices, linked as one computer program. While the traditional SOA pattern considers each service as a provider or a consumer, a team worker can play both provider or consumer roles, and therefore can also serve as a provider for its own request, meaning a worker may select (or be instructed by an Orchestration tool or Service Mesh) whether to pass the request to another worker or handle the request itself. The selection of the part played by a worker should not compromise data integrity, security and latency and should be transparent for the consumer that originally sent the request. OverviewAs the trend[1][2] to "break down" Monolithic applications to services has grown in the early 2000's, the adoption of the Unix philosophy to Do One Thing and Do It Well lead to growth of the Microservices variant, and with many advantages of the Microservices approach, some new challenges[3][4] were introduces, and mainly point to: over-complexity, latency, greater number of point of failures, and cumbersome testing and debug-ability, with many articles[5] pointing to pros vs cons. Hence, a suggested approach that may harness the advantages in both Monolithic and Microservices approach became a necessity. The Team workers paradigm tries to comply with this necessity, by keeping many of the promises from both Microservices and Monolithic design: A team worker, restricted to "act as a microservice" rules, would only serve "One purpose" in a similar manner to a Microservice, whereas it can ignore the fact that its built from "glued" Microservices and forward the request in classic Microservice manner. In such case the single difference between a team worker and a microservice - would be the fact that the size of the worker's binary application would be much larger, as the worker will consist a great deal of "unused code" . However, when directed by rules that allows the worker to act with multiple roles, it resolves or narrows down some of the challenges:
DefinitionAn application must satisfy the below terms to admit as a team worker:
HistoryThe use of RPC (Remote procedure call) is dated to the early 1980's and alternating to Remote method invocation during the 1990's, the concept on which objects and classes are remotely served became common. In some RPC models such as Microsoft DCOM specific method invocation were either machine level registered as local or remote[6] or dynamically launched local or remote with a call parameter of a server name[7], thus creating a dynamic environment on which an object can be defined as a local service or remote. With the birth of microservices and their quick adoption[8] [9] application domain often calls a small set of methods (e.g. CRUD, RESTful and other less general purpose methods), a similar ability to allocate the service provider relies on service discovery that forces the selection of a service provider using rules and patterns [10] [11] [12] that adds another communication layer between the consumer and provider services. Many articles[13] [14] cover the pros and cons of monolith vs microservices approaches, naming the microservices drawbacks mainly in two groups:
Since these drawbacks are not minor, a "Death for microservices" movement articles and blogs [15] [16] [17] started appearing, calling for a "more sane" solution suggesting a "more monolith" design, and while doing that often tell how a failing microservices solution was re-bounded either by topic to a "pack of few services" or a one monolith. At January 2019 the idea that "combining the monolith and microservices" can lead to a "utilizing the best in two approached" gave birth to Team workers, first publicly discussed in Oracle hosted Golang meetup [18] . PhilosophyThe philosophy behind team workers can be summarized by:
Route-rule ImplementationEvery interface between a consumer and a provider, should alternate a selection for either use the internal function built in the worker, or send the request to the provider. A basic pseudo code sample that implements a route-rule based on the busy state of worker would look like this: func Do(job Job) { if isbusy(){ } else { } Where "isbusy" can be a simple:func isbusy() bool{ } Code sampleA code sample of two separate microservices , and a small migration to a team worker linked out of the two microservices can be found in: https://github.com/guybrand/teamworkers/ Defining a team worker's scopeThe content of a team worker's scope (i.e. the combination of Microservices linked together) should consider the possibility and frequency each micro-service would interact with another micro-service, e.g. in an eCommerce website solution, it is very likely that a basket service would interact with catalog-product service and payment-service, and therefore a team worker consisting of these 3 Microservices may be a good set of choice, a service that supports for online chat in the same website, does not directly interact with the basket service and should not be linked in the same team worker. Orchestration tools(such as Kubernetes and Ansible), service meshes(such as [https://istio.io/docs/concepts/what-is-istio/ istio],[https://linkerd.io/ Linkerd], and [https://www.hashicorp.com/blog/consul-1-2-service-mesh consul]) and monitoring & analytics tools (Such as Datadog and New Relic) that interacts with workers and microservice, can utilize their metrics or AI to advise for the right composition or a team worker, and even configure and launch dynamic compilation of workers when new pods are required. Other interactionsTeam workers can interact with classic services or microservices. Creating a team worker can be selective for specific cases such as specific latency bottleneck, ease of debugging etc. In the same manner switching to team workers can be done moderately, and does not require a complete rewrite. References1. ^{{Cite web|url=https://www.oreilly.com/library/view/service-oriented-architecture-governance/9780470171257/9780470171257_the_inevitable_soa_trend.html|title=THE INEVITABLE SOA TREND - Service-Oriented Architecture Governance for the Services Driven Enterprise [Book]|website=www.oreilly.com|language=en|access-date=2019-03-04}} 2. ^{{Cite web|url=https://redmonk.com/sogrady/2017/07/20/soa-microservices/|title=The Difference Between SOA and Microservices Isn't Size|last=O'Grady|first=Stephen|date=2017-07-20|website=tecosystems|language=en-US|access-date=2019-03-04}} 3. ^{{Cite web|url=https://docs.aws.amazon.com/aws-technical-content/latest/microservices-on-aws/challenges-of-microservices.html|title=Challenges of Microservices - Microservices on AWS|website=docs.aws.amazon.com|access-date=2019-03-04}} 4. ^{{Cite web|url=https://cloudacademy.com/blog/microservices-architecture-challenge-advantage-drawback/|title=Microservices Architecture: Advantages and Drawbacks|date=2018-10-18|website=Cloud Academy|language=en-US|access-date=2019-03-04}} 5. ^{{Cite web|url=http://insights.sei.cmu.edu/sei_blog/2015/11/microservices-beyond-the-hype-what-you-gain-and-what-you-lose.html|title=Microservices Beyond the Hype: What You Gain and What You Lose|last=Merson|first=Paulo|website=https|language=en-us|access-date=2019-03-05}} 6. ^{{Cite web|url=https://docs.microsoft.com/en-us/windows/desktop/com/dcomscmremotecallflags|title=DCOMSCMRemoteCallFlags - Windows applications|last=GrantMeStrength|website=docs.microsoft.com|language=en-us|access-date=2019-03-25}} 7. ^{{Cite web|url=https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/createobject-function|title=CreateObject function (Visual Basic for Applications)|last=o365devx|website=docs.microsoft.com|language=en-us|access-date=2019-03-25}} 8. ^{{Cite web|url=https://dzone.com/articles/lessons-from-the-birth-of-microservices-at-google|title=Lessons From the Birth of Microservices at Google - DZone Microservices|website=dzone.com|language=en|access-date=2019-03-25}} 9. ^{{Cite web|url=https://trends.google.com/trends/explore/TIMESERIES?date=all&q=microservices&hl=en-AU&sni=4|title=Google Trends|website=Google Trends|access-date=2019-03-25}} 10. ^{{Cite web|url=http://microservices.io/patterns/client-side-discovery.html|title=Microservices Pattern: Client-side service discovery pattern|website=microservices.io|access-date=2019-03-26}} 11. ^{{Cite web|url=http://microservices.io/patterns/server-side-discovery.html|title=Microservices Pattern: Server-side service discovery pattern|website=microservices.io|access-date=2019-03-26}} 12. ^{{Cite web|url=http://microservices.io/patterns/service-registry.html|title=Microservices Pattern: Service registry pattern|website=microservices.io|access-date=2019-03-26}} 13. ^{{Cite web|url=https://dzone.com/articles/to-micro-or-mono-pros-and-cons-of-both-service-arc|title=To Micro or Mono – Pros and Cons of Both Service Architectures - DZone Microservices|website=dzone.com|language=en|access-date=2019-03-26}} 14. ^{{Cite web|url=https://raygun.com/blog/what-are-microservices/|title=What are microservices? The pros, cons, and how they work|website=Raygun Blog|language=en-us|access-date=2019-03-26}} 15. ^{{Cite web|url=http://dwmkerr.com/|title=The Death of Microservice Madness in 2018|date=2018-01-12|website=dwmkerr.com|language=en|access-date=2019-03-26}} 16. ^{{Cite web|url=https://segment.com/blog|title=Goodbye Microservices: From 100s of problem children to 1 superstar|website=Segment|language=en|access-date=2019-03-26}} 17. ^{{Cite web|url=https://adamdrake.com/enough-with-the-microservices.html|website=adamdrake.com|access-date=2019-03-26}} 18. ^{{Cite web|url=https://www.meetup.com/Go-Israel/events/kjvczlyzfbjb/|title=Go Israel March 2019 Meetup|website=Meetup|language=en|access-date=2019-03-26}} 19. ^Rugby football 20. ^{{Citation|title=Basketball|date=2019-03-24|url=https://en.wikipedia.org/w/index.php?title=Basketball&oldid=889180692|work=Wikipedia|language=en|access-date=2019-03-26}} 21. ^{{Citation|title=Ice hockey|date=2019-03-24|url=https://en.wikipedia.org/w/index.php?title=Ice_hockey&oldid=889223451|work=Wikipedia|language=en|access-date=2019-03-26}} |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。