並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 13 件 / 13件

新着順 人気順

server-sent-eventsの検索結果1 - 13 件 / 13件

タグ検索の該当結果が少ないため、タイトル検索結果を表示しています。

server-sent-eventsに関するエントリは13件あります。 serverwebサーバ などが関連タグです。 人気エントリには 『ChatGPTをぬるぬるにする🐌Server-Sent Eventsの基礎知識』などがあります。
  • ChatGPTをぬるぬるにする🐌Server-Sent Eventsの基礎知識

    単方向通信であるということと、HTTP/1.1上で動作しているのが大きな特徴です。 また、HTTP上で動作することから、通信の互換性が高く、セキュリティモデルも使いまわせるので安心です。 どんな用途と相性がいいの? 双方向通信がしたいわけでなければ、相性の幅がとても広いです。 今回の ChatGPT のような、GPT がトークンを生成するごとに送るケースはもちろん、通知の未読件数バッジの更新、ニュース速報の表示など、サーバからイベントを送りたい時ならなんでも使えます。 HTTP/1.1で動くカラクリ SSEはHTTPのレスポンスヘッダにContent-Type: text/event-streamを指定した上で動作します。 SSEが動く流れ クライアントがサーバーに HTTP/1.1 リクエストを送信し、イベントストリームに接続します。 サーバーは、Keep-Alive 接続を使用して、T

      ChatGPTをぬるぬるにする🐌Server-Sent Eventsの基礎知識
    • WebSockets vs Server-Sent-Events vs Long-Polling vs WebRTC vs WebTransport | RxDB - JavaScript Database

      WebSockets vs Server-Sent-Events vs Long-Polling vs WebRTC vs WebTransport For modern real-time web applications, the ability to send events from the server to the client is indispensable. This necessity has led to the development of several methods over the years, each with its own set of advantages and drawbacks. Initially, long-polling was the only option available. It was then succeeded by Web

        WebSockets vs Server-Sent-Events vs Long-Polling vs WebRTC vs WebTransport | RxDB - JavaScript Database
      • Server-Sent Events を複数パターンで実装して理解を試みる

        Server-Sent Events (SSE) 目新しい技術というわけではありませんが、最近 Server-Sent Events (SSE) について言及する記事をよく見かけます。 何番煎じかはわかりませんが、個人的に興味があることと、正直触ってみたことがなかったので、コードを書きつつ調べてみました。 ※本記事で登場するサンプルコードは次のリポジトリで公開しています。 SSE とは SSE 自体を解説する記事は無数に存在するため詳細な説明は割愛しますが、簡単に言うと、サーバーからクライアントへ一方向の Push 通信を行うための仕組みです。 MDN にもページが存在するため、参考になります。 独自プロトコルを必要とせず、HTTP/1.1 でも動作するのも特徴です。 SSE の歴史 wikipedia に SSE に関するページが存在し、次のような記述があります。 SSE メカニズムは、

          Server-Sent Events を複数パターンで実装して理解を試みる
        • Server-Sent Events, WebSockets, and HTTP

          Hi, I’m Mark Nottingham. I usually write here about the Web, protocol design, HTTP, and Internet governance. Find out more. Comments? Let's talk on Mastodon. @mnot@techpolicy.social other HTTP posts Yet More New HTTP Specs Wednesday, 8 June 2022 A New Definition of HTTP Monday, 6 June 2022 How Multiplexing Changes Your HTTP APIs Sunday, 13 October 2019 Designing Headers for HTTP Compression Tuesda

            Server-Sent Events, WebSockets, and HTTP
          • Hono で Server-Sent Events によるストリーミングを実装する

            Hono で Server-Sent Events によるストリーミングを実装する 2024.02.01 Server-Sent events(SSE)は、サーバーからクライアントに向けてイベントをストリーミングするための仕組みです。WebSocket と比較すると、サーバーからの単方向の通信、HTTP で通信するという特徴があります。この記事では Hono を使って OpenAI API を使ったテキスト生成をストリーミングする方法を紹介します。 Server-Sent Events(SSE) は、サーバーからクライアントに向けてイベントをストリーミングするための仕組みです。WebSocket と比較すると、サーバーからの単方向の通信になるという特徴があります。また HTTP で通信するため、WebSocket のように独自のプロトコルではないため、運用の負担が少ないというメリットがあり

              Hono で Server-Sent Events によるストリーミングを実装する
            • OpenAI APIで思い出す、Server-Sent Events - console.lealog();

              Server-Sent Events・・・お前・・・生きていたのか・・・! っていう気持ちになったので、ちょっとだけまとめておく。 OpenAI API 話題のChatGPTはAPIが公開されていて、それぞれの言語のライブラリだったりREST APIだったりから利用できる。 それを使ってチャットを実装する場合に、本家GUIみたく、レスポンスを一気にまとめてではなくちょっとずつ返ってくるようにしたいとする。 そこで、あの挙動はどうやって実現するのか?ってなった人も多いはず。 あのレスポンスをちょっとずつ、ストリーミングで返してもらう挙動を実現するためには、`stream: true`というオプションを指定する。 これはREST APIをJavaScriptから利用する場合の指定。 const res = await fetch("https://api.openai.com/v1/chat/

                OpenAI APIで思い出す、Server-Sent Events - console.lealog();
              • WebSockets vs. Server-Sent Events

                Over the years, the HTTP request-response model has been used for client-server communications in web applications. However, with the popularity of real-time web applications, the need has emerged for servers to be able to push data to clients proactively without having clients requesting it first. As a result, push technology-based communication methods like WebSockets, and Server-Sent Events (SS

                  WebSockets vs. Server-Sent Events
                • リアルタイムな情報をプッシュする技術「Server Sent Events」のフロントエンド実装方法とは?#SSE #フロントエンド #実装 - ハイパーマッスルエンジニア

                  Server Sent Events (SSE)は、サーバからクライアントにリアルタイムで情報をプッシュするための技術です。この記事では、そのフロントエンドでの実装方法をいくつか紹介します。 完成品 今回実装したものは下記に収めてます。Next.jsを使っています。 github.com 下記で実際にブラウザで動作確認できます。 https://server-sent-events-example.vercel.app ChatGPTのようなUIを実装するのに色々な方法を試しました。 SSEのサーバー側のコード サーバーサイドの設定は以下のとおりです。 SSEをサポートするエンドポイントを作成します。 レスポンスのヘッダーに'Content-Type': 'text/event-stream'を設定し、接続を開いたままにします。 必要に応じて、特定の間隔でデータを送信します。 pages/

                    リアルタイムな情報をプッシュする技術「Server Sent Events」のフロントエンド実装方法とは?#SSE #フロントエンド #実装 - ハイパーマッスルエンジニア
                  • Server-Sent Events (SSE) Are Underrated

                    25 Dec, 2024 Most developers know about WebSockets, but Server-Sent Events (SSE) offer a simpler, often overlooked alternative that deserves more attention. Let's explore why this technology is underrated and how it can benefit your applications. What are Server-Sent Events?SSE establishes a one-way communication channel from server to client over HTTP. Unlike WebSockets' bidirectional connection,

                      Server-Sent Events (SSE) Are Underrated
                    • リアルタイムなwebアプリを実現する方法(ポーリング、Comet、Server Sent Events、WebSocket)

                      リアルタイムなwebアプリを実現する方法(ポーリング、Comet、Server Sent Events、WebSocket)2016/1/17 人気記事 リアルタイムなwebアプリを実現する方法について、サンプルコードを作成しながら検証する。 注意点 この記事で記載している実現方法はいずれもHTTPレベルの仕組みで実現されるものであり、サンプルコードはあくまで実装例です。 サンプルコードは動作を確認するのが目的であり、プロダクション適用レベルの考慮は一切していません。 実現方法の一覧ポーリング 画面をフルでレンダリングするパターンAjaxでJSONやXMLでデータを取得するパターンComet(ロングポーリング) Server Sent Events WebSocket 詳細の理解は、以下の資料を参考にしてください。 参考 サーバPUSHざっくりまとめ サンプルコードポーリング(Ajax)リ

                        リアルタイムなwebアプリを実現する方法(ポーリング、Comet、Server Sent Events、WebSocket)
                      • Server-Sent Events: the alternative to WebSockets you should be using

                        When developing real-time web applications, WebSockets might be the first thing that come to your mind. However, Server Sent Events (SSE) are a simpler alternative that is often superior. Contents Prologue WebSockets? What is wrong with WebSockets Compression Multiplexing Issues with proxies Cross-Site WebSocket Hijacking Server-Sent Events Let’s write some code The Reverse-Proxy The Frontend The

                          Server-Sent Events: the alternative to WebSockets you should be using
                        • Deno標準ライブラリでServer-Sent Events - Qiita

                          この記事はDeno Advent Calendar 2021とは全く関係ない記事です。 Denoの標準ライブラリを使って、Server-Sent Eventsを送信するサーバーを書いていきたいと思います。 Server-Sent Eventsとは? Server-Sent Events(SSE)とは、サーバーからクライアントへイベントを受け渡しできる接続方法のことです。WebSocketと似ていますが、WeSocketが双方向通信なのに対し、SSEはデータがサーバーからクライアントへの1方向しか送信できないという違いがあります。 Deno標準ライブラリのサーバーでServer-Sent Eventsを送信する SSEを送信するにはReadableStreamを使用します。 import { serve } from "https://deno.land/std@0.117.0/http/m

                            Deno標準ライブラリでServer-Sent Events - Qiita
                          • OpenAI SSE (Server-Sent Events) Streaming API

                            Photo by ELLA DON on UnsplashHave you been working on an OpenAI project that uses the Chat GPT API? Do you want to stream the response to your application in real-time — as it's being generated? In this article, I will walk you through the process of using OpenAI’s API to receive SSE to your server and forwarding those events to your client using SSE. The examples will be written in JavaScript, Py

                              OpenAI SSE (Server-Sent Events) Streaming API
                            1

                            新着記事