Git Product home page Git Product logo

seismic-proto's Introduction

Cognite seismic APIs, query and ingestion are grpc based services building on protobuf files which can be found in this repo.

Structure and notes

We have two services - ingest and query.

  • All the rpc methods in these services can be found in ingest_service.proto and query_service.proto.

  • The messages used in these methods can be found in ingest_service_messages.proto and query_service_messages.proto.

  • Finally, some types that are common to both services are defined in type.proto

  • Some of the query methods, notably the ones querying for lines or whole cubes, use grpc streaming to transfer the data. They will send each message as a trace and keep the connection open until all traces have been sent. Make sure your client is able to receive those.

  • We use the word File to refer to a single seismic file/dataset/cube

  • Surveys can have many files attached to them, with different attributes or processing stages, and every file must belong to a survey

Generate clients

In case you want to use these services in python, please consider using our SDK instead of compiling the protobufs. You can do so with pip install cognite-seismic-sdk

For other languages, you can find instructions on how to generate a client stub based on the files in this repo in https://grpc.io/docs/tutorials/

You will need a valid api-key to access the services using your client. This api-key must be included as metadata in any requests to the rpc methods.

You must also ensure that you are using a secure connection, although it is not necessary to generate a valid certificate for it.

Finally, remember to set the maximum message length to a reasonable number. This is an example of how to do so (in python, but it applies to other languages as well):

import grpc 
from cognite.seismic.protos import query_service_pb2_grpc as query_service
from cognite.seismic._api.survey import SurveyAPI

query_host = 'api.cognitedata.com:443'
credentials = grpc.ssl_channel_credentials()
metadata = [("api-key", "SECRET")]
channel = grpc.secure_channel(
                                target=query_host, 
                                credentials=credentials, 
                                options=[('grpc.max_receive_message_length', 10*1024*1024)]
                             )
query = query_service.QueryStub(channel)

(The import query_service_pb2_grpc, in this case, is the file generated on the outcome of compiling the protobufs)

Generate documentation in html locally

  • Download the docker image for protoc-gen-doc using docker pull pseudomuto/protoc-gen-doc

  • Run the image using

sudo docker run --rm \
  -v $(pwd)/doc:/out \
  -v $(pwd):/cognite/seismic/protos \
  pseudomuto/protoc-gen-doc \
  --doc_opt=:ingest_job.proto,persisted_trace.proto

(We're using --doc_opt=: to remove files with internal messages that are not used by external services)

Contributions

Before opening a PR, it is a good idea to run prototool compile to verify the syntax of the new defs.

seismic-proto's People

Contributors

skairunner avatar amorken avatar mr-celo avatar elkasierra avatar renovate[bot] avatar mariuszcognite avatar jucc avatar bhavith avatar dmivankov avatar

Watchers

Peter Nicolai Motzfeldt avatar Louis Salin avatar Vegard Økland avatar Ermias avatar Morten Mjelva avatar Robert Collins avatar Pratuat Amatya avatar Trygve Andre Tønnesland avatar Simon Wolfgang Funke avatar James Cloos avatar Emil Sandstø avatar  avatar Aleksandrs Livincovs avatar Nakarin Phooripoom avatar Viral Shah avatar Jørgen Fagereng Wessel avatar Sivert Aasnæss avatar Kirils Mensikovs avatar Ilya petin avatar Audun Skaugen avatar Marcelo avatar Arthur Sund avatar Bogdan Orlov avatar Wim Notredame avatar Øystein Hagen Pettersen avatar Sergei avatar Eirik L. Vullum avatar DM avatar Daniel Priori avatar Luka Mikec avatar Maureen avatar Trond Erling Hundal avatar  avatar David Liu avatar Nils Barlaug avatar Christopher J. Tannum avatar Jonas Irgens Kylling avatar Øystein Haug Olsen avatar Vibha Srinivasan avatar Sebastian Duran avatar Johan avatar Robert Lombardo avatar Morten Hillbom avatar Jacek Lakomiec avatar Tor Erik avatar Lina A avatar  avatar  avatar Masato Umekawa avatar Alireza Kandeh avatar Rogerio Saboia Júnior avatar Ivar Stangeby avatar Udeshika Sewwandi avatar Daniel Alexander Fermin Nilsen avatar sachila avatar Per Magne Florvaag avatar QuocViet Le avatar Sagar Thalwar avatar Sture Lygren avatar Pedro Lindeza avatar Derek Reilly avatar Priyanka Perera avatar Marie Solvik Lepoutre avatar Amit Kumar Agrawal avatar Cecilie Uppard avatar Matthew Cameron avatar Rebecca Wiborg Seyfarth avatar Shehan Neomal Mark Fonseka avatar Iván avatar Shashan avatar  avatar Sennen De Almeida avatar

seismic-proto's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build-docs.yml
  • actions/checkout v3
  • JamesIves/github-pages-deploy-action v4.4.1
.github/workflows/lottery.yaml
  • actions/checkout v3
  • uesteibar/reviewer-lottery v2
.github/workflows/publish-docs.yml
  • actions/checkout v3
  • google-github-actions/auth v2
  • google-github-actions/setup-gcloud v2
.github/workflows/validate-proto.yml
  • actions/checkout v3
  • actions/checkout v3
  • uber/prototool 1.10.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.