stream-frame | a stream framing library for node.js | Runtime Evironment library
kandi X-RAY | stream-frame Summary
kandi X-RAY | stream-frame Summary
a stream framing library for node.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stream-frame
stream-frame Key Features
stream-frame Examples and Code Snippets
Community Discussions
Trending Discussions on stream-frame
QUESTION
I'm trying to setup stream-framework the one here not the newer getstream. I've setup the Redis server and the environment properly, the issue I'm facing is in creating the activities for a user.
I've been trying to create activities, following the documentation to add an activity but it gives me an error message as follows:
...ANSWER
Answered 2021-May-29 at 15:41The documentation is inconsistent. The verb
you pass to the activity should be (an instance of?*) a subclass of stream_framework.verbs.base.Verb
. Check out this documentation page on custom verbs and the tests for this class.
The following should fix the error you posted:
QUESTION
I'm running across an extremely strange bug while using GetStream: i'm running a script to migrate over 200k activities (previously used an internal stream-framework fork) and I'm running across a really bizarre issue.
The problem is this: I'm setting the 'time' field to a custom value (usually in the past). Now: these activities are being ordered wrong by the API.
Although the activities being added have correct, ISO8601 UTC times in the past, the oldest ones are coming back on top of the feed (mixed with only a couple of new activities).
This is really odd and I'm at the end of my wits -- this seems like an issue on Stream's end.
Thoughts? Below is a screenshot of the issue.
...ANSWER
Answered 2020-Jul-10 at 14:30Surprisingly, it works as expected because API considers last n
operations to build the feed. After retrieving these operations, they are ordered according to time. That's why if you add old activities, they are the only operations to build the feed.
Workaround to this is that adding activities in reverse order such that insert old activities first and new activities last then you will be able to read the new ones.
Moreover, if you are importing a lot of activities, you might consider import feature.
QUESTION
I'm currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200
error on Google Chrome. I'm not sure exactly what can provoke this error, I just noticed it pops out only when accessing the website in HTTPS. I can't be 100% sure it is related, but it looks like it prevents javascript to be executed properly.
For instance, the following scenario happens :
I'm accessing the website in HTTPS
My Twitter feed integrated via https://publish.twitter.com isn't loaded at all
I can notice in the console the ERR_HTTP2_PROTOCOL_ERROR
If I remove the code to load the Twitter feed, the error remains
If I access the website in HTTP, the Twitter feed appears and the error disappears
Google Chrome is the only web browser triggering the error: it works well on both Edge and Firefox.
(NB: I tried with Safari, and I have a similar kcferrordomaincfnetwork 303
error)
I was wondering if it could be related to the header returned by the server since there is this '200' mention in the error, and a 404 / 500 page isn't triggering anything.
Thing is the error isn't documented at all. Google search gives me very few results. Moreover, I noticed it appears on very recent Google Chrome releases; the error doesn't pop on v.64.X, but it does on v.75+ (regardless of the OS; I'm working on Mac tho).
Any clue at this point to investigate would be gladly appreciated !
Thanks in advance.
Tristan
Edit 1 : Might be related to Website OK on Firefox but not on Safari (kCFErrorDomainCFNetwork error 303) neither Chrome (net::ERR_SPDY_PROTOCOL_ERROR)
Edit 2 : Findings from further investigations are the following :
- error doesn't pop on the exact same page if server returns 404 instead of 2XX
- error doesn't pop on local with a HTTPS certificate
- error pops on a different server (both are OVH's), which uses a different certificate
- error pops no matter what PHP version is used, from 5.6 to 7.3 (framework used : Cakephp 2.10)
Edit 3 : As requested, below is the returned header for the failing ressource, which is the whole web page. Even if the error is triggering on each page having a HTTP header 200, those pages are always loading on client's browser, but sometimes an element is missing (in my exemple, the external Twitter feed). Every other asset on the Network tab has a success return, except the whole document itself.
Google Chrome header (with error) :
Firefox header (without error) :
A curl --head --http2
request in console returns the following success :
ANSWER
Answered 2020-May-04 at 07:28I didn't figure out what exactly was happening, but I found a solution.
The CDN feature of OVH was the culprit. I had it installed on my host service but disabled for my domain because I didn't need it.
Somehow, when I enable it, everything works.
I think it forces Apache to use the HTTP2 protocol, but what I don't understand is that there indeed was an HTTP2 mention in each of my headers, which I presume means the server was answering using the right protocol.
So the solution for my very particular case was to enable the CDN option on all concerned domains.
If anyone understands better what could have happened here, feel free to share explanations.
QUESTION
I know that browsers can send RST_STREAM-frames
to cancel serverpush
.
Does it make sense to send Last-Modified
or Etag
headers inside the PUSH_PROMISE
?
Or is the validation of the to-be-pushed
resources only based on their URI
(as Simone Bordet answered to the following question two years ago)?
Does the browser cancel server push when a resource is in cache?
I couldn't find an exact answer to this question.
...ANSWER
Answered 2017-Dec-30 at 20:37When a HTTP/2 server pushes a resource, it generates the PUSH_PROMISE
frame to send to the client, and at the same time it creates a synthetic request that is processed as if the remote client sent it.
Remember that the PUSH_PROMISE
frame represent the request that the client would make for that resource, not the response.
Typically, the content of the PUSH_PROMISE
frame headers and the headers of the synthetic request are the same, but - depending on the implementations - it may not be the case.
Headers Last-Modified
or ETag
only make sense in responses, so it would not make sense to add them to a PUSH_PROMISE
frame.
Whether it makes sense to add other request headers such as If-Modified-Since
to the PUSH_PROMISE
depends on whether the same headers are used for the synthetic request.
If the same headers are used, as it's typically the case, then adding headers such as If-Modified-Since
has only effects on the server-side processing: the server may generate a 304 Not Modified
when processing the synthetic request.
However, it would be strange for a server to send a PUSH_PROMISE
for a resource, followed by a 304
. If the server knows that the client already has the resource cached, it may as well skip sending the PUSH_PROMISE
.
Adding response headers such as Last-Modified
to a PUSH_PROMISE
frame does not make sense because a PUSH_PROMISE
represents a request.
Adding conditional request headers such as If-Modified-Since
normally requires the server to have some knowledge about what resources were previously served to the client: it has to know whether a resource has already been served so that sending a 304
to the client for a pushed resource will make the client use the resource already present in its cache.
QUESTION
How can I tweak stream-framework to make it use postgreSQL instead of Redis
...ANSWER
Answered 2017-Mar-24 at 09:43I actually did ask this question directly to the Stream-Framework project maintainers on their GitHub Repo and they responded :
No it's not. You can use either redis or cassandra
Quote from Thierry Schellenbach ( Author Stream-Framework )
https://github.com/tschellenbach/Stream-Framework/issues/204#event-997545923
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stream-frame
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page