# Multiple users with same session/state.

**URL:** <https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918>\
**Category:** Community Support\
**Created:** [January 11, 2016, 3:16am UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918 "2016-01-11T03:16:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geoff\_Gillett](https://discourse.bokeh.org/letter_avatar_proxy/v4/letter/g/e56c9b/32.png) [@Geoff\_Gillett](https://discourse.bokeh.org/u/Geoff_Gillett)\
**Post date:** [January 11, 2016, 3:16am UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/1 "2016-01-11T03:16:47Z")

</div>

Hi,

Bokeh is a very nice piece of work.

I have been using 0.10 to monitor some experimental equipment via streaming plots and bokeh-server. Version 0.11 looks like it brings vast improvements to the server and callbacks to python, perhaps I can finally achieve the things I could not with 0.10.

What I am trying to do is add control of the equipment to the bokeh app via buttons and python server code, but what I’d like is to be able to have multiple users be able to control it and see the same state. Is this currently possible using only bokeh and not some other framework? If bokeh alone cannot handle this what would you recommend for embedding the bokeh plots in?

To be more clear, for example a toggle button, is it possible for one user to click it and another to see its new state? There would only ever be a few users.

The current 0.10 version only monitors the sensors, the main issue I had was the URL had session/document ID’s in it, each time the system was restarted this would change, making it difficult to tell my colleagues where to point their browser to check the equipment. From a incomplete scan of the new docs it looks like a fixed URL is now possible, is that correct?

Thanks again for all the great work.

Geoff Gillett.

---

<div class="post-metadata">

**Author:** ![Havoc\_Pennington](https://discourse.bokeh.org/letter_avatar_proxy/v4/letter/h/cab0a1/32.png) [@Havoc\_Pennington](https://discourse.bokeh.org/u/Havoc_Pennington)\
**Post date:** [January 11, 2016, 6:19pm UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/2 "2016-01-11T18:19:48Z")

</div>

If you want absolutely all state shared every user could connect with the same ?bokeh-session-id=something parameter and they will share the session. Right now we don’t have a way to “force” links that don’t specify a session to go to a certain session though so users would have to always use the special link.

If only certain state will be shared, if you are fine only ever having 1 process (which will limit your scale) you can use a server\_lifecycle.py to set up server-global code and stick values to the document for each session in an on\_session\_created. The docs have a section on this.

If you need to be able to scale past 1 process, you probably have to use a backing data store of some kind like Redis or a sql database or whatever you like.

Havoc

> **···**
>
> On Jan 10, 2016, at 10:16 PM, baldrik [geoff.gillett@gmail.com](mailto:geoff.gillett@gmail.com) wrote:
> 
> > Hi,
> > 
> > Bokeh is a very nice piece of work.
> > 
> > I have been using 0.10 to monitor some experimental equipment via streaming plots and bokeh-server. Version 0.11 looks like it brings vast improvements to the server and callbacks to python, perhaps I can finally achieve the things I could not with 0.10.
> > 
> > What I am trying to do is add control of the equipment to the bokeh app via buttons and python server code, but what I’d like is to be able to have multiple users be able to control it and see the same state. Is this currently possible using only bokeh and not some other framework? If bokeh alone cannot handle this what would you recommend for embedding the bokeh plots in?
> 
> > To be more clear, for example a toggle button, is it possible for one user to click it and another to see its new state? There would only ever be a few users.
> > 
> > The current 0.10 version only monitors the sensors, the main issue I had was the URL had session/document ID’s in it, each time the system was restarted this would change, making it difficult to tell my colleagues where to point their browser to check the equipment. From a incomplete scan of the new docs it looks like a fixed URL is now possible, is that correct?
> > 
> > Thanks again for all the great work.
> > 
> > Geoff Gillett.
> 
> > –
> > 
> > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+unsubscribe@continuum.io](mailto:bokeh+unsubscribe@continuum.io).
> > 
> > To post to this group, send email to [bokeh@continuum.io](mailto:bokeh@continuum.io).
> > 
> > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).

---

<div class="post-metadata">

