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

thingmodel

v0.19.3

Published

Synchronize data and models across multiple devices

Downloads

10

Readme

ThingModel

ThingModel synchronizes data and models in realtime over the network for multiple devices.

ThingModel is a new wheel, but a simple, fast and light one.

ThingModel does not need compilation, it does not include a DSL either and everything is done during runtime. You can build the model on the fly and the connected applications can learn it during their executions.

If you are looking for innovative products about models, you should also take a look at ThingML or Kevoree.

The model

Model

Light network synchronization

  • Clients and servers over WebSockets
  • Light serialization with Protocol Buffers
  • Diff algorithm, only send changes
  • String cache for smaller messages

Multi-plateform

  • C#
  • .Net and Mono
  • For the PixelSense table
  • And because C# is cool
  • JavaScript (and TypeScript)
  • HTML5 browsers
  • Works with Node.JS
  • Java
  • Android (with Google Glass support)
  • JVM (with Minecraft)
  • Or a HLA bridge for VBS

A collection of tools

A broadcast server

Screenshot server

If this server doesn't suit your needs, you can easely develop your own ThingModel server.

A time machine

Screenshot timemachine

The time machine saves the model in realtime (1 hertz as maximum frequency by default). Thanks to protocol buffers, gzip and sqlite, it's very light.

And you can go back in time just with a HTTP request.

Bugs

ThingModel is tested and used almost every days and it works, but it's not stable.

Please follow the checklist if you are experiencing some weird problems.

Installation

Nuget: Install-Package ThingModel -Pre

Bower: bower install ThingModel

Maven: need motivation

Otherwise: Download

Example (in CSharp)


// Declare the rabbit type
var typeRabbit = BuildANewThingType.Named("rabbit")
				.WhichIs("Just a rabbit")
				.ContainingA.String("name")
				.AndA.LocationLatLng()
				.AndA.NotRequired.Double("speed")
				.AndAn.Int("nbChildren", "Number of children");
				
// Create a rabbit instance
var rabbit = BuildANewThing.As(typeRabbit)
				.IdentifiedBy("ab548")
				.ContainingA.String("name", "Roger")
				.AndA.Location(new Location.LatLng(60,10))
				.AndAn.Int("nbChildren", 12);

// The warehouse stores the objects
var warehouse = new Warehouse();

// Create a websocket client
var client = new Client("Emitter", "ws://localhost:8083/", warehouse);

// Register the rabbit
warehouse.RegisterThing(rabbit);

// Send the changes to the server
client.Send();
var warehouse = new Warehouse();
var client = new Client("Receiver", "ws://localhost:8083/", warehouse);

warehouse.Events.OnNew += (sender, args) => {
    Console.WriteLine(args.Thing.String("name"));
};