Archive for the ‘ Server ’ Category

Normalized ONMjs Node.js + HTML 5 SPA Architecture

I’m working to get ONMjs published as a node.js package and to create a Yeoman generator to automate the creation of a simple generic web application project that can be customized using (a) a shared Data Model Declaration (b) data-model-agnostic re-usable observer plug-ins.

Normalized web app architecture using ONMjs

Normalized web app architecture using ONMjs

odds tips fotboll oddsbonus speltips betexplorer speltips bet tips fotboll speltips

Presenting ONMjs @ SeaLang on 2013.11.06

I’ll be doing my first public talk on the forthcoming ONMjs library at the Seattle Programming Languages Meetup group on November, 6th 2013 in Redmond, WA. If you’re local, I encourage you to come.

This is a great group and I expect to learn as much as I educate given the caliber of the engineers that turn out monthly for these meetings.

Here’s a link to the event:

[SeaLang] Decoupled Web Apps w/ONMjs

One of our own, Chris Russell, will be presenting the following:

“Join us in November for a talk about architecture, design patterns, and strategies for building decoupled, reactive web applications and components using a new JavaScript library called ONMjs developed by speaker Chris Russell for the open source Encapsule Project.

ONMjs (Object Namespace Manager) is a low-level infrastructure library written in CoffeeScript (compiled to JavaScript) based on a hybrid design pattern called Model Store Observe Feedback Signal (MSOFS) . The library was created to simplify the development of complex client-side HTML 5 data visualization and editing applications but is neither a UI nor strictly client-side library.

Briefly, ONMjs provides you with a way to declare and annotate your application’s data object model (Model concept), an automated way to create and dispose of data objects (Store concept), a set of API’s for writing event handlers (Observer concept), API’s for accessing and mutating data (Feedback concept), and support for communicating data changes among decoupled application subsystems (Signal concept).

The talk will be informal and there will be plenty of time for Q&A and discussion of related topics. You are encouraged to bring your laptop and tip the staff at Canyons Redmond who generously hosts SeaLang’s monthly meetings.”

As always, we’ll have a few OReilly books to bribe away, and as a reminder, your host (Ted Neward) won’t be there. If somebody wants to step up to be the host (meaning, you get there a few minutes early, mention to the staff that we’re taking over the back, remember to bring a VGA cable so Chris can hook his laptop up to the TV, and open the meeting with whatever schtick sounds good to you before introducing Chris), email me and I’ll send you a list of things to do that mirrors exactly that list I just rattled off. ;-)

Thanks to Ted Neward and SeaLang for the opportunity to come speak.

ONMjs Library Docs

I’ve been working on documentation for the ONMjs library for the past 24-hours. It’s good to pop up out of the code and try to explain it before actually releasing a stand-alone preview as it gives me an opportunity to scrub for consistency and audit my scenario coverage.

The more I write about it, the more I like ONMjs. It’s a large amount of work but I’m excited to actually be releasing something that I’m sure a lot of people will find useful.

The Git repository (currently empty) is: Encapsule/ONMjs (GitHub).

ONMjs itself is stable but still in gestation in the Encapsule/schema repository.

You can view the Coffeescript sources here:
https://github.com/Encapsule/schema/tree/master/client/app/coffee/libs

… or the compiled Javascript here:
http://schema.encapsule.org/js/

Once I’m satisfied with the docs I plan to learn me some Grunt and automate the generation of debug and minimized versions of ONMjs.

I almost wish I hadn’t already paid for GeekWire Summit tomorrow so I could keep writing. Oh well – it will be fun to get out with the geeks.

 

 

Generic Finite State Machine Library in C++

https://github.com/Encapsule/cpp-fsm-lib

This is a little C++ template library I wrote over Christmas break in 2012 that implements a generic Turing Machine customizable to theoretically any task via static data tables that specialize for a specific input and output vectors, and a specific state transition matrix.

The example isn’t completely finished IIRC but that’s okay. It’s done enough to demonstrate the basic concepts that we can write simple little programs that leverage static data tables (e.g. SCDL models) to do whatever we want.

As a side note, while developing this example I found many roads leading me to the strange and wonderful land of  boost::proto. Proto can (and actually should) be used to implement my generic FSM. Why? If we convey all the structural and logical details of our design captured in SCDL to the C++ compiler, then the C++ compiler can optimize the ever-living bajesus out of it.

So for example, in my little library when “clock” edge (actually modelled as a function call) occurs, my simple algorithm performs several table lookup operations. But in my intended use case these tables are static data. I failed to convey to the compiler this detail so what it gave me was a generic library that can handle dynamically reconfigurable FSM (which I don’t need) at  the cost of imposing additional overhead in the case of static tables.

What we would ideally like to be able to do is transform SCDL “machine” models (so the static model data that comprises in the I/O vectors and state transition matrix) into a native runtime that an assembly language dog could not further optimize by hand. So no table lookups, just inline blazing fast code.

Given the simplicity of this little C++ program, later I may extend it a bit and try installing some variation of it server side for performing simulation runs (e.g. turn it into a webservice basically).