René's URL Explorer Experiment


Title: [Discuss] Use gRPC gateway to generate REST endpoints · Issue #20 · feast-dev/feast-java-old · GitHub

Open Graph Title: [Discuss] Use gRPC gateway to generate REST endpoints · Issue #20 · feast-dev/feast-java-old

X Title: [Discuss] Use gRPC gateway to generate REST endpoints · Issue #20 · feast-dev/feast-java-old

Description: Introduction Right now, feast-java uses RestController (example code) to implement REST endpoints for both feast-core and feast-serving. However, this approach will increase maintenance cost. Therefore, generating REST endpoint from prot...

Open Graph Description: Introduction Right now, feast-java uses RestController (example code) to implement REST endpoints for both feast-core and feast-serving. However, this approach will increase maintenance cost. There...

X Description: Introduction Right now, feast-java uses RestController (example code) to implement REST endpoints for both feast-core and feast-serving. However, this approach will increase maintenance cost. There...

Opengraph URL: https://github.com/feast-dev/feast-java-old/issues/20

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Discuss] Use gRPC gateway to generate REST endpoints","articleBody":"## Introduction\r\n\r\nRight now, feast-java uses `RestController` ([example code](https://github.com/feast-dev/feast-java/blob/8541f36ecf28569db7ece35e936b5e9d83db3cde/serving/src/main/java/feast/serving/controller/ServingServiceRestController.java)) to implement REST endpoints for both feast-core and feast-serving. However, this approach will increase maintenance cost. Therefore, generating REST endpoint from proto definitions is a cleaner way.\r\n\r\n## Proposed Change\r\n\r\nUse [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) to generate the REST endpoint. \r\n\r\n### Steps\r\n#### 1. Add gateway server to translate REST call into gRPC call to another process inside the container\r\nThe example gateway server will look like:\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"context\"\r\n\t\"flag\"\r\n\t\"fmt\"\r\n\t\"net/http\"\r\n\r\n\t\"github.com/golang/glog\"\r\n\t\"github.com/grpc-ecosystem/grpc-gateway/v2/runtime\"\r\n\t\"google.golang.org/grpc\"\r\n\r\n\tcoreGateWay \"pkg/gateway/generated/feast/core\"\r\n\tservingGateWay \"pkg/gateway/generated/feast/serving\"\r\n)\r\n\r\n// gRPC serving endpoint\r\nvar servingServerEndpoint = flag.String(\"serving-server-endpoint\", \"localhost:6566\", \"gRPC server endpoint\")\r\n\r\nfunc run() error {\r\n\tctx := context.Background()\r\n\tctx, cancel := context.WithCancel(ctx)\r\n\tdefer cancel()\r\n\r\n\tmux := runtime.NewServeMux()\r\n\topts := []grpc.DialOption{grpc.WithInsecure()}\r\n\r\n\t// Register ServingServing endpoint\r\n\terr = servingGateWay.RegisterServingServiceHandlerFromEndpoint(ctx, mux, *servingServerEndpoint, opts)\r\n\tif err != nil {\r\n\t\treturn err\r\n\t}\r\n\r\n\t// Start HTTP server (and proxy calls to gRPC server endpoint)\r\n\treturn http.ListenAndServe(\":8000\", mux)\r\n}\r\n\r\nfunc main() {\r\n\tflag.Parse()\r\n\tdefer glog.Flush()\r\n\r\n\tif err := run(); err != nil {\r\n\t\tfmt.Println(err)\r\n\t\tglog.Fatal(err)\r\n\t}\r\n}\r\n```\r\n\r\n#### 2. Use [supervisord](http://supervisord.org/) to start two processes inside a container\r\n\r\nWe can provide instructions to use different entry points. Here's an example config:\r\n\r\n```\r\n[supervisord]\r\nnodaemon=true\r\n\r\n[program:serving]\r\ndirectory=/\r\nuser=root\r\ncommand=java -jar /opt/feast/feast-serving.jar --spring.config.location=classpath:/application.yml,file:/etc/feast/%(ENV_FEAST_SERVING_YML_NAME)s \r\n\r\n[program:gateway]\r\ndirectory=/\r\nuser=root\r\ncommand=/opt/feast/gateway_server \r\n            --serving-server-endpoint=%(ENV_FEAST_SERVING_URL)s\r\nnumprocs=1\r\n```\r\n\r\n#### 3. Remove existing REST controllers' code\r\n\r\nAs titled.","author":{"url":"https://github.com/randxie","@type":"Person","name":"randxie"},"datePublished":"2021-04-04T17:51:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/20/feast-java-old/issues/20"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9d539dca-0a40-1872-8b46-a1ae58633f8e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE632:243A4F:533AC8:7436A2:697B4766
html-safe-nonce307a3617d6418547f6148e9d8972d3b8118482fed512f752e141ef4b886e9135
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjMyOjI0M0E0Rjo1MzNBQzg6NzQzNkEyOjY5N0I0NzY2IiwidmlzaXRvcl9pZCI6IjY4NzU1MDU4MDY2NjYzMTk3MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7a5d9845a1e245d1f862b77f47841dad92af071c03a8316da0146327e42e53f8
hovercard-subject-tagissue:849926156
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast-java-old/20/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4606c61f0e9c0efa70f0fdc18529cd4657fe65f8a42ce713176cb61ab7ddd4a5/feast-dev/feast-java-old/issues/20
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4606c61f0e9c0efa70f0fdc18529cd4657fe65f8a42ce713176cb61ab7ddd4a5/feast-dev/feast-java-old/issues/20
og:image:altIntroduction Right now, feast-java uses RestController (example code) to implement REST endpoints for both feast-core and feast-serving. However, this approach will increase maintenance cost. There...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerandxie
hostnamegithub.com
expected-hostnamegithub.com
None6fe64d94889230be19a900846cfc91707e7dd4206878d6c208922b46a6b0735d
turbo-cache-controlno-preview
go-importgithub.com/feast-dev/feast-java-old git https://github.com/feast-dev/feast-java-old.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id333248009
octolytics-dimension-repository_nwofeast-dev/feast-java-old
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id333248009
octolytics-dimension-repository_network_root_nwofeast-dev/feast-java-old
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release35925b5d54d957e7d3b7f55916450a693827ca42
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast-java-old/issues/20#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast-java-old%2Fissues%2F20
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast-java-old%2Fissues%2F20
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=feast-dev%2Ffeast-java-old
Reloadhttps://github.com/feast-dev/feast-java-old/issues/20
Reloadhttps://github.com/feast-dev/feast-java-old/issues/20
Reloadhttps://github.com/feast-dev/feast-java-old/issues/20
feast-dev https://github.com/feast-dev
feast-java-oldhttps://github.com/feast-dev/feast-java-old
Notifications https://github.com/login?return_to=%2Ffeast-dev%2Ffeast-java-old
Fork 26 https://github.com/login?return_to=%2Ffeast-dev%2Ffeast-java-old
Star 13 https://github.com/login?return_to=%2Ffeast-dev%2Ffeast-java-old
Code https://github.com/feast-dev/feast-java-old
Issues 3 https://github.com/feast-dev/feast-java-old/issues
Pull requests 2 https://github.com/feast-dev/feast-java-old/pulls
Actions https://github.com/feast-dev/feast-java-old/actions
Projects 0 https://github.com/feast-dev/feast-java-old/projects
Security 0 https://github.com/feast-dev/feast-java-old/security
Insights https://github.com/feast-dev/feast-java-old/pulse
Code https://github.com/feast-dev/feast-java-old
Issues https://github.com/feast-dev/feast-java-old/issues
Pull requests https://github.com/feast-dev/feast-java-old/pulls
Actions https://github.com/feast-dev/feast-java-old/actions
Projects https://github.com/feast-dev/feast-java-old/projects
Security https://github.com/feast-dev/feast-java-old/security
Insights https://github.com/feast-dev/feast-java-old/pulse
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast-java-old/issues/20
New issuehttps://github.com/login?return_to=https://github.com/feast-dev/feast-java-old/issues/20
[Discuss] Use gRPC gateway to generate REST endpointshttps://github.com/feast-dev/feast-java-old/issues/20#top
https://github.com/woop
https://github.com/randxie
https://github.com/randxie
randxiehttps://github.com/randxie
on Apr 4, 2021https://github.com/feast-dev/feast-java-old/issues/20#issue-849926156
example codehttps://github.com/feast-dev/feast-java/blob/8541f36ecf28569db7ece35e936b5e9d83db3cde/serving/src/main/java/feast/serving/controller/ServingServiceRestController.java
grpc-gatewayhttps://github.com/grpc-ecosystem/grpc-gateway
supervisordhttp://supervisord.org/
woophttps://github.com/woop
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.