OData as API-Gateway in MicroService architect - odata

I want to use OData as API-Gateway. Is it possible? Is there any example of OData that get rest request and use another service instead of entity framework provider?
I have some service that provide data and my services are using deferent type of databases SQL and NO-SQL. I want to use OData as a service provider of my architecture which my clients only see one endpoint and send OData requests then I can manage which service must response the request.
I searched and found there is some way to create custom provider for OData. Is there a way to use OData as API-Gateway?

Related

Consume OData Service in SAP Build Prototypes

​When we are creating prototypes on ​​Build we can consume OData service from Excel​.
My doubt is if we can consume OData Gateway Service on Build? If it's possible, how can I do it?
Currently, it is not possible. All you can do is import the metadata as Edmx file and fill the mock data corresponding to that metadata.
There is an option;
You can also import objects from EDMX file (OData)
You can also try SAP Cloud Platform WebIDE. You can easily create a destination using your OData Gateway service and consume it via a template app.

Service Fabric Stateful OData service

is it possible/is there an example to build a stateful service that exposes OData endpoint?
The point is to collect data in such a service and then expose the collection via OData endpoint
Regards,
Stefan
Sure, you can expose any kind of endpoint using whatever protocol or framework you want in a stateful service. I recommend using OData for Web API.
Here's an example project that uses Web API in a stateful service: https://github.com/Azure-Samples/service-fabric-dotnet-getting-started/tree/master/Services/WordCount/WordCount.Service

Will OData Service implement both metadata document and service document definitely?

I'm new to the OData protocol.
I saw that it seems like there are 2 types of well-defined resources that describe the OData Service Data Model, which are Service Document and Metadata Document.
But I want to know that if both of these two resources can be found at the OData Service definitely / for sure?
Since I did not see any restriction from the OData specifications that OData Service must fulfil these 2 resources together during implementation, I guess that there is only one type of Service Data Model that can be found from service.
I really appreciate if any one can help to clarify it.
Thanks!
It depends on which libraries is used to implement the OData service. For example, if the service is implemented using ASP.NET Web API for OData or RESTier, the two documents will both exist for sure.

Consume Windows service from WebAPI

Is it possible to consume WebAPi into windows service. Because WebAPI is http protocol, so iam not sure weather i will consume WebApi.
I tried search for consuming WebAPI with Windows service. I can't even find single examples.
Can any face similar kind of scenario
Yes we can able able to consume WebAPi inside the Windows service. Since it is windows based service we need consume it with HttpClient object.

Wcf Web APi OData

I have recently discovered OData & the new WCF Web APi library on codeplex. The web api allows me to expose results as IQueryable, which allows me to expose URL's in the OData format. Myn question is what is the difference between this and a regular OData Service, I read the following blog post http://phejndorf.wordpress.com/2011/07/15/wcf-web-api-odata-format-doesnt-mean-odata-service/ but I am unsure what the OP means.
Thanks
The WCF Web API supports adding a [QueryComposition] attribute to a function so you can use the OData $filter=.. style of filtering data on the server and sending only a subset back to the client.
With OData, I should say WCF Data Services, there is much more that just querying. You can do all of the CRUD operations. It also means you are using the OData, is an AtomPub superset, protocol where with WCF Web API you do whatever you like. OData is actually a hypermedia format that contains metada, relations etc.

Resources