Re: How to implement a cherrypy server with long-polling enabled path?
北美38fule <[email protected]> Thu, 19 Dec 2019 10:47:48 -0800 (PST)
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_478_1653557234.1576781268361 Content-Type: multipart/alternative; boundary="----=_Part_479_1207381757.1576781268362" ------=_Part_479_1207381757.1576781268362 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable SQLite, along with sqlalchemy in Python. I'm not aware of the feature you= =20 suggest, where can I find more information? Thank you! On Thursday, December 19, 2019 at 4:19:29 AM UTC-8, ingo janssen wrote: > > What DB are you using. Can it send messages? You can build a plug in=20 > that sits on the cherrypy bus and listens to messages and then pushes=20 > them to a SSE publisher.=20 > > For example something like=20 > https://gist.github.com/ingoogni/169a2b8b1e484c71c95c55a2da2a65f0 to=20 > listen to postgreSQL and something like this to publish the messages:=20 > https://gist.github.com/ingoogni/a7f7c0fed9e96b3545e9a8c6139d80b0=20 > > > > On 18-12-2019 03:23, =E5=8C=97=E7=BE=8E38fule wrote:=20 > > I am a newbie in cherrypy. I've done some research on google but didn't= =20 > > get much helpful information.=20 > > Could someone please point out if cherrypy allows me to write a simple= =20 > > server that has long-polling enabled path?=20 > > The scenario is like: whenever the database on backend has some updated= =20 > > information, it sends signals to the frontend to updates all relevant= =20 > > display accordingly.=20 > >=20 > > Is this achievable using cherrypy? Or I will need tornado-like=20 > > framework? Could someone also point out a newbie-friendly tutorial for= =20 > > this purpose? Thanks.=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google=20 > > Groups "cherrypy-users" group.=20 > > To unsubscribe from this group and stop receiving emails from it, send= =20 > > an email to cherryp...-/[email protected] <javascript:>=20 > > <mailto:cherrypy-users+unsubscribe-/[email protected] <javascript:>>.=20 > > To view this discussion on the web visit=20 > >=20 > https://groups.google.com/d/msgid/cherrypy-users/a2124195-11dc-46d2-baf2-= 7a9040bd9639%40googlegroups.com=20 > > < > https://groups.google.com/d/msgid/cherrypy-users/a2124195-11dc-46d2-baf2-= 7a9040bd9639%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter>.=20 > > --=20 You received this message because you are subscribed to the Google Groups "= cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To view this discussion on the web visit https://groups.google.com/d/msgid/= cherrypy-users/05e32bd9-f3a2-4e3f-97ae-2fc2a10d1926%40googlegroups.com. ------=_Part_479_1207381757.1576781268362 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">SQLite, along with sqlalchemy in Python. I'm not aware= of the feature you suggest, where can I find more information? Thank you!<= br><br>On Thursday, December 19, 2019 at 4:19:29 AM UTC-8, ingo janssen wro= te:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;= border-left: 1px #ccc solid;padding-left: 1ex;">What DB are you using. Can = it send messages? You can build a plug in <br>that sits on the cherrypy bus and listens to messages and then pushes <br>them to a SSE publisher. <br> <br>For example something like <br><a href=3D"https://gist.github.com/ingoogni/169a2b8b1e484c71c95c55a2da2= a65f0" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'h= ttps://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2Fingoogni%2F1= 69a2b8b1e484c71c95c55a2da2a65f0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9o= V0dmFH1iQ6IcACqDsxJGHbSRA';return true;" onclick=3D"this.href=3D'ht= tps://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2Fingoogni%2F16= 9a2b8b1e484c71c95c55a2da2a65f0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9oV= 0dmFH1iQ6IcACqDsxJGHbSRA';return true;">https://gist.github.com/<wbr>in= googni/<wbr>169a2b8b1e484c71c95c55a2da2a65<wbr>f0</a> to <br>listen to postgreSQL and something like this to publish the messages: <br><a href=3D"https://gist.github.com/ingoogni/a7f7c0fed9e96b3545e9a8c6139= d80b0" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'h= ttps://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2Fingoogni%2Fa= 7f7c0fed9e96b3545e9a8c6139d80b0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGML= AoldOeUpoRoRF15LJ_zyIkzbQ';return true;" onclick=3D"this.href=3D'ht= tps://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2Fingoogni%2Fa7= f7c0fed9e96b3545e9a8c6139d80b0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGMLA= oldOeUpoRoRF15LJ_zyIkzbQ';return true;">https://gist.github.com/<wbr>in= googni/<wbr>a7f7c0fed9e96b3545e9a8c6139d80<wbr>b0</a> <br> <br> <br> <br>On 18-12-2019 03:23, =E5=8C=97=E7=BE=8E38fule wrote: <br>> I am a newbie in cherrypy. I've done some research on google b= ut didn't <br>> get much helpful information. <br>> Could someone please point out if cherrypy allows me to write a si= mple <br>> server that has long-polling enabled path? <br>> The scenario is like: whenever the database on backend has some up= dated <br>> information, it sends signals to the frontend to updates all relev= ant <br>> display accordingly. <br>>=20 <br>> Is this achievable using cherrypy? Or I will need tornado-like <br>> framework? Could someone also point out a newbie-friendly tutorial= for <br>> this purpose? Thanks. <br>>=20 <br>> --=20 <br>> You received this message because you are subscribed to the Google <br>> Groups "cherrypy-users" group. <br>> To unsubscribe from this group and stop receiving emails from it, = send <br>> an email to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscat= ed-mailto=3D"Uy8nG9txAAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'= ;javascript:';return true;" onclick=3D"this.href=3D'javascript:'= ;;return true;">cherryp...@<wbr>googlegroups.com</a> <br>> <mailto:<a href=3D"javascript:" target=3D"_blank" gdf-obfuscate= d-mailto=3D"Uy8nG9txAAAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D'= javascript:';return true;" onclick=3D"this.href=3D'javascript:'= ;return true;">cherrypy-users+<wbr>unsubscribe-/[email protected]</a>>. <br>> To view this discussion on the web visit <br>> <a href=3D"https://groups.google.com/d/msgid/cherrypy-users/a21241= 95-11dc-46d2-baf2-7a9040bd9639%40googlegroups.com" target=3D"_blank" rel=3D= "nofollow" onmousedown=3D"this.href=3D'https://groups.google.com/d/msgi= d/cherrypy-users/a2124195-11dc-46d2-baf2-7a9040bd9639%40googlegroups.com= 9;;return true;" onclick=3D"this.href=3D'https://groups.google.com/d/ms= gid/cherrypy-users/a2124195-11dc-46d2-baf2-7a9040bd9639%40googlegroups.com&= #39;;return true;">https://groups.google.com/d/<wbr>msgid/cherrypy-users/a2= 124195-<wbr>11dc-46d2-baf2-7a9040bd9639%<wbr>40googlegroups.com</a> <br>> <<a href=3D"https://groups.google.com/d/msgid/cherrypy-users/a2= 124195-11dc-46d2-baf2-7a9040bd9639%40googlegroups.com?utm_medium=3Demail&am= p;utm_source=3Dfooter" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"th= is.href=3D'https://groups.google.com/d/msgid/cherrypy-users/a2124195-11= dc-46d2-baf2-7a9040bd9639%40googlegroups.com?utm_medium\x3demail\x26utm_sou= rce\x3dfooter';return true;" onclick=3D"this.href=3D'https://groups= .google.com/d/msgid/cherrypy-users/a2124195-11dc-46d2-baf2-7a9040bd9639%40g= ooglegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return tru= e;">https://groups.google.com/d/<wbr>msgid/cherrypy-users/a2124195-<wbr>11d= c-46d2-baf2-7a9040bd9639%<wbr>40googlegroups.com?utm_medium=3D<wbr>email&am= p;utm_source=3Dfooter</a>>. <br></blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;cherrypy-users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:cherrypy-users+unsubscribe-/[email protected]">cher= rypy-users+unsubscribe-/[email protected]</a>.<br /> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cherrypy-users/05e32bd9-f3a2-4e3f-97ae-2fc2a10d1926%40googlegrou= ps.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/= msgid/cherrypy-users/05e32bd9-f3a2-4e3f-97ae-2fc2a10d1926%40googlegroups.co= m</a>.<br /> ------=_Part_479_1207381757.1576781268362-- ------=_Part_478_1653557234.1576781268361--