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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@everymatrix/om-connector

v0.0.14

Published

To connect to our server, using the PUSH type connection (with any programming language), you need to follow the steps: 1. Open a TCP socket to our server. 2. Write a subscribe-request SDQL 3. Read from the socket. You will receive a subscribe-response SD

Downloads

178

Readme

Usage of the feed

To connect to our server, using the PUSH type connection (with any programming language), you need to follow the steps:

  1. Open a TCP socket to our server.
  2. Write a subscribe-request SDQL
  3. Read from the socket. You will receive a subscribe-response SDQL, followed by initial-data SQL and you will keep receiving update-data SDQL until you send an unsubscribe-request SDQL or the socket closes.
  4. Respond to ping-request SDQL. (write a ping-response SDQL with the id from the ping-request)

How to write over the socket in the correct format:

  1. Compute the message (the SDQL construct). You can find all the SDQLs in the documentation received from EveryMatrix:
    Ex: subscribe request:
<?xml version="1.0" encoding="UTF-8"?>
<sdql>
<SubscribeRequest subscriptionSpecificationName="SubscriptionName"/>
</sdql>
  1. Compress the message using the GZIP algorithm.
  2. Calculate the length of the GZIPPED message.
  3. Convert the number from 3 to a string (Ex: from 123 to “123”)
  4. Write on the socket the length (the string obtained at 4)
  5. Write on the socket a zero byte (a byte whose value is 0)
  6. Write the gzipped message

How to read and interpret the messages coming from the socket, after you just opened the socket:

  1. Read bytes until you find a zero byte.
  2. Convert the read bytes to a string.
  3. Convert the String from 2 to a number (Integer), let’s call it N
  4. Read exactly N bytes (the number from 3) from the socket.
  5. Decompress the message from 4 using GZIP algorithm
  6. Convert the result from 5 to a string You have the message.

Changelog

0.0.14

  1. implemented startWithResume functionality

0.0.13

  1. Fix package.json "main" property
  2. Add .eslintrc.json file in examples

0.0.10

  1. Fix file dependencies paths

0.0.9

  1. Added build for example_ts; refactor examples
  2. Refactor tests

0.0.8

0.0.7

  1. Changed language to TypeScript
  2. Changed data structuring to JSON from XML
  3. Added example files for both JavaScript and TypeScript

0.0.6

  1. Add reconnect w/ resume-updates mechanism if the socket has been down for any reason.

0.0.5

  1. Add section 'Versions' to README.md

0.0.4

  1. Retry mechanism. If the client gets disconnected, the connector keeps trying to resubscribe to the server.
  2. Modify the xml-to-json parser to transform all numbers into strings.