Comparing version 1.2.7 to 1.2.8
@@ -11,3 +11,3 @@ var Cerobee = require('clerobee'); | ||
*/ | ||
function Communication(originalId, flowId, externalId, division, source, event, params, callback, target, error, response){ | ||
function Communication(originalId, flowId, externalId, division, source, event, params, callback, responder, error, response){ | ||
this.id = clerobee.generate(); | ||
@@ -31,4 +31,4 @@ this.originalId = originalId || this.id; | ||
if( target ) | ||
this.target = target; | ||
if( responder ) | ||
this.responder = responder; | ||
if( error ) | ||
@@ -147,8 +147,8 @@ this.error = error; | ||
}; | ||
exports.newCommunication = function( originalId, flowId, externalId, division, source, event, params, callback, target, error, response ){ | ||
return new Communication( originalId, flowId, externalId, division, source, event, params, callback, target, error, response ); | ||
exports.newCommunication = function( originalId, flowId, externalId, division, source, event, params, callback, responder, error, response ){ | ||
return new Communication( originalId, flowId, externalId, division, source, event, params, callback, responder, error, response ); | ||
}; | ||
exports.importCommunication = function( obj ){ | ||
var c = new Communication( obj.originalId, obj.flowId, obj.externalId, obj.division, obj.source, obj.event, obj.params, obj.callback, obj.target, obj.error, obj.response ); | ||
var c = new Communication( obj.originalId, obj.flowId, obj.externalId, obj.division, obj.source, obj.event, obj.params, obj.callback, obj.responder, obj.error, obj.response ); | ||
c.id = obj.id; | ||
@@ -155,0 +155,0 @@ c.terms = obj.terms; |
@@ -8,3 +8,3 @@ var Communication = require('../lib/Communication'); | ||
var VERSION = exports.VERSION = '1.2.7'; | ||
var VERSION = exports.VERSION = '1.2.8'; | ||
@@ -11,0 +11,0 @@ var _ = require('lodash'); |
{ | ||
"name": "harcon", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "Messaging/Service Bus for the harmonic convergence of node-based enterprise entities.", | ||
@@ -49,3 +49,3 @@ "keywords": [ | ||
}, | ||
"_id": "harcon@1.2.7" | ||
"_id": "harcon@1.2.8" | ||
} |
@@ -1,2 +0,3 @@ | ||
Harcon - Messaging/Service Bus for the harmonic convergence of node-based enterprise entities or in-browser communication between web components | ||
Harcon - Proven and reliable microservice solution for the harmonic convergence of JS entities. | ||
Scalable from in-browser web components till highly structured node-based enterprise components of real-time systems. | ||
@@ -7,3 +8,4 @@ [![NPM](https://nodei.co/npm/harcon.png)](https://nodei.co/npm/harcon/) | ||
======== | ||
[harcon](https://github.com/imrefazekas/harcon) is a enterprise-level service bus for NodeJS/Browser giving superior abstraction layer for interoperability between entities in a highly structured and fragmented ecosystem. It allows you to design and implement complex workflows where context and causality of messages are important. | ||
[harcon](https://github.com/imrefazekas/harcon) is a service bus for NodeJS/Browser giving superior abstraction layer for interoperability between entities in a highly structured and fragmented ecosystem. | ||
It allows you to design and implement complex workflows where context and causality of messages are important. | ||
@@ -13,2 +15,3 @@ The library has a stunning feature list beyond basic messaging functionality. | ||
- __Channel-agnostic__: harcon represents a very abstract messaging framework allowing you to use any underlaying technology your application requires: [AMQP](http://www.amqp.org), [ZeroMQ](http://zeromq.org), [XMPP](http://xmpp.org), etc... | ||
For zeromq integration, please check this: [harcon-zero](https://github.com/imrefazekas/harcon-zero) | ||
@@ -103,5 +106,12 @@ - __Tracking__: you can monitor every message delivered (request or response) by only few lines of code | ||
// Regular expression - will answer anything where message name start with string 'job' | ||
inflicter.addict( null, 'john', /job.*/, function(callback){ | ||
inflicter.addict( null, 'john', /job.*/, function( partner, callback){ | ||
callback(null, 'Done.'); | ||
} ); | ||
... | ||
inflicter.ignite( 'job.order', {name: 'Stephen', customerID:123}, function(err, res){ | ||
console.log( 'Finished.', err, res ); | ||
} ); | ||
inflicter.ignite( 'john.job', {name: 'Stephen', customerID:123}, function(err, res){ | ||
console.log( 'Finished.', err, res ); | ||
} ); | ||
``` | ||
@@ -113,3 +123,3 @@ | ||
name: 'BookKeeper', | ||
context: 'booking', | ||
... | ||
newOrder: function( customer, callback ){ | ||
@@ -123,10 +133,13 @@ callback( null, 'Done.' ); | ||
... | ||
inflicter.ignite( 'booking.newOrder', {name: 'Stephen', customerID:123}, function(err, res){ | ||
inflicter.ignite( 'BookKeeper.newOrder', {name: 'Stephen', customerID:123}, function(err, res){ | ||
console.log( 'Finished', err, res ); | ||
} ); | ||
inflicter.ignite( 'booking.ordersOfToday', function(err, res){ | ||
console.log( 'Finished', err, res ); | ||
inflicter.ignite( 'BookKeeper.ordersOfToday', function(err, res){ | ||
console.log( 'Finished.', err, res ); | ||
} ); | ||
``` | ||
Both component types must possess a unique name serving as the simplest way to send a message to. Or just simple using the regexp addressing any service function matching the pattern... | ||
#### Orchestration | ||
@@ -376,3 +389,3 @@ | ||
Copyright (c) 2014 Imre Fazekas | ||
Copyright (c) 2015 Imre Fazekas | ||
@@ -379,0 +392,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
992374
417