In Firebase is it possible to see what nodes are being listened too & how do you do it?

Multi tool use
Background
I'm creating an app with firebase, react & node. I would like to lock or warn users if some paths are being listened by multiple connections.
Question
Is it possible to get the number of connections looking at a particular part of the firebase?
Example
If a user is at someDocument/-LS_Ck1XNIyE6fm6QZbM
can i see if there's multiple connections at this point?
javascript firebase sockets firebase-realtime-database
add a comment |
Background
I'm creating an app with firebase, react & node. I would like to lock or warn users if some paths are being listened by multiple connections.
Question
Is it possible to get the number of connections looking at a particular part of the firebase?
Example
If a user is at someDocument/-LS_Ck1XNIyE6fm6QZbM
can i see if there's multiple connections at this point?
javascript firebase sockets firebase-realtime-database
add a comment |
Background
I'm creating an app with firebase, react & node. I would like to lock or warn users if some paths are being listened by multiple connections.
Question
Is it possible to get the number of connections looking at a particular part of the firebase?
Example
If a user is at someDocument/-LS_Ck1XNIyE6fm6QZbM
can i see if there's multiple connections at this point?
javascript firebase sockets firebase-realtime-database
Background
I'm creating an app with firebase, react & node. I would like to lock or warn users if some paths are being listened by multiple connections.
Question
Is it possible to get the number of connections looking at a particular part of the firebase?
Example
If a user is at someDocument/-LS_Ck1XNIyE6fm6QZbM
can i see if there's multiple connections at this point?
javascript firebase sockets firebase-realtime-database
javascript firebase sockets firebase-realtime-database
edited Jan 2 at 16:19
Frank van Puffelen
241k29385413
241k29385413
asked Jan 2 at 15:54


Joe LloydJoe Lloyd
4,08642948
4,08642948
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Yup. The Firebase Realtime Database can be used to build such a presence system. I recommend checking out the sample presence system in the documentation, as well as the documentation on the same page on detecting connection state and how onDisconnect
works.
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
add a comment |
I understood the question so that you want to limit reading data from some path to only limited number of users/connections.
There is no documented way of achieving this directly.
What I would suggest is to write restrictive database rules to prohibit direct access to this data. Then you could write a cloud function to implement this logic - administrative interface will circumvent the database rules.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009317%2fin-firebase-is-it-possible-to-see-what-nodes-are-being-listened-too-how-do-you%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yup. The Firebase Realtime Database can be used to build such a presence system. I recommend checking out the sample presence system in the documentation, as well as the documentation on the same page on detecting connection state and how onDisconnect
works.
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
add a comment |
Yup. The Firebase Realtime Database can be used to build such a presence system. I recommend checking out the sample presence system in the documentation, as well as the documentation on the same page on detecting connection state and how onDisconnect
works.
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
add a comment |
Yup. The Firebase Realtime Database can be used to build such a presence system. I recommend checking out the sample presence system in the documentation, as well as the documentation on the same page on detecting connection state and how onDisconnect
works.
Yup. The Firebase Realtime Database can be used to build such a presence system. I recommend checking out the sample presence system in the documentation, as well as the documentation on the same page on detecting connection state and how onDisconnect
works.
answered Jan 2 at 16:04
Frank van PuffelenFrank van Puffelen
241k29385413
241k29385413
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
add a comment |
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Thanks Frank. I was looking in the wrong part of the docs. This looks good.
– Joe Lloyd
Jan 2 at 16:09
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Maybe I understood the question wrong, but it seems to me that this solution will not provide the granularity implied in the original post.
– Sami Hult
Jan 2 at 16:11
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
Ah... I went of the title, which I now updated to reflect the actual question better. There is no way to track the current listeners. The closest I can think of is using the database profiler: firebase.google.com/docs/database/usage/profile
– Frank van Puffelen
Jan 2 at 16:20
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
I quickly checked and the database profiler shows the data for all users connected to your database. It only shows it in aggregate, but you'd at least be able to get an idea of where most activity is.
– Frank van Puffelen
Jan 5 at 15:54
add a comment |
I understood the question so that you want to limit reading data from some path to only limited number of users/connections.
There is no documented way of achieving this directly.
What I would suggest is to write restrictive database rules to prohibit direct access to this data. Then you could write a cloud function to implement this logic - administrative interface will circumvent the database rules.
add a comment |
I understood the question so that you want to limit reading data from some path to only limited number of users/connections.
There is no documented way of achieving this directly.
What I would suggest is to write restrictive database rules to prohibit direct access to this data. Then you could write a cloud function to implement this logic - administrative interface will circumvent the database rules.
add a comment |
I understood the question so that you want to limit reading data from some path to only limited number of users/connections.
There is no documented way of achieving this directly.
What I would suggest is to write restrictive database rules to prohibit direct access to this data. Then you could write a cloud function to implement this logic - administrative interface will circumvent the database rules.
I understood the question so that you want to limit reading data from some path to only limited number of users/connections.
There is no documented way of achieving this directly.
What I would suggest is to write restrictive database rules to prohibit direct access to this data. Then you could write a cloud function to implement this logic - administrative interface will circumvent the database rules.
answered Jan 2 at 16:09


Sami HultSami Hult
2,3871613
2,3871613
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009317%2fin-firebase-is-it-possible-to-see-what-nodes-are-being-listened-too-how-do-you%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
8C3c5mI xt,aqsHEMqKOt1lmeUiRZXXDg x 288t2sYGuiP,OedP9Dn2x2UrWMq9Pc