**Author:** ![Geoff\_Gillett](https://discourse.bokeh.org/letter_avatar_proxy/v4/letter/g/e56c9b/32.png) [@Geoff\_Gillett](https://discourse.bokeh.org/u/Geoff_Gillett)\
**Post date:** [January 12, 2016, 3:57am UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/3 "2016-01-12T03:57:55Z")

</div>

Thanks Havoc,

Only one process not a problem it does not need to scale, I’ll read the the docs on the new lifecycle hooks, thanks for the pointer.

> **···**
>
> > On 12 Jan 2016, at 4:19 AM, Havoc Pennington [hpennington@continuum.io](mailto:hpennington@continuum.io) wrote:
> 
> > 
> 
> > If you want absolutely all state shared every user could connect with the same ?bokeh-session-id=something parameter and they will share the session. Right now we don’t have a way to “force” links that don’t specify a session to go to a certain session though so users would have to always use the special link.
> 
> > 
> 
> > If only certain state will be shared, if you are fine only ever having 1 process (which will limit your scale) you can use a server\_lifecycle.py to set up server-global code and stick values to the document for each session in an on\_session\_created. The docs have a section on this.
> 
> > 
> 
> > If you need to be able to scale past 1 process, you probably have to use a backing data store of some kind like Redis or a sql database or whatever you like.
> 
> > 
> 
> > Havoc
> 
> > 
> 
> > On Jan 10, 2016, at 10:16 PM, baldrik [geoff.gillett@gmail.com](mailto:geoff.gillett@gmail.com) wrote:
> 
> > > Hi,
> > > 
> > > Bokeh is a very nice piece of work.
> > > 
> > > I have been using 0.10 to monitor some experimental equipment via streaming plots and bokeh-server. Version 0.11 looks like it brings vast improvements to the server and callbacks to python, perhaps I can finally achieve the things I could not with 0.10.
> > > 
> > > What I am trying to do is add control of the equipment to the bokeh app via buttons and python server code, but what I’d like is to be able to have multiple users be able to control it and see the same state. Is this currently possible using only bokeh and not some other framework? If bokeh alone cannot handle this what would you recommend for embedding the bokeh plots in?
> 
> > > To be more clear, for example a toggle button, is it possible for one user to click it and another to see its new state? There would only ever be a few users.
> > > 
> > > The current 0.10 version only monitors the sensors, the main issue I had was the URL had session/document ID’s in it, each time the system was restarted this would change, making it difficult to tell my colleagues where to point their browser to check the equipment. From a incomplete scan of the new docs it looks like a fixed URL is now possible, is that correct?
> > > 
> > > Thanks again for all the great work.
> > > 
> > > Geoff Gillett.
> 
> > >
> 
> > > –
> > > 
> > > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > > 
> > > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+unsubscribe@continuum.io](mailto:bokeh+unsubscribe@continuum.io).
> > > 
> > > To post to this group, send email to [bokeh@continuum.io](mailto:bokeh@continuum.io).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io?utm_medium=email&utm_source=footer).
> > > 
> > > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
> 
> > 
> 
> > –
> > 
> > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+unsubscribe@continuum.io](mailto:bokeh+unsubscribe@continuum.io).
> > 
> > To post to this group, send email to [bokeh@continuum.io](mailto:bokeh@continuum.io).
> > 
> > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/800E3FB5-5E63-4961-9007-07AAD97FF563%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/800E3FB5-5E63-4961-9007-07AAD97FF563%40continuum.io?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).

---

<div class="post-metadata">

