fiware-cepheus icon indicating copy to clipboard operation
fiware-cepheus copied to clipboard

Cepheus CEP in a multi-tenancy way

Open salc2 opened this issue 8 years ago • 8 comments

Is the Cepheus CEP ready for working alone in a multy-tenancy way without Cepheus Broker? I have been doing some test with a simple architecture: IoTAgent, Orion and Cepheus CEP And I just realized that the code where the requests are made isn't sending "Fiware-Service" neither "Fiware-ServicePath" SubscriptionManager headers are null.

salc2 avatar Jul 19 '17 19:07 salc2

You are right, Cepheus CEP is itself multi tenant (can handle CEP rules / event for multiple tenants using Fiware-Service and Fiware-ServicePath headers), but does not handle subscriptions to muti-tenant providers.

We had plans to had the capacity to register to multi tenant providers but this was not implemented.

marcc-orange avatar Jul 20 '17 12:07 marcc-orange

Hello @marcc-orange Thx for your answear. So if I would want to use Orion as in (provider) in my CEP rules, do I need to have set Orion in a default tenant (with orion mongo db) am I right? If I would want to implement subscriptions for muti-tenant orion configuration ( e.g. mongo orion-serviceone, orion-servicetwo ) theoretically would be enough to try to set TenantScope.getService and TenantScope.getServicePath in headers in ngsiClient.subscribeContext call, am I right? I mean theoretically, it maybe could be harder than that.

Thx you.

salc2 avatar Jul 20 '17 12:07 salc2

There is two ways to make Cepheus talk to multi-tenant providers such as Orion :

The first is the one you mentioned : if a tenant A on Cepheus tries to subscribe to a provider, Cepheus could automatically add the tenant A Service and ServicePath to the subscription. This would be simpler (no configuration of Service and ServicePath required for each provider), but limits a tenant to only talk to provider with the same tenant.

The second one is to have every provider in the configuration specify its tenant information by adding a Service and ServicePath. This is more powerful as a tenant A on Cepheus could subscribe to data of a tenant B on Orion. Not sure if any real use case could back up this one.

For the implementation on the first solution, you got the picture right.

marcc-orange avatar Jul 24 '17 07:07 marcc-orange

i want to ask if Cepheus-cep now able to handle subscriptions to Muti-tenant providers ?

AhmedEmad031 avatar Oct 12 '17 22:10 AhmedEmad031

Hi @AhmedEmad031 ,

No new features are currently planned. Contributions are welcomed. ;)

marcc-orange avatar Oct 13 '17 09:10 marcc-orange

Hello @marcc-orange

I want to ask if this issue is regarding the subscription where we can add Service and ServicePath in the provider section in configuration? As per my understanding from the closed issue: https://github.com/Orange-OpenSource/fiware-cepheus/issues/69 , Cepheus-cep now able to handle subscriptions to Multi-tenant providers by adding Service and ServicePath in the provider section in configuration.

If my above understanding is correct or if I have missed on something?

pooja1pathak avatar Sep 03 '18 05:09 pooja1pathak

Hello @pooja1pathak, yes the #69 is a good step in full support for multi-tenancy by Cepheus CEP. But some issues like #73 are still pending and thus prevent full support.

marcc-orange avatar Sep 03 '18 14:09 marcc-orange

Hello @marcc-orange , Thanks for your answer. I tried to reproduce issue https://github.com/Orange-OpenSource/fiware-cepheus/issues/73 and found that the request executes as expected without any issue.

I have added my observation on https://github.com/Orange-OpenSource/fiware-cepheus/issues/73. Please check and verify my observation.

pooja1pathak avatar Sep 11 '18 06:09 pooja1pathak