npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

x-protocol

v1.1.5

Published

## 📖 Proje Hakkında

Readme

Mikroservisler ve ara servisler için x-protocol

📖 Proje Hakkında

Bu proje, RPC akrabası olan bir çağrı sistemi geliştirmek amacıyla oluşturulmuştur. Kullanıcıların doğrudan RPC yazmalarına gerek kalmadan, Servisler arası 2 call tanımı ile kolayca iletişim kurabilirler. Proje, modüler yapısı ve kolay kullanımı ile dikkat çekmektedir. Ayrıca dışarıdan erişilemeyen sidecar ve ek ufak servisler için de proxy modeli de bulunmaktadır. Örnek dashboard dış servisinden -> cluster-controller -> sidecar şeklinde bir erişim tipinde controller-manager üzerinde hem kendi call-servisleri hem de sidecar için proxy katmanı eklenebilir bu durumda direkt olarak sidecar veya herhangi alt servisler için namespace ayırarak ona proxy katmanı ile erişebilirsiniz.

🚀 Başlangıç

Gereksinimler

  • Go 1.18 veya üzeri
  • Node.js 16 veya üzeri
  • pnpm

GO Kurulum

  1. Go Modüllerini Yükleyin:

    Modül yüklemeye gerek yoktur. Direkt olarak:

     import "github.com/hasirciogli/x-protocol/packages/go/packages"

    şeklinde import edebilirsiniz.

  2. Örnek Server Oluşturun: main.go dosyasını aşağıdaki gibi oluşturun.

    package main
    
    import (
        "encoding/json"
    
        "github.com/hasirciogli/x-protocol/packages/go/packages"
    )
    
    type HelloPayload struct {
        Message string `json:"message"`
        Name    string `json:"name"`
    }
    
    func main() {
        server := packages.NewXProtocolServer("localhost", 8080)
        server.RegisterCall("hello", func(payload json.RawMessage) json.RawMessage {
            var p HelloPayload
            p.Message = "hello"
            p.Name = "world"
    
            str, err := json.Marshal(p)
            if err != nil {
                return json.RawMessage(`{"error": "` + err.Error() + `"}`)
            }
            return json.RawMessage(str)
        })
        server.Start()
    }
  3. Uygulamayı Başlatın: main.go dosyasını aşağıdaki gibi çalıştırın.

    go run main.go

NODEJS Kurulumu

  1. Nodejs Paketlerini Yükleyin:

    pnpm add x-protocol
  2. Örnek Client Oluşturun:

    import { XProtocolClient } from "x-protocol";
    
    const client = new XProtocolClient("localhost", 8080);
    const response = await client.call("hello", { name: "world" });
    console.log(response);

🛠️ Özellikler

| Özellik | Açıklama | | -------------- | ---------------------------------------- | | RPC Çağrıları | RPC tabanlı çağrılar ile hızlı iletişim. | | Modüler Yapı | Her bir bileşen ayrı paketlerde. | | Farklı diller | Go, TypeScript, Python, Java, C#, vb. | | Kolay Kullanım | Kullanıcı dostu arayüz ve dokümantasyon. |

📚 Kullanım

RPC çağrıları yapmak için aşağıdaki örnekleri inceleyebilirsiniz:

// Go tarafında x-protocol çağrısı
response, err := client.Call("RegisteredCallAction", args)
if err != nil {
    log.Fatal(err)
}
// TypeScript tarafında x-protocol çağrısı
const response = await client.call("RegisteredCallAction", args);

🎨 Katkıda Bulunma

Katkılarınızı bekliyoruz! Lütfen aşağıdaki adımları izleyerek katkıda bulunun:

  1. Forklayın
  2. Yeni bir dal oluşturun (git checkout -b feature/YourFeature)
  3. Değişikliklerinizi yapın ve commit edin (git commit -m 'Add some feature')
  4. Dalınızı gönderin (git push origin feature/YourFeature)
  5. Bir Pull Request açın

📄 Lisans

Bu proje MIT Lisansı altında lisanslanmıştır.

📞 İletişim

Herhangi bir sorunuz veya öneriniz varsa, lütfen benimle iletişime geçin:


Teşekkürler! Projemi incelediğiniz için teşekkür ederiz!

.

Basit Bağlantı Stress Testi

Test yapılırken homelab kullanıldı cloudflare zerotrust ile dışarıya açılıp ağ gecikmesi ile beraber olası kopmalar göz önüne alınarak test yapıldı. Ayrıca tek makineden yapıldığı için hata oluştu, multi node ile test yapılsaydı veya proxy ile bu hatalar oluşmazdı.

connection-test.ts dosyasında test yapılmıştır. Dilerseniz kendi testlerinizi yapabilirsiniz.

npx tsx connection-test.ts

Test sonucu:

Test tamamlandı!
Test süresi: 241.42 saniye
Toplam istek sayısı: 17000
Başarı sayısı: 16996
Hata sayısı: 4
Başarı oranı: 99.98%
Hata oranı: 0.02%

Farklı programlama dilleri arası test + proxy test :D

x-protocol-multi-language-test