A
A
Andrey Strelkov2018-07-18 10:52:26
API
Andrey Strelkov, 2018-07-18 10:52:26

How to implement notification service inside Intranet network?

Good afternoon. The question is big, but so far the architecture is of interest as it should be.
So, imagine there is a large enterprise, with an Intranet network, Active Directory with about 5000 active users. Within the enterprise, numerous desktop and web applications have been created by the development department.
It is necessary to create a notification service that can be used both by developers from the side of their applications (i.e., integrate with it and send notifications using it) and end users who, using the desktop client or web client, receive notifications addressed to them .
One of the main requirements of these notifications is that they must all be stored somewhere, namely in the database, and each notification must have its own recipient, the readability of which must also be recorded in the database.
I'm just a beginner C# developer, I'm just starting to learn it, so I'm still trying to understand the concept of how it should work, considering that this service should have various additional and mandatory functions in the future (such as API access control, the ability to create notifications, reading it, etc.)
First I want to understand how it should be at the architectural level, so that later I can easily finish it.
I ask you to treat my statements as a completely new developer.
As I see it, let's say Oracle is used as a database, although I mean what needs to be done so that it doesn't matter which database, MySQL, MSSQL, Postgresql, etc.
Because I mean that the database is used only as a storage, only for CRUD (no business logic should be in it, I want to put business logic in the application) I
liked the database model here www.vertabelo.com/blog/technical-articles/database..
Because _ it has the concept of exactly one message, and separate notifications linked to a message for each user, as well as the ideology of subscription groups.
Those. in the database, roughly speaking, I have a set of 3 tables for the first simplest implementation, these are message, message_recipient and user. With the help of which it is already possible to create messages of their notification with the fact of being read and with a connection with the recipient.
The very mechanism for creating these messages, I want to place in a separate living API in the form of WebAPI in C #, which, according to the program, will at least have a set of several methods (or whatever they are called differently), with which you can create a message and receive a message.
Those. the developer will send a certain HTTP request to WebAPI, where at least the parameters will indicate the Message Text, the Recipient/Firs Identifier. For example:
MESSAGE TEXT: A task has been assigned to you
RECIPIENT: "ivanov.aa","petrov.bb","sidorov.cc"
Thus, one row will be created in the message table in the database (since one message) in the message_recipient table 3 rows (since 3 recipients) with a link for one row from the message table and one link from each row to the user table, respectively by recipient
Thus, a certain WebAPI will hang on the application server, waiting for requests, to which developers will access from their applications (here, of course, for the future it will be necessary to somehow implement the differentiation of access rights to the API, i.e. in general, the ability to create a message , the ability to send messages to whom (to which users or immediately subscriptions with a group of users / subscribers) but that's later
And then it turns out you need at least a desktop client that will hang in the user's tray and periodically poll the same WebAPI to receive new notifications with the context in the form of the current user authorized in the OS. To which WebAPI should issue only those messages that are available via links to the current user.
While not looking further ahead, you can immediately advise, warn and recommend. Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
m0nym, 2018-07-18
@m0nym

Take Jabber as a basis.
Jabber server - there are several to choose from.
Libraries for the client under Jabber - more than enough

A
Andrey Nikolaev, 2018-07-18
@gromdron

It seems to me that the question initially is not to write your own service, but to send the appropriate notifications.
Again, notifications are sent somewhere - for example, to an application or to mail, but then all employees should have it.
And what about all the employees who work at such a large enterprise? That's right - mail.
What are the advantages of using mail over other options?
1) All office workers have it.
2) It is cross-platform. Those. and Android, iOS, Windows, Mac etc
3) It already saves sent notifications (no need to worry about storage, because we always know who, when and to whom sent)
4) Many servers already have a layer in the form of Web-API or ready-made protocols (smtp) and many implementations
. What are the disadvantages:
1) Not all employees may have it. For example, loaders may not have it, but I do not think that you will send notifications to them. In extreme cases, you can start
2) Sends only text messages (not push, not commands, etc.). But it looks like you need it.
As a result, you don’t need to write anything, just enter your corporate mail and that’s it.
PS If you really want to write your own non-optimal duplicate bike, then you can put your application in front of it with a buffer, to which everyone else will refer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question