RPC, push messaging, microservices availability during deployment

111 views
Skip to first unread message

Kirill Chilingarashvili

unread,
Apr 15, 2016, 1:52:31 AM4/15/16
to DDD/CQRS
I am trying to get my head around setting up few independent services with their own database, but cannot understand how downtime of one of them should be handled by others

The use case is simple.
suppose there is an Identity service
it issues security tokens, can be configured to have many clients, can be used to administer users, groups, roles, permissions

and there is a client "A" service.
There client can register in system A, pass registration by providing some data to client A website, and use client A specific pages, services

now client A service wants to use user roles, permissions specific to client A user to limit his access to resources.
so client A needs to do the following:

ask identity service to add roles, permissions as user goes through registration and his profile is approved by business process
and after identity issues token the client A service can use the token claims and decide where the user has access to


There are two options:
1) RPC into identity service - need to think about possible downtime of identity svc
2) push message to identity service - dont need to think about possible downtime of identity svc

The downside of 1) - is the downside of using RPC - what happens when identity is temporarily unavailable - should client A service have retry logic?
The downside of 2) - is the identity service should become a downstream bounded context - so it becomes depending on client A bounded context - thus the logic of client A roles leaks into identity service, - for example client A service throwing a message - "registration completed" - should be translated in identity as: when client is client A, and message is "registration completed" -> add role "registered"

Which approach would you use?


Ben Kloosterman

unread,
Apr 15, 2016, 4:21:19 AM4/15/16
to ddd...@googlegroups.com
Firstly this is a problem already solved use an identity service which allows it to be taken down eg AD , openAuth. Got to be cheaper than rolling your own.

Now what do you do when your AD tree is down ?  If its important enough you have backup nodes.

Dont use RPC  ever ( well almost ever) , not be confused with http with a RPC style method found in some MS products.

As a concept you need to minimize down time which is what Micro Service solutions like Service Fabric address  ( fall over , redundancy , fast switching)  . Note you can also  bring in some new instances point the existing services using them at these and then replace the original services and then point the other services back , Dynamic configuration can be important  in some cases.

Ben



Kirill Chilingarashvili

unread,
Apr 15, 2016, 8:27:41 AM4/15/16
to DDD/CQRS
Thanks for useful thoughts.

Yes I plan to integrate some good secure identity provider,
And I will have a look at Service Fabric (I left azure last year because deployments were very slow, but somehow I missed service fabric)

But the question about how to implement push with business use case where client A app wants the user to elevate rights (assign role)
one option which I think of as well - is to send command message, such that the identity service/product/provider doesnot need to have business logic about client A
Reply all
Reply to author
Forward
0 new messages