**Author:** ![Geoff\_Gillett](https://discourse.bokeh.org/letter_avatar_proxy/v4/letter/g/e56c9b/32.png) [@Geoff\_Gillett](https://discourse.bokeh.org/u/Geoff_Gillett)\
**Post date:** [January 12, 2016, 4:24am UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/4 "2016-01-12T04:24:19Z")

</div>

Thanks Havoc,

A single process is fine, I’ll checkout the docs for the new lifecycle hooks, thanks for the pointer.

> **···**
>
> On Tuesday, 12 January 2016 04:19:52 UTC+10, Havoc Pennington wrote:
> 
> > If you want absolutely all state shared every user could connect with the same ?bokeh-session-id=something parameter and they will share the session. Right now we don’t have a way to “force” links that don’t specify a session to go to a certain session though so users would have to always use the special link.
> 
> > 
> 
> > If only certain state will be shared, if you are fine only ever having 1 process (which will limit your scale) you can use a server\_lifecycle.py to set up server-global code and stick values to the document for each session in an on\_session\_created. The docs have a section on this.
> 
> > 
> 
> > If you need to be able to scale past 1 process, you probably have to use a backing data store of some kind like Redis or a sql database or whatever you like.
> 
> > 
> 
> > Havoc
> 
> > 
> 
> > On Jan 10, 2016, at 10:16 PM, baldrik [geoff....@gmail.com](mailto:geoff....@gmail.com) wrote:
> 
> > > Hi,
> > > 
> > > Bokeh is a very nice piece of work.
> > > 
> > > I have been using 0.10 to monitor some experimental equipment via streaming plots and bokeh-server. Version 0.11 looks like it brings vast improvements to the server and callbacks to python, perhaps I can finally achieve the things I could not with 0.10.
> > > 
> > > What I am trying to do is add control of the equipment to the bokeh app via buttons and python server code, but what I’d like is to be able to have multiple users be able to control it and see the same state. Is this currently possible using only bokeh and not some other framework? If bokeh alone cannot handle this what would you recommend for embedding the bokeh plots in?
> 
> > > To be more clear, for example a toggle button, is it possible for one user to click it and another to see its new state? There would only ever be a few users.
> > > 
> > > The current 0.10 version only monitors the sensors, the main issue I had was the URL had session/document ID’s in it, each time the system was restarted this would change, making it difficult to tell my colleagues where to point their browser to check the equipment. From a incomplete scan of the new docs it looks like a fixed URL is now possible, is that correct?
> > > 
> > > Thanks again for all the great work.
> > > 
> > > Geoff Gillett.
> 
> > > –
> > > 
> > > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > > 
> > > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+un...@continuum.io](mailto:bokeh+un...@continuum.io).
> > > 
> > > To post to this group, send email to [bo...@continuum.io](mailto:bo...@continuum.io).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io?utm_medium=email&utm_source=footer).
> > > 
> > > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).

---

<div class="post-metadata">

