芭蕾舞演员grpc如何创建客户端和服务器



在这个问题中,我们希望使用gRPC设计和构建评估管理系统的组件。该系统有三个用户配置文件:学习者、管理员和评估员。请注意,每个用户在系统中都应该有一个唯一的标识符。学习者注册课程,提交他/她注册的每门课程的每次评估作业,并最终检查他的/她的成绩。管理员添加新课程,并设置每个课程的评估次数和评估权重。他/她还为每门课程指派评估员。最后,分配给课程的评估员对提交的作业进行评估。简而言之,我们有以下操作:•create_courses,其中管理员创建多个课程,定义每个课程的作业数,并设置每个作业的权重。此操作返回每个创建课程的代码。它是双向流;•assign_curses,管理员将每个创建的课程分配给评估员;•create_users,其中创建了几个用户,每个用户都有一个特定的配置文件。用户被流式传输到服务器,一旦操作完成,就会返回响应;•submit_assignments,即学习者提交他/她注册的一门或多门课程的一项或多项作业。分配被流式传输到服务器,并且一旦操作完成就接收响应;•request_assignments,评估员要求提交他/她已分配课程的作业。请注意,分配只能标记一次。函数应将所有尚未标记的赋值进行流式传输;•submit_marks,评估员提交作业分数;•注册,学习者注册一门或几门课程。所有课程都会流式传输到服务器,操作完成后返回结果完成;1

Your task is to define a protocol buffer contract with the remote functions and implement both the client and the server in the Ballerina Language.
Assessment Criteria
We will follow the criteria below to assess this problem:
• Definition of the remote interface in Protocol Buffer. (25%)
• Implementation of the gRPC client in the Ballerina language. (25%)
• Implementation of the gRPC server and server-side logic in response to
the remote invocations in the Ballerina Language. (50%) Problem 2
Marks: 20/100
Problem
We wish to query and update COVID-19 statistics using a GraphQL API in this problem. The example below shows a single statistic with the date, the region, and the total number of deaths, confirmed_cases, recoveries and tested cases.
{
}
An update changes the statistics to the latest for a given region, while a query returns the latest statistics for that region.
Your task is to write a Graphql service in the Ballerina Language to query and update the COVID-19 statistics.
Assessment criteria
• Correct definition of the required object types. (15%)
• Correct Implementation of the service. (60%)
• Correct business logic in the API implementation. (25%)
"date"": "12/09/2021", "region": "Khomas", "deaths": 39, "confirmed_cases": 465, "recoveries": 67, "tested": 1200
Problem 3
Marks: 30/100
2
Problem
This problem focuses on a Restful API to manage a student record. A student is defined by a student number, a name, an email address and the courses the student took. For each course, there is the course code, the weights of the assessments in the course and the marks awarded for each assessment. The API should fulfil the following functions:
• Create a new student;
• Update student details;
• Update student’s course details; • lookup a single student;
• fetch all students;
• delete a student.
Note that the student number should serve as a unique identifier for a student. Your task is to define the API following the OpenAPI standard and implement
the client and service in the Ballerina language.
Evaluation criteria
We will follow the criteria below to assess this problem:
• A correct description of the API in OpenAPI. (40%)
• Implementation of the restful client and service in the Ballerina language.
(50%)
• Quality of design and implementation. (10%)
Submission Instructions
• This assignment is to be completed by groups of at most two students each.
• For each group, a repository should be created on Gitlab. The repository should have all group members set up as contributors.
• The submission date is Sunday, September 25 2022, at midnight. Please note that commits after that deadline will not be accepted. Therefore, a submission will be assessed based on the clone of the repository at the deadline.
• Any group that fails to submit on time will be awarded the mark 0.
• Although this is a group project, each member will receive a mark that reflects his/her contribution to the project. Each group member will be allowed to highlight his/her contribution during the presentation of the project. More particularly, if a student’s username does not appear in the commit log of the group repository, that student will be assumed not to
have contributed to the project and thus be awarded the mark 0.
• Each group is expected to present its project after the submission deadline.
3
• There should be no assumption about the execution environment of your code. It could be run using a specific framework or on the command line. • In the case of plagiarism (groups copying from each other or submissions
copied from the Internet), all submissions involved will be awarded the mark 0, and each student will receive a warning.
4

您可以在Ballerina文档[1]中找到创建gRPC客户端和服务器的步骤。

[1]https://ballerina.io/learn/by-example/grpc-simple/

添加更多与Ballerina gRPC客户端和服务器相关的资源。

[1]https://ballerina.io/learn/write-a-grpc-service-with-ballerina/

[2]https://medium.com/ballerina-techblog/introduction-to-grpc-on-ballerina-7819d98c4e2b

相关内容

最新更新