**Author:** ![Jimmy\_Hung](https://discourse.bokeh.org/letter_avatar_proxy/v4/letter/j/49beb7/32.png) [@Jimmy\_Hung](https://discourse.bokeh.org/u/Jimmy_Hung)\
**Post date:** [January 12, 2016, 5:38pm UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/5 "2016-01-12T17:38:28Z")

</div>

how to be removed from the distribution list. thank you

> **···**
>
> On Mon, Jan 11, 2016 at 9:57 PM, Geoff Gillett [geoff.gillett@gmail.com](mailto:geoff.gillett@gmail.com) wrote:
> 
> > Thanks Havoc,
> 
> > Only one process not a problem it does not need to scale, I’ll read the the docs on the new lifecycle hooks, thanks for the pointer.
> 
> > 
> 
> > > On 12 Jan 2016, at 4:19 AM, Havoc Pennington [hpennington@continuum.io](mailto:hpennington@continuum.io) wrote:
> 
> > >
> 
> > > If you want absolutely all state shared every user could connect with the same ?bokeh-session-id=something parameter and they will share the session. Right now we don’t have a way to “force” links that don’t specify a session to go to a certain session though so users would have to always use the special link.
> 
> > >
> 
> > > If only certain state will be shared, if you are fine only ever having 1 process (which will limit your scale) you can use a server\_lifecycle.py to set up server-global code and stick values to the document for each session in an on\_session\_created. The docs have a section on this.
> 
> > >
> 
> > > If you need to be able to scale past 1 process, you probably have to use a backing data store of some kind like Redis or a sql database or whatever you like.
> 
> > >
> 
> > > Havoc
> 
> > >
> 
> > > On Jan 10, 2016, at 10:16 PM, baldrik [geoff.gillett@gmail.com](mailto:geoff.gillett@gmail.com) wrote:
> 
> > > > Hi,
> > > > 
> > > > Bokeh is a very nice piece of work.
> > > > 
> > > > I have been using 0.10 to monitor some experimental equipment via streaming plots and bokeh-server. Version 0.11 looks like it brings vast improvements to the server and callbacks to python, perhaps I can finally achieve the things I could not with 0.10.
> > > > 
> > > > What I am trying to do is add control of the equipment to the bokeh app via buttons and python server code, but what I’d like is to be able to have multiple users be able to control it and see the same state. Is this currently possible using only bokeh and not some other framework? If bokeh alone cannot handle this what would you recommend for embedding the bokeh plots in?
> 
> > > > To be more clear, for example a toggle button, is it possible for one user to click it and another to see its new state? There would only ever be a few users.
> > > > 
> > > > The current 0.10 version only monitors the sensors, the main issue I had was the URL had session/document ID’s in it, each time the system was restarted this would change, making it difficult to tell my colleagues where to point their browser to check the equipment. From a incomplete scan of the new docs it looks like a fixed URL is now possible, is that correct?
> > > > 
> > > > Thanks again for all the great work.
> > > > 
> > > > Geoff Gillett.
> 
> > > >
> 
> > > > –
> > > > 
> > > > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > > > 
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+unsubscribe@continuum.io](mailto:bokeh+unsubscribe@continuum.io).
> > > > 
> > > > To post to this group, send email to [bokeh@continuum.io](mailto:bokeh@continuum.io).
> > > > 
> > > > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io?utm_medium=email&utm_source=footer).
> > > > 
> > > > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
> 
> > >
> 
> > > –
> > > 
> > > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > > 
> > > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+unsubscribe@continuum.io](mailto:bokeh+unsubscribe@continuum.io).
> > > 
> > > To post to this group, send email to [bokeh@continuum.io](mailto:bokeh@continuum.io).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/800E3FB5-5E63-4961-9007-07AAD97FF563%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/800E3FB5-5E63-4961-9007-07AAD97FF563%40continuum.io?utm_medium=email&utm_source=footer).
> > > 
> > > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
> 
> > 
> 
> > –
> > 
> > You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an email to [bokeh+unsubscribe@continuum.io](mailto:bokeh+unsubscribe@continuum.io).
> > 
> > To post to this group, send email to [bokeh@continuum.io](mailto:bokeh@continuum.io).
> 
> > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/6A6B388F-6ADB-4D79-A5FD-D05FE5AF8DF7%40gmail.com](https://groups.google.com/a/continuum.io/d/msgid/bokeh/6A6B388F-6ADB-4D79-A5FD-D05FE5AF8DF7%40gmail.com?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).

---

<div class="post-metadata">

**Author:** ![Bryan](https://discourse.bokeh.org/user_avatar/discourse.bokeh.org/bryan/32/3625_2.png) [@Bryan](https://discourse.bokeh.org/u/Bryan)\
**Post date:** [January 12, 2016, 5:53pm UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/6 "2016-01-12T17:53:54Z")

</div>

> how to be removed from the distribution list. thank you

There are instructions at the bottom of every mailing list message.

Bryan

> **···**
>
> > On Jan 12, 2016, at 11:38 AM, Jimmy Hung \<hungmeenhong@gmail.com\> wrote:
> 
> > > > --  
> > > > You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.  
> > > > To post to this group, send email to bokeh@continuum.io.  
> > > > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io\](https://groups.google.com/a/continuum.io/d/msgid/bokeh/beb80f5c-2a99-420d-a3d6-057f1cff9f75%40continuum.io%5C).  
> > > > For more options, visit [https://groups.google.com/a/continuum.io/d/optout\](https://groups.google.com/a/continuum.io/d/optout%5C).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.  
> > > To post to this group, send email to bokeh@continuum.io.  
> > > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/800E3FB5-5E63-4961-9007-07AAD97FF563%40continuum.io\](https://groups.google.com/a/continuum.io/d/msgid/bokeh/800E3FB5-5E63-4961-9007-07AAD97FF563%40continuum.io%5C).  
> > > For more options, visit [https://groups.google.com/a/continuum.io/d/optout\](https://groups.google.com/a/continuum.io/d/optout%5C).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.  
> > To post to this group, send email to bokeh@continuum.io.  
> > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/6A6B388F-6ADB-4D79-A5FD-D05FE5AF8DF7%40gmail.com\](https://groups.google.com/a/continuum.io/d/msgid/bokeh/6A6B388F-6ADB-4D79-A5FD-D05FE5AF8DF7%40gmail.com%5C).
> > 
> > For more options, visit [https://groups.google.com/a/continuum.io/d/optout\](https://groups.google.com/a/continuum.io/d/optout%5C).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.  
> > To post to this group, send email to bokeh@continuum.io.  
> > To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAD-jgU%3DC2xnKD6sFGLPjDpo6WhRa8L1M6Y\_D7o4O4Vbd7d0fRg%40mail.gmail.com\](https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAD-jgU%3DC2xnKD6sFGLPjDpo6WhRa8L1M6Y_D7o4O4Vbd7d0fRg%40mail.gmail.com%5C).  
> > For more options, visit [https://groups.google.com/a/continuum.io/d/optout\](https://groups.google.com/a/continuum.io/d/optout%5C).

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads.bokeh.org/original/2X/1/14eb24f9e10e4e9b78e3f10f66c04ffa96446e5a.svg) [@system](https://discourse.bokeh.org/u/system)\
**Post date:** [July 21, 2021, 9:07pm UTC](https://discourse.bokeh.org/t/multiple-users-with-same-session-state/918/7 "2021-07-21T21:07:15Z")

</